aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/modules/commands/admins/config.rs8
-rw-r--r--src/modules/commands/general/fun.rs12
2 files changed, 10 insertions, 10 deletions
diff --git a/src/modules/commands/admins/config.rs b/src/modules/commands/admins/config.rs
index 926da7b..eedd087 100644
--- a/src/modules/commands/admins/config.rs
+++ b/src/modules/commands/admins/config.rs
@@ -80,8 +80,8 @@ impl Command for ConfigPrefix {
}
fn execute(&self, _: &mut Context, message: &Message, mut args: Args) -> Result<(), CommandError> {
- if message.content.to_lowercase().contains("@everyone") {
- message.channel_id.say("Sorry, but the prefix can't mention everyone.")?;
+ if !message.mentions.is_empty() {
+ message.channel_id.say("Sorry, but the prefix can't mention people.")?;
return Ok(());
}
@@ -459,8 +459,8 @@ impl Command for ConfigWelcome {
}
fn execute(&self, _: &mut Context, message: &Message, mut args: Args) -> Result<(), CommandError> {
- if message.content.to_lowercase().contains("@everyone") {
- message.channel_id.say("Try again, my welcome greeting can't mention everyone.")?;
+ if !message.mentions.is_empty() {
+ message.channel_id.say("Try again, my welcome greeting can't be initialized when it mentions someone!.")?;
return Ok(());
}
diff --git a/src/modules/commands/general/fun.rs b/src/modules/commands/general/fun.rs
index 55880b3..31deeeb 100644
--- a/src/modules/commands/general/fun.rs
+++ b/src/modules/commands/general/fun.rs
@@ -29,8 +29,8 @@ impl Command for Clapify {
}
fn execute(&self, _: &mut Context, message: &Message, args: Args) -> Result<(), CommandError> {
- if message.content.to_lowercase().contains("@everyone") {
- message.channel_id.say("I refuse to clap everyone!")?;
+ if !message.mentions.is_empty() {
+ message.channel_id.say("Sorry, but I can only clapify non-human things!")?;
return Ok(());
}
@@ -190,7 +190,7 @@ impl Command for Opinion {
}
fn execute(&self, _ctx: &mut Context, message: &Message, args: Args) -> Result<(), CommandError> {
- if message.content.to_lowercase().contains("@everyone") {
+ if message.mentions.len() > 1 {
message.channel_id.say("I can't give my opinion on everyone all at once!")?;
return Ok(());
}
@@ -222,7 +222,7 @@ impl Command for Rate {
}
fn execute(&self, _ctx: &mut Context, message: &Message, args: Args) -> Result<(), CommandError> {
- if message.content.to_lowercase().contains("@everyone") {
+ if message.mentions.len() > 1 {
message.channel_id.say("I can't rate everyone at once!")?;
return Ok(());
}
@@ -273,8 +273,8 @@ impl Command for Uwufy {
}
fn execute(&self, _: &mut Context, message: &Message, args: Args) -> Result<(), CommandError> {
- if message.content.to_lowercase().contains("@everyone") {
- message.channel_id.say("I seriously doubt everyone will be interested in \"uwufying\" something...")?;
+ if !message.mentions.is_empty() {
+ message.channel_id.say("Try again, but next time, don't tag anyone please.")?;
return Ok(());
}