diff --git a/src/main/java/com/github/nilstrieb/commands/info/EvalCommand.java b/src/main/java/com/github/nilstrieb/commands/info/EvalCommand.java index 036942d..9842bac 100644 --- a/src/main/java/com/github/nilstrieb/commands/info/EvalCommand.java +++ b/src/main/java/com/github/nilstrieb/commands/info/EvalCommand.java @@ -26,17 +26,11 @@ public class EvalCommand extends Command { case "help" -> { EmbedBuilder builder = Config.getDefaultEmbed() .setTitle("Bot Admin only") - .addField("shutdown", "shutdown the bot", false) .addField("triviadump", "Get JSON", false) .addField("triviaset", "Set JSON. Make sure to backup the JSON beforehand with `triviadump`", false) - .addField("reloadtrivia", "Reload the new trivia File", false) - .addField("jar", "Upload a new jar file", false); + .addField("reloadtrivia", "Reload the new trivia File", false); reply(builder.build()); } - case "shutdown" -> { - reply("Shutting down KilluaBot..."); - System.exit(0); - } case "triviadump" -> { File f = TriviaQuestionData.getFile(); event.getTextChannel().sendMessage("Trivia Questions JSON File:").addFile(f).queue(); @@ -53,22 +47,6 @@ public class EvalCommand extends Command { TriviaQuestionData.reload(); reply("Reloaded Trivia Questions"); } - case "jar" -> { - List attachments = event.getMessage().getAttachments(); - if (attachments.size() > 0) { - try { - attachments.get(0).downloadToFile( - new File(EvalCommand.class.getProtectionDomain().getCodeSource() - .getLocation().toURI())).thenRun(() -> { - reply("Downloaded jar file"); - }); - } catch (URISyntaxException e) { - reply("Error: " + e.getMessage()); - } - } else { - reply("JSON File not found"); - } - } default -> { reply("Command is invalid."); } diff --git a/src/main/java/com/github/nilstrieb/commands/info/InviteCommand.java b/src/main/java/com/github/nilstrieb/commands/info/InfoCommand.java similarity index 72% rename from src/main/java/com/github/nilstrieb/commands/info/InviteCommand.java rename to src/main/java/com/github/nilstrieb/commands/info/InfoCommand.java index 55f3ea1..a4e1aef 100644 --- a/src/main/java/com/github/nilstrieb/commands/info/InviteCommand.java +++ b/src/main/java/com/github/nilstrieb/commands/info/InfoCommand.java @@ -6,12 +6,14 @@ import net.dv8tion.jda.api.EmbedBuilder; import net.dv8tion.jda.api.entities.User; -public class InviteCommand extends Command { +public class InfoCommand extends Command { + private static final String INVITE_LINK = "(https://discord.com/api/oauth2/authorize?client_id=801015254023798825&permissions=8&scope=bot)"; + private static final String GH_LINK = "(https://github.com/Nilstrieb/KilluaBot)"; - public InviteCommand() { - super("invite", "Get the invite link for this bot"); + public InfoCommand() { + super("info", "Get info about this bot"); } @Override @@ -23,8 +25,9 @@ public class InviteCommand extends Command { } EmbedBuilder builder = Config.getDefaultEmbed() - .setTitle("Invite Killua to your server!") + .setTitle("Killua Info!") .addField("Invite link", "[Invite]" + INVITE_LINK, true) + .addField("Source code", "[Github (messy)]" + GH_LINK, true) .setFooter("This bot was made by " + nils.getAsTag(), nils.getAvatarUrl()); reply(builder.build()); } diff --git a/src/main/java/com/github/nilstrieb/core/Main.java b/src/main/java/com/github/nilstrieb/core/Main.java index c7d3505..ccae924 100644 --- a/src/main/java/com/github/nilstrieb/core/Main.java +++ b/src/main/java/com/github/nilstrieb/core/Main.java @@ -5,7 +5,7 @@ import com.github.nilstrieb.commands.fun.*; import com.github.nilstrieb.commands.fun.trivia.TriviaCommand; import com.github.nilstrieb.commands.info.EvalCommand; import com.github.nilstrieb.commands.info.HelpCommand; -import com.github.nilstrieb.commands.info.InviteCommand; +import com.github.nilstrieb.commands.info.InfoCommand; import com.github.nilstrieb.commands.util.EmoteAddCommand; import com.github.nilstrieb.core.command.CommandListener; import com.github.nilstrieb.core.reactions.ReactionEventListener; @@ -83,7 +83,7 @@ public class Main { new HelpCommand(); new EvalCommand(); new SayCommand(); - new InviteCommand(); + new InfoCommand(); new QuoteCommand(); new DepartureCommand(); new TriviaCommand();