mirror of
https://github.com/teloxide/teloxide.git
synced 2024-12-22 14:35:36 +01:00
Add alias
, aliases
and hide_aliases
to examples
This commit is contained in:
parent
67670e19d3
commit
232c9c7d77
1 changed files with 3 additions and 1 deletions
|
@ -15,11 +15,13 @@ async fn main() {
|
||||||
#[command(rename_rule = "lowercase")]
|
#[command(rename_rule = "lowercase")]
|
||||||
enum Command {
|
enum Command {
|
||||||
/// Display this text.
|
/// Display this text.
|
||||||
|
#[command(aliases = ["h", "?"])]
|
||||||
Help,
|
Help,
|
||||||
/// Handle a username.
|
/// Handle a username.
|
||||||
|
#[command(alias = "u")]
|
||||||
Username(String),
|
Username(String),
|
||||||
/// Handle a username and an age.
|
/// Handle a username and an age.
|
||||||
#[command(parse_with = "split")]
|
#[command(parse_with = "split", alias = "ua", hide_aliases)]
|
||||||
UsernameAndAge { username: String, age: u8 },
|
UsernameAndAge { username: String, age: u8 },
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue