gospt/src/cmd/toggleplay.go

22 lines
460 B
Go
Raw Normal View History

2023-01-09 23:52:21 +00:00
package cmd
import (
2023-02-09 07:28:41 +00:00
"gitea.asdf.cafe/abs3nt/gospt/src/commands"
2023-01-09 23:52:21 +00:00
"github.com/spf13/cobra"
)
func init() {
rootCmd.AddCommand(togglePlayCmd)
}
var togglePlayCmd = &cobra.Command{
2023-01-14 07:06:43 +00:00
Use: "toggleplay",
Aliases: []string{"t"},
Short: "Toggles the play state of spotify",
Long: `If you are playing a song it will pause and if a song is paused it will play`,
2023-01-09 23:52:21 +00:00
Run: func(cmd *cobra.Command, args []string) {
commands.TogglePlay(ctx, client)
},
}