From c1fdacd46d01ddb9d41300c4c16ee94781d6e685 Mon Sep 17 00:00:00 2001 From: GregTCLTK Date: Wed, 25 Dec 2019 00:39:14 +0100 Subject: [PATCH] Custom error message for #245 --- .../java/com/bbn/hadder/commands/moderation/RulesCommand.java | 4 +++- src/main/resources/Translations/Translations_en.properties | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/bbn/hadder/commands/moderation/RulesCommand.java b/src/main/java/com/bbn/hadder/commands/moderation/RulesCommand.java index 78db7b3..f05e1c2 100644 --- a/src/main/java/com/bbn/hadder/commands/moderation/RulesCommand.java +++ b/src/main/java/com/bbn/hadder/commands/moderation/RulesCommand.java @@ -96,7 +96,9 @@ public class RulesCommand implements Command { }, event.getJDA(), event.getAuthor()); }, event.getJDA(), event.getAuthor()); } else { - event.getTextChannel().sendMessage(event.getMessageEditor().getMessage(MessageEditor.MessageType.NO_SELF_PERMISSION) + event.getTextChannel().sendMessage(event.getMessageEditor().getMessage(MessageEditor.MessageType.ERROR, + "commands.moderation.rules.error.message.title", + "commands.moderation.rules.error.message.description") .build()).queue(); } } else { diff --git a/src/main/resources/Translations/Translations_en.properties b/src/main/resources/Translations/Translations_en.properties index ea4def7..81fb255 100644 --- a/src/main/resources/Translations/Translations_en.properties +++ b/src/main/resources/Translations/Translations_en.properties @@ -155,6 +155,8 @@ commands.moderation.rules.emote.error.equal.title = Emotes are equal commands.moderation.rules.emote.error.equal.description = The 1st and 2nd emote equals each other. commands.moderation.rules.emoji.decline.description = The first emote has been successfully set. Please send me now the decline emote. commands.moderation.rules.emoji.error.description = The given emote can't be used. +commands.moderation.rules.error.message.title = Can't write messages +commands.moderation.rules.error.message.description = I can not write messages in the specified channel commands.moderation.rules.help.description = Setup the rules on your Discord server commands.moderation.starboard.success.title = Successfully set the Channel\!