From 2fb6fbe6a3053213341a907b5a86a0cd092eb410 Mon Sep 17 00:00:00 2001 From: StNicolay Date: Sun, 7 May 2023 14:49:53 +0300 Subject: [PATCH] Added descriptions to the commands --- src/handlers/mod.rs | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/src/handlers/mod.rs b/src/handlers/mod.rs index 5715286..3ba0390 100644 --- a/src/handlers/mod.rs +++ b/src/handlers/mod.rs @@ -38,25 +38,28 @@ pub struct Handler { type PackagedHandler = Arc>>>; #[derive(BotCommands, Clone, Copy)] -#[command(rename_rule = "snake_case")] +#[command( + rename_rule = "snake_case", + description = "These commands are supported:" +)] enum Command { - #[command()] + #[command(description = "displays this text")] Help, - #[command()] - AddAccount, - #[command()] - GetAccount, - #[command()] - GetAccounts, - #[command()] + #[command(description = "sets the master password")] SetMasterPass, - #[command()] + #[command(description = "adds the account")] + AddAccount, + #[command(description = "gets the account")] + GetAccount, + #[command(description = "gets a list of accounts")] + GetAccounts, + #[command(description = "deletes the account")] Delete, - #[command()] + #[command(description = "deletes all the accounts and the master password")] DeleteAll, - #[command()] + #[command(description = "exports all the accounts in a json file")] Export, - #[command()] + #[command(description = "loads the accounts from a json file")] Import, }