From 53c4f463007445d6a98949e78c0381db00221aed Mon Sep 17 00:00:00 2001 From: tec <tec@ucc.gu.uwa.edu.au> Date: Sun, 19 Apr 2020 02:02:06 +0800 Subject: [PATCH] Recognise mobile bot mentions too --- src/main.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 2662609..9025699 100644 --- a/src/main.rs +++ b/src/main.rs @@ -60,7 +60,9 @@ impl EventHandler for Handler { // events can be dispatched simultaneously. fn message(&self, ctx: Context, msg: Message) { if !(msg.content.starts_with(&CONFIG.command_prefix)) { - if msg.content.contains(&format!("<@!{}>", CONFIG.bot_id)) { + if msg.content.contains(&format!("<@!{}>", CONFIG.bot_id)) // desktop mentions + || msg.content.contains(&format!("<@{}>", CONFIG.bot_id)) // mobile mentions + { send_message!( msg.channel_id, &ctx.http, -- GitLab