diff options
| author | Fuwn <[email protected]> | 2020-11-03 14:01:27 -0800 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2020-11-03 14:01:27 -0800 |
| commit | 47d50f79dd941e178055a85fa1dddae3430061ea (patch) | |
| tree | f3355112bc40e6d75adc6abb7b1584ff657f3ace /src/modules/commands/general/fun.rs | |
| parent | refactor, chore, feat (desc) (diff) | |
| download | dep-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/commands/general/fun.rs')
| -rw-r--r-- | src/modules/commands/general/fun.rs | 15 |
1 files changed, 15 insertions, 0 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(); |