gospt/src/cmd/mute.go

25 lines
429 B
Go
Raw Normal View History

2023-01-15 04:52:47 +00:00
package cmd
import (
2023-02-09 07:28:41 +00:00
"gitea.asdf.cafe/abs3nt/gospt/src/commands"
2023-01-15 04:52:47 +00:00
"github.com/spf13/cobra"
)
func init() {
rootCmd.AddCommand(muteCmd)
}
var muteCmd = &cobra.Command{
Use: "mute",
Short: "mutes playback",
Long: `Mutes the spotify device, playback will continue`,
RunE: func(cmd *cobra.Command, args []string) error {
err := commands.SetVolume(ctx, client, 0)
if err != nil {
return err
}
return nil
},
}