From 271f44a9facad2c767d67969fb96eb07688c2876 Mon Sep 17 00:00:00 2001 From: Nilstrieb Date: Sun, 2 May 2021 22:55:18 +0200 Subject: [PATCH] small changes --- config.toml | 3 +++ src/lib.rs | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/config.toml b/config.toml index 58a2a30..d77aef4 100644 --- a/config.toml +++ b/config.toml @@ -1,3 +1,5 @@ +# if a message contains the keyword on the left, w i d e t o m will react with the emote on the right +# the emote name has to be the keyword emotes = [ ["conny", 838137360667508786], ["rene", 832636011917606912], @@ -5,4 +7,5 @@ emotes = [ ["nick", 816429590687776839], ["nils", 816429379654516796], ["tom", 811324632082415626], + ["thomas", 803607136000802827], ] \ No newline at end of file diff --git a/src/lib.rs b/src/lib.rs index 25733a1..af06764 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -29,12 +29,12 @@ lazy_static! { #[hook] pub async fn normal_message(ctx: &Context, msg: &Message) { - if msg.content == "tom" { + if msg.content.to_lowercase() == "tom" { reply(" <:tom:811324632082415626>", &msg, &ctx).await; } for (name, id) in REACTION_EMOTES.iter() { - if msg.content.contains(name) { + if msg.content.to_lowercase().contains(name) { if let Err(why) = msg.react(&ctx.http, ReactionType::Custom { animated: false, id: *id,