From 544705deb56c721e275802763c93171f03f22062 Mon Sep 17 00:00:00 2001 From: Andreas Larsen Date: Thu, 4 Aug 2022 18:30:09 +0200 Subject: [PATCH] add help command --- src/main.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 95b1ded..2a0874d 100644 --- a/src/main.rs +++ b/src/main.rs @@ -101,7 +101,9 @@ enum LeetCommand { #[command(description = "get scores")] Scores, #[command(description = "get current time info")] - Time + Time, + #[command(description = "show help about leetbot")] + Help } #[derive(Error,Debug)] @@ -195,6 +197,9 @@ leet is at: {}, in {} seconds", ); bot.send_message(message.chat.id, msg).await?; + }, + LeetCommand::Help => { + bot.send_message(message.chat.id, LeetCommand::descriptions().to_string()).await?; } }