mirror of
https://github.com/teloxide/teloxide.git
synced 2024-12-22 06:25:10 +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")]
|
||||
enum Command {
|
||||
/// Display this text.
|
||||
#[command(aliases = ["h", "?"])]
|
||||
Help,
|
||||
/// Handle a username.
|
||||
#[command(alias = "u")]
|
||||
Username(String),
|
||||
/// Handle a username and an age.
|
||||
#[command(parse_with = "split")]
|
||||
#[command(parse_with = "split", alias = "ua", hide_aliases)]
|
||||
UsernameAndAge { username: String, age: u8 },
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue