aboutsummaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorFuwn <[email protected]>2020-11-03 14:01:27 -0800
committerFuwn <[email protected]>2020-11-03 14:01:27 -0800
commit47d50f79dd941e178055a85fa1dddae3430061ea (patch)
treef3355112bc40e6d75adc6abb7b1584ff657f3ace /src/modules
parentrefactor, chore, feat (desc) (diff)
downloaddep-core-next-47d50f79dd941e178055a85fa1dddae3430061ea.tar.xz
dep-core-next-47d50f79dd941e178055a85fa1dddae3430061ea.zip
fix: (urbandict to nsfw), (clapify, uwufy, and rate return if mention everyone)
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/commands/general/fun.rs15
-rw-r--r--src/modules/commands/general/mod.rs2
2 files changed, 16 insertions, 1 deletions
diff --git a/src/modules/commands/general/fun.rs b/src/modules/commands/general/fun.rs
index 99d8ffb..86be4fe 100644
--- a/src/modules/commands/general/fun.rs
+++ b/src/modules/commands/general/fun.rs
@@ -29,6 +29,11 @@ impl Command for Clapify {
}
fn execute(&self, _: &mut Context, message: &Message, args: Args) -> Result<(), CommandError> {
+ if message.mention_everyone {
+ message.channel_id.say("Hmm, that message mentions everyone, try again, but this time, be nice.")?;
+ return Ok(());
+ }
+
let to_say = args;
let clapped = to_say.replace(" ", "🙏");
message.channel_id.say(clapped)?;
@@ -213,6 +218,11 @@ impl Command for Rate {
}
fn execute(&self, _ctx: &mut Context, message: &Message, args: Args) -> Result<(), CommandError> {
+ if message.mention_everyone {
+ message.channel_id.say("Hmm, that message mentions everyone, try again, but this time, be nice.")?;
+ return Ok(());
+ }
+
let random = thread_rng().gen_range(1, 10);
// TODO: Make this an embed eventually.
message.channel_id.say(format!(
@@ -259,6 +269,11 @@ impl Command for Uwufy {
}
fn execute(&self, _: &mut Context, message: &Message, args: Args) -> Result<(), CommandError> {
+ if message.mention_everyone {
+ message.channel_id.say("Hmm, that message mentions everyone, try again, but this time, be nice.")?;
+ return Ok(());
+ }
+
let to_say = args;
let r_re = Regex::new(r"/(?:l|r)/g").unwrap();
diff --git a/src/modules/commands/general/mod.rs b/src/modules/commands/general/mod.rs
index 33c97d0..7a5ea12 100644
--- a/src/modules/commands/general/mod.rs
+++ b/src/modules/commands/general/mod.rs
@@ -44,7 +44,6 @@ pub fn init_fun() -> CreateGroup {
.cmd("joke", DadJoke)
// .cmd("opinion", Opinion)
.cmd("rate", Rate)
- .cmd("urbandictionary", UrbanDictionary)
.cmd("f", PayRespects)
.cmd("8ball", EightBall)
.cmd("uwufy", Uwufy)
@@ -80,6 +79,7 @@ pub fn init_nsfw() -> CreateGroup {
false
}})
.cmd("e621", Furry)
+ .cmd("urbandictionary", UrbanDictionary)
}
/* pub fn init_roles() -> CreateGroup {