gospt/cmd/toggleplay.go

20 lines
406 B
Go
Raw Normal View History

2023-01-09 15:52:21 -08:00
package cmd
import (
"github.com/spf13/cobra"
)
func init() {
rootCmd.AddCommand(togglePlayCmd)
}
var togglePlayCmd = &cobra.Command{
2023-01-13 23:06:43 -08: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 15:52:21 -08:00
Run: func(cmd *cobra.Command, args []string) {
2023-02-17 16:08:25 -06:00
commands.TogglePlay(ctx)
2023-01-09 15:52:21 -08:00
},
}