From 8c5b1d3db097d54b9d647e3aab55f798c7f7be71 Mon Sep 17 00:00:00 2001 From: Temirkhan Myrzamadi Date: Fri, 14 Feb 2020 03:48:26 +0600 Subject: [PATCH] Fix examples/simple_commands_bot --- examples/simple_commands_bot/src/main.rs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/examples/simple_commands_bot/src/main.rs b/examples/simple_commands_bot/src/main.rs index 24a73158..20ceebbc 100644 --- a/examples/simple_commands_bot/src/main.rs +++ b/examples/simple_commands_bot/src/main.rs @@ -18,12 +18,18 @@ async fn handle_command( ) -> Result<(), RequestError> { let text = match ctx.update.text() { Some(text) => text, - None => return Ok(()), + None => { + log::info!("Received a message, but not text."); + return Ok(()); + } }; let command = match Command::parse(text) { Some((command, _)) => command, - None => return Ok(()), + None => { + log::info!("Received a text message, but not a command."); + return Ok(()); + } }; match command {