add help command
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
andreas 2022-08-04 18:30:09 +02:00
parent 269630115b
commit 544705deb5
Signed by: andreas
GPG Key ID: D97194E55873280A

View File

@ -101,7 +101,9 @@ enum LeetCommand {
#[command(description = "get scores")] #[command(description = "get scores")]
Scores, Scores,
#[command(description = "get current time info")] #[command(description = "get current time info")]
Time Time,
#[command(description = "show help about leetbot")]
Help
} }
#[derive(Error,Debug)] #[derive(Error,Debug)]
@ -195,6 +197,9 @@ leet is at: {}, in {} seconds",
); );
bot.send_message(message.chat.id, msg).await?; bot.send_message(message.chat.id, msg).await?;
},
LeetCommand::Help => {
bot.send_message(message.chat.id, LeetCommand::descriptions().to_string()).await?;
} }
} }