diff --git a/discordbot/src/main/java/zone/themcgamer/discordbot/command/impl/AddReactionToMessageCommand.java b/discordbot/src/main/java/zone/themcgamer/discordbot/command/impl/AddReactionToMessageCommand.java index 7b39ec9..d6c2b2c 100644 --- a/discordbot/src/main/java/zone/themcgamer/discordbot/command/impl/AddReactionToMessageCommand.java +++ b/discordbot/src/main/java/zone/themcgamer/discordbot/command/impl/AddReactionToMessageCommand.java @@ -16,7 +16,7 @@ import java.util.List; public class AddReactionToMessageCommand extends BaseCommand { public AddReactionToMessageCommand() { name = "addreaction"; - aliases = new String[]{"react"}; + aliases = new String[] { "react" }; help = "Edit a message from the bot."; arguments = " "; userPermissions = new Permission[] { Permission.ADMINISTRATOR }; diff --git a/discordbot/src/main/java/zone/themcgamer/discordbot/command/impl/EditMessageCommand.java b/discordbot/src/main/java/zone/themcgamer/discordbot/command/impl/EditMessageCommand.java index f3f3fc7..bbc0906 100644 --- a/discordbot/src/main/java/zone/themcgamer/discordbot/command/impl/EditMessageCommand.java +++ b/discordbot/src/main/java/zone/themcgamer/discordbot/command/impl/EditMessageCommand.java @@ -16,7 +16,7 @@ import java.util.List; public class EditMessageCommand extends BaseCommand { public EditMessageCommand() { name = "edit"; - aliases = new String[]{"editmessage"}; + aliases = new String[] { "editmessage" }; help = "Edit a message from the bot."; arguments = " <description>"; userPermissions = new Permission[] { Permission.ADMINISTRATOR }; diff --git a/discordbot/src/main/java/zone/themcgamer/discordbot/command/impl/InviteCommand.java b/discordbot/src/main/java/zone/themcgamer/discordbot/command/impl/InviteCommand.java index b46bd33..3df10aa 100644 --- a/discordbot/src/main/java/zone/themcgamer/discordbot/command/impl/InviteCommand.java +++ b/discordbot/src/main/java/zone/themcgamer/discordbot/command/impl/InviteCommand.java @@ -10,9 +10,10 @@ import java.util.List; import java.util.concurrent.TimeUnit; public class InviteCommand extends BaseCommand { + public InviteCommand() { name = "invite"; - aliases = new String[] { "createinvite" }; + aliases = new String[]{"createinvite"}; help = "Create invite link via the bot"; guildOnly = true; guilds = Collections.singletonList(zone.themcgamer.discordbot.guild.Guild.MAIN); @@ -21,6 +22,7 @@ public class InviteCommand extends BaseCommand { @Override protected void execute(CommandEvent event, List<String> args) { Guild guild = event.getGuild(); + TextChannel textChannelById = guild.getTextChannelById(791015530001596456L); if (textChannelById == null) return; @@ -29,8 +31,12 @@ public class InviteCommand extends BaseCommand { .setTemporary(true).queue(inviteLink -> { event.getMember().getUser().openPrivateChannel().queue(privateChannel -> { privateChannel.sendMessage("I have generated an invite link for you! This invite link will work for 24 hours! " + inviteLink.getUrl()).queue(); - event.reply("Check your DMs!"); - }, error -> event.replyError("Could not sent you a dm!")); - }, error -> event.replyError("Couldn't create an invite link due to an error!")); + event.reply("Check your dm's!"); + }, error -> { + event.replyError("Could not sent you a dm!"); + }); }, error -> { + event.replyError("Coulnd't create an invite link due an error!"); + }); + } } \ No newline at end of file diff --git a/discordbot/src/main/java/zone/themcgamer/discordbot/command/impl/MessageCommand.java b/discordbot/src/main/java/zone/themcgamer/discordbot/command/impl/MessageCommand.java index 531c83b..b109f68 100644 --- a/discordbot/src/main/java/zone/themcgamer/discordbot/command/impl/MessageCommand.java +++ b/discordbot/src/main/java/zone/themcgamer/discordbot/command/impl/MessageCommand.java @@ -12,7 +12,6 @@ import java.util.Arrays; import java.util.List; public class MessageCommand extends BaseCommand { - public MessageCommand() { name = "message"; aliases = new String[] { "say" }; @@ -36,4 +35,4 @@ public class MessageCommand extends BaseCommand { embedBuilder.setDescription(event.getMessage().getContentRaw().replace(args.get(1), "").replace("." + args.get(0), "")); event.getChannel().sendMessage(embedBuilder.build()).queue(); } -} +} \ No newline at end of file diff --git a/discordbot/src/main/java/zone/themcgamer/discordbot/utilities/GuildUtils.java b/discordbot/src/main/java/zone/themcgamer/discordbot/utilities/GuildUtils.java index a849d30..04ed4cf 100644 --- a/discordbot/src/main/java/zone/themcgamer/discordbot/utilities/GuildUtils.java +++ b/discordbot/src/main/java/zone/themcgamer/discordbot/utilities/GuildUtils.java @@ -41,7 +41,7 @@ public class GuildUtils { }, error -> { EmbedBuilder embedBuilder = EmbedUtils.successEmbed(); embedBuilder.setTitle("Role Manager"); - embedBuilder.setDescription("Succesfully toggled " + role.getName() + " " + (!member.getRoles().contains(role) ? "On" : "Off")); + embedBuilder.setDescription("Successfully toggled " + role.getName() + " " + (!member.getRoles().contains(role) ? "On" : "Off")); TextChannel textChannelById = guild.getTextChannelById(813139125195898880L); if (textChannelById == null) return;