2023-01-09 23:52:21 +00:00
|
|
|
package cmd
|
|
|
|
|
|
|
|
import (
|
|
|
|
"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) {
|
2023-02-17 22:08:25 +00:00
|
|
|
commands.TogglePlay(ctx)
|
2023-01-09 23:52:21 +00:00
|
|
|
},
|
|
|
|
}
|