Unverified Commit 53c4f463 authored by tec's avatar tec

Recognise mobile bot mentions too

parent 4f56a078
......@@ -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,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment