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
33
34
35
36
37
|
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,
AllowLeadingHyphen]",)
)]
pub enum Command {
/// Adds url to playlist
Add { url: String },
/// Adds the first video found on YouTube
Search { query: Vec<String> },
/// Starts audio playback
Play,
/// Pauses audio playback
Pause,
/// Seeks by a specified amount
Seek { amount: String },
/// 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,
}
|