From 232c9c7d773aa43d414064f3eb43ade7e2a9e652 Mon Sep 17 00:00:00 2001 From: TheAwiteb Date: Mon, 25 Sep 2023 21:12:27 +0300 Subject: [PATCH] Add `alias`, `aliases` and `hide_aliases` to examples --- crates/teloxide/examples/command.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/teloxide/examples/command.rs b/crates/teloxide/examples/command.rs index c1dc2d94..1a460b8a 100644 --- a/crates/teloxide/examples/command.rs +++ b/crates/teloxide/examples/command.rs @@ -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 }, }