diff --git a/src/main/java/org/meteordev/meteorbot/command/Commands.java b/src/main/java/org/meteordev/meteorbot/command/Commands.java index 657ce79..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,19 +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 MonkyCommand()); + add(new PandaCommand()); + + add(new StatsCommand()); + if (MeteorBot.BACKEND_TOKEN != null) { + add(new LinkCommand()); + } List commandData = new ArrayList<>(); 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..ccc2d5e --- /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. Have a problem with the addon? Go ask the addon's devs."; + + 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(); + } +}