aboutsummaryrefslogtreecommitdiffstats
path: root/src/command.rs
blob: 3a392903981dc160b43a4a25e0841864c93df6e3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
use structopt::clap::AppSettings::*;
use structopt::StructOpt;

#[derive(StructOpt, Debug)]
#[structopt(
    rename_all = "kebab-case",
    template = "{subcommands}",
    raw(global_settings = "&[VersionlessSubcommands,
                            DisableHelpFlags,
                            DisableVersion,
                            ColorNever,
                            NoBinaryName]",)
)]
pub enum Command {
    /// Adds url to playlist
    Add { url: String },
    /// Starts audio playback
    Play,
    /// Pauses audio playback
    Pause,
    /// Stops audio playback
    Stop,
    /// Switches to the next queue entry
    #[structopt(alias = "skip")]
    Next,
    /// Clears the playback queue
    Clear,
    /// Changes the volume to the specified value
    Volume { percent: f64 },
    /// Leaves the channel
    Leave,
}