From e031eb1532217a8b406d59988f415fabbddb05a8 Mon Sep 17 00:00:00 2001 From: GregTCLTK Date: Sat, 14 Mar 2020 15:28:16 +0100 Subject: [PATCH] Fix help stuff --- .../hadder/commands/misc/MoveAllCommand.java | 27 ++++++++++++------- .../Translations/Translations_en.properties | 1 + 2 files changed, 18 insertions(+), 10 deletions(-) diff --git a/src/main/java/com/bbn/hadder/commands/misc/MoveAllCommand.java b/src/main/java/com/bbn/hadder/commands/misc/MoveAllCommand.java index bf8fc95..d6e84f7 100644 --- a/src/main/java/com/bbn/hadder/commands/misc/MoveAllCommand.java +++ b/src/main/java/com/bbn/hadder/commands/misc/MoveAllCommand.java @@ -1,5 +1,17 @@ /* - * @author Hax / Hax6775 / Schlauer_Hax + * Copyright 2019-2020 GregTCLTK and Schlauer-Hax + * + * Licensed under the GNU Affero General Public License, Version 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.gnu.org/licenses/agpl-3.0.en.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.bbn.hadder.commands.misc; @@ -9,10 +21,7 @@ import com.bbn.hadder.commands.CommandEvent; import com.bbn.hadder.core.Perm; import com.bbn.hadder.core.Perms; import net.dv8tion.jda.api.EmbedBuilder; -import net.dv8tion.jda.api.Permission; -import net.dv8tion.jda.api.entities.Member; -import java.util.ArrayList; import java.util.Objects; public class MoveAllCommand implements Command { @@ -29,24 +38,22 @@ public class MoveAllCommand implements Command { ); e.getChannel().sendMessage(new EmbedBuilder().setTitle("Successfully Moved!").setDescription("I moved " + count + " Members. Have fun!").build()).queue(); - } else { - e.getHelpCommand().sendHelp(this, e); - } + } else e.getHelpCommand().sendHelp(this, e); } @Override public String[] labels() { - return new String[]{"moveall", "move-all"}; + return new String[]{"moveall", "move-all", "ma"}; } @Override public String description() { - return "Moves All users in channel1 to channel2"; + return "commands.misc.moveall.help.description"; } @Override public String usage() { - return "[channel1] [channel2]"; + return "[source-channel] [target-channel]"; } @Override diff --git a/src/main/resources/Translations/Translations_en.properties b/src/main/resources/Translations/Translations_en.properties index 01d2f6e..0ccc653 100644 --- a/src/main/resources/Translations/Translations_en.properties +++ b/src/main/resources/Translations/Translations_en.properties @@ -98,6 +98,7 @@ commands.misc.code.success.description = This message contains some information commands.misc.code.error.title = Code not found commands.misc.code.error.description = I can't find the specified invite code. commands.misc.code.help.description = Shows information about a invite code. +commands.misc.moveall.help.description = Moves all users in the source channel to the target channel. commands.moderation.ban.success.title = Successfully banned commands.moderation.ban.success.description = I successfully baned %extra%