From 69d4887cdb569fb55201331360cad25ca6219b63 Mon Sep 17 00:00:00 2001 From: LinlyBoi Date: Sat, 6 Aug 2022 23:20:53 +0200 Subject: [PATCH] Some bugs fixed --- src/main.rs | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/src/main.rs b/src/main.rs index 9e4340a..84ccea2 100644 --- a/src/main.rs +++ b/src/main.rs @@ -15,17 +15,8 @@ impl EventHandler for Handler { // Event handlers are dispatched through a threadpool, and so multiple // events can be dispatched simultaneously. async fn message(&self, ctx: Context, msg: Message) { - if msg.content == "!ping" { - // Sending a message can fail, due to a network error, an - // authentication error, or lack of permissions to post in the - // channel, so log to stdout when some error happens, with a - // description of it. - if let Err(why) = msg.channel_id.say(&ctx.http, "Pong!").await - { - println!("Error sending message: {:?}", why); - } - } - else if msg.content == "hello" { + + if msg.content == "hello" { // Sending a message can fail, due to a network error, an // authentication error, or lack of permissions to post in the // channel, so log to stdout when some error happens, with a