Skip to content
Snippets Groups Projects
Unverified Commit 53c4f463 authored by tec's avatar tec
Browse files

Recognise mobile bot mentions too

parent 4f56a078
Branches
Tags
No related merge requests found
...@@ -60,7 +60,9 @@ impl EventHandler for Handler { ...@@ -60,7 +60,9 @@ impl EventHandler for Handler {
// events can be dispatched simultaneously. // events can be dispatched simultaneously.
fn message(&self, ctx: Context, msg: Message) { fn message(&self, ctx: Context, msg: Message) {
if !(msg.content.starts_with(&CONFIG.command_prefix)) { 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!( send_message!(
msg.channel_id, msg.channel_id,
&ctx.http, &ctx.http,
......
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