Aliases
This commit is contained in:
parent
d66fac3088
commit
cbaac58587
@ -13,10 +13,11 @@ func init() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var seekCmd = &cobra.Command{
|
var seekCmd = &cobra.Command{
|
||||||
Use: "seek {forward/backward/songposition in seconds}",
|
Use: "seek {forward/backward/songposition in seconds}",
|
||||||
Short: "seek forward/backward or to a given second",
|
Short: "seek forward/backward or to a given second",
|
||||||
Args: cobra.MinimumNArgs(1),
|
Aliases: []string{"s"},
|
||||||
Long: `Seeks forward or backward, or seeks to a given position in seconds`,
|
Args: cobra.MinimumNArgs(1),
|
||||||
|
Long: `Seeks forward or backward, or seeks to a given position in seconds`,
|
||||||
RunE: func(cmd *cobra.Command, args []string) error {
|
RunE: func(cmd *cobra.Command, args []string) error {
|
||||||
if args[0] == "forward" || args[0] == "f" {
|
if args[0] == "forward" || args[0] == "f" {
|
||||||
err := commands.Seek(ctx, client, true)
|
err := commands.Seek(ctx, client, true)
|
||||||
|
@ -13,10 +13,11 @@ func init() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var volumeCmd = &cobra.Command{
|
var volumeCmd = &cobra.Command{
|
||||||
Use: "volume",
|
Use: "volume",
|
||||||
Short: "sets the volume",
|
Short: "sets the volume",
|
||||||
Args: cobra.MinimumNArgs(1),
|
Aliases: []string{"v"},
|
||||||
Long: `Sets the volume to the given percent [0-100] or increases/decreases by 5 percent if you say up or down`,
|
Args: cobra.MinimumNArgs(1),
|
||||||
|
Long: `Sets the volume to the given percent [0-100] or increases/decreases by 5 percent if you say up or down`,
|
||||||
RunE: func(cmd *cobra.Command, args []string) error {
|
RunE: func(cmd *cobra.Command, args []string) error {
|
||||||
if args[0] == "up" {
|
if args[0] == "up" {
|
||||||
err := commands.ChangeVolume(ctx, client, 5)
|
err := commands.ChangeVolume(ctx, client, 5)
|
||||||
|
Loading…
Reference in New Issue
Block a user