diff options
Diffstat (limited to 'src/modules/commands/admins')
| -rw-r--r-- | src/modules/commands/admins/config.rs | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/modules/commands/admins/config.rs b/src/modules/commands/admins/config.rs index eedd087..c3a0252 100644 --- a/src/modules/commands/admins/config.rs +++ b/src/modules/commands/admins/config.rs @@ -80,9 +80,9 @@ impl Command for ConfigPrefix { } fn execute(&self, _: &mut Context, message: &Message, mut args: Args) -> Result<(), CommandError> { - if !message.mentions.is_empty() { - message.channel_id.say("Sorry, but the prefix can't mention people.")?; - return Ok(()); + if check_mentions(message) { + message.channel_id.say(MENTION_FAIL)?; + return Ok(()) } if let Some(guild_id) = message.guild_id { @@ -91,10 +91,10 @@ impl Command for ConfigPrefix { guild_data.prefix = pre; match db.update_guild(guild_id.0 as i64, guild_data) { Ok(guild) => { - message.channel_id.say(format!("Set prefix to {}", guild.prefix))?; + message.channel_id.say(format!("Set guild prefix to `{}`.", guild.prefix))?; }, Err(_) => { - message.channel_id.say("Failed to change prefix")?; + message.channel_id.say("Unexpected error while changing prefix.")?; }, } } else { @@ -249,7 +249,7 @@ impl Command for ConfigMod { fn options(&self) -> Arc<CommandOptions> { let default = CommandOptions::default(); let options = CommandOptions { - desc: Some("Welcome to moderation!".to_string()), + desc: Some("Configure the moderation log, superstitious much.".to_string()), usage: Some("<add|remove> <role_resolvable>".to_string()), example: Some("add staff".to_string()), min_args: Some(2), @@ -459,9 +459,9 @@ impl Command for ConfigWelcome { } fn execute(&self, _: &mut Context, message: &Message, mut args: Args) -> Result<(), CommandError> { - if !message.mentions.is_empty() { - message.channel_id.say("Try again, my welcome greeting can't be initialized when it mentions someone!.")?; - return Ok(()); + if check_mentions(message) { + message.channel_id.say(MENTION_FAIL)?; + return Ok(()) } if let Some(guild_id) = message.guild_id { |