From 5bc72bbd505e9062ae076980deccdee0e8be8d79 Mon Sep 17 00:00:00 2001 From: ridglef <126202739+ridglef@users.noreply.github.com> Date: Fri, 3 Mar 2023 06:10:18 -0500 Subject: [PATCH 1/4] Create AddonCommand.java --- .../command/commands/AddonCommand.java | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 src/main/java/org/meteordev/meteorbot/command/commands/AddonCommand.java diff --git a/src/main/java/org/meteordev/meteorbot/command/commands/AddonCommand.java b/src/main/java/org/meteordev/meteorbot/command/commands/AddonCommand.java new file mode 100644 index 0000000..18f5432 --- /dev/null +++ b/src/main/java/org/meteordev/meteorbot/command/commands/AddonCommand.java @@ -0,0 +1,28 @@ +package org.meteordev.meteorbot.command.commands; + +import net.dv8tion.jda.api.entities.Member; +import net.dv8tion.jda.api.events.interaction.command.SlashCommandInteractionEvent; +import net.dv8tion.jda.api.interactions.commands.OptionType; +import net.dv8tion.jda.api.interactions.commands.build.SlashCommandData; +import org.meteordev.meteorbot.command.Command; + +public class AddonCommand extends Command { + private static final String message = "You can get addons from https://anticope.ml/addons? \n To install addons you place their jar file in your mods folder alongside meteor client. You can use multiple addons however they may have incompatibilities. \n What does this addon do? Ask the addon's devs not us, we dont make them."; + + public AddonCommand() { + super("addons", "to install addons"); + } + + @Override + public SlashCommandData build(SlashCommandData data) { + return data.addOption(OptionType.USER, "member", "The member to ping.", true); + } + + @Override + public void run(SlashCommandInteractionEvent event) { + Member member = parseMember(event); + if (member == null) return; + + event.reply("%s %s".formatted(member.getAsMention(), message)).queue(); + } +} From 773e96ea2dee4bf7c94fe47fc5dcad8bf721d0e3 Mon Sep 17 00:00:00 2001 From: ridglef <126202739+ridglef@users.noreply.github.com> Date: Fri, 3 Mar 2023 06:11:19 -0500 Subject: [PATCH 2/4] Update Commands.java --- src/main/java/org/meteordev/meteorbot/command/Commands.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/org/meteordev/meteorbot/command/Commands.java b/src/main/java/org/meteordev/meteorbot/command/Commands.java index 657ce79..bc9dc84 100644 --- a/src/main/java/org/meteordev/meteorbot/command/Commands.java +++ b/src/main/java/org/meteordev/meteorbot/command/Commands.java @@ -36,6 +36,7 @@ public void onReady(@NotNull ReadyEvent event) { add(new CapyCommand()); add(new PandaCommand()); add(new DogCommand()); + add(new AddonCommand()); List commandData = new ArrayList<>(); From 3f20f75a0d4543f54b9ca042acf3c5b14124dc67 Mon Sep 17 00:00:00 2001 From: ridglef <126202739+ridglef@users.noreply.github.com> Date: Sat, 22 Apr 2023 09:00:15 -0400 Subject: [PATCH 3/4] fix conflicts --- .../meteordev/meteorbot/command/Commands.java | 37 ++++++++++++++----- 1 file changed, 27 insertions(+), 10 deletions(-) diff --git a/src/main/java/org/meteordev/meteorbot/command/Commands.java b/src/main/java/org/meteordev/meteorbot/command/Commands.java index bc9dc84..2609289 100644 --- a/src/main/java/org/meteordev/meteorbot/command/Commands.java +++ b/src/main/java/org/meteordev/meteorbot/command/Commands.java @@ -7,7 +7,17 @@ import net.dv8tion.jda.internal.interactions.CommandDataImpl; import org.jetbrains.annotations.NotNull; import org.meteordev.meteorbot.MeteorBot; -import org.meteordev.meteorbot.command.commands.*; +import org.meteordev.meteorbot.command.commands.LinkCommand; +import org.meteordev.meteorbot.command.commands.StatsCommand; +import org.meteordev.meteorbot.command.commands.help.FaqCommand; +import org.meteordev.meteorbot.command.commands.help.InstallationCommand; +import org.meteordev.meteorbot.command.commands.help.LogsCommand; +import org.meteordev.meteorbot.command.commands.help.OldVersionCommand; +import org.meteordev.meteorbot.command.commands.moderation.BanCommand; +import org.meteordev.meteorbot.command.commands.moderation.CloseCommand; +import org.meteordev.meteorbot.command.commands.moderation.MuteCommand; +import org.meteordev.meteorbot.command.commands.moderation.UnmuteCommand; +import org.meteordev.meteorbot.command.commands.silly.*; import java.util.ArrayList; import java.util.HashMap; @@ -23,20 +33,27 @@ public static void add(Command command) { @Override public void onReady(@NotNull ReadyEvent event) { - add(new CatCommand()); - add(new MonkyCommand()); - add(new StatsCommand()); - if (MeteorBot.BACKEND_TOKEN != null) add(new LinkCommand()); - add(new MuteCommand()); - add(new UnmuteCommand()); - add(new LogsCommand()); add(new FaqCommand()); add(new InstallationCommand()); + add(new LogsCommand()); add(new OldVersionCommand()); + add(new AddonCommand()) + + add(new BanCommand()); + add(new CloseCommand()); + add(new MuteCommand()); + add(new UnmuteCommand()); + add(new CapyCommand()); - add(new PandaCommand()); + add(new CatCommand()); add(new DogCommand()); - add(new AddonCommand()); + add(new MonkyCommand()); + add(new PandaCommand()); + + add(new StatsCommand()); + if (MeteorBot.BACKEND_TOKEN != null) { + add(new LinkCommand()); + } List commandData = new ArrayList<>(); From 2952187a5b9f5572a9bfa93b460b6ffe545e5e1d Mon Sep 17 00:00:00 2001 From: ridglef <126202739+ridglef@users.noreply.github.com> Date: Sat, 22 Apr 2023 09:03:21 -0400 Subject: [PATCH 4/4] Update AddonCommand.java --- .../org/meteordev/meteorbot/command/commands/AddonCommand.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/meteordev/meteorbot/command/commands/AddonCommand.java b/src/main/java/org/meteordev/meteorbot/command/commands/AddonCommand.java index 18f5432..ccc2d5e 100644 --- a/src/main/java/org/meteordev/meteorbot/command/commands/AddonCommand.java +++ b/src/main/java/org/meteordev/meteorbot/command/commands/AddonCommand.java @@ -7,7 +7,7 @@ import org.meteordev.meteorbot.command.Command; public class AddonCommand extends Command { - private static final String message = "You can get addons from https://anticope.ml/addons? \n To install addons you place their jar file in your mods folder alongside meteor client. You can use multiple addons however they may have incompatibilities. \n What does this addon do? Ask the addon's devs not us, we dont make them."; + private static final String message = "You can get addons from https://anticope.ml/addons? \n To install addons you place their jar file in your mods folder alongside meteor client. You can use multiple addons however they may have incompatibilities. \n What does this addon do? Ask the addon's devs not us, we dont make them. Have a problem with the addon? Go ask the addon's devs."; public AddonCommand() { super("addons", "to install addons");