Merge pull request #13 from nickreesdev/master
Discord Bot: Fixed an issue with the panel not properly marking the server hosting the bot as RUNNING. Also fixed a few wording issues and cleaned up some things.
This commit is contained in:
commit
e916aa1861
@ -25,5 +25,5 @@ public class BotConstants {
|
||||
|
||||
// Channels
|
||||
public static final String HAROLD_LOG = "813151182758608936";
|
||||
public static final String SUGGESTIONS = "802304706701426730"; // TODO: 2/15/2021 Change this to the main guild's suggestions channel when the bot is on the main guild.
|
||||
public static final String SUGGESTIONS = "802304706701426730";
|
||||
}
|
@ -56,7 +56,7 @@ public class MGZBot {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
|
||||
System.out.println("Done (" + (System.currentTimeMillis() - time) + "ms)!");
|
||||
System.out.println("Done (" + (System.currentTimeMillis() - time) + ")! For help, type \"help\" or \"?\"\n");
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
@ -14,10 +14,9 @@ import java.util.Arrays;
|
||||
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 = "<channelID> <messageID> <reaction>";
|
||||
userPermissions = new Permission[] { Permission.ADMINISTRATOR };
|
||||
|
@ -14,10 +14,9 @@ import java.util.Arrays;
|
||||
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 = "<channelID> <messageID> <title> <description>";
|
||||
userPermissions = new Permission[] { Permission.ADMINISTRATOR };
|
||||
|
@ -10,11 +10,10 @@ import java.util.List;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
public class InviteCommand extends BaseCommand {
|
||||
|
||||
public InviteCommand() {
|
||||
name = "invite";
|
||||
aliases = new String[]{"createinvite"};
|
||||
help = "Create invite link via the bot";
|
||||
aliases = new String[] { "createinvite" };
|
||||
help = "Create an invite link via the bot";
|
||||
guildOnly = true;
|
||||
guilds = Collections.singletonList(zone.themcgamer.discordbot.guild.Guild.MAIN);
|
||||
}
|
||||
@ -22,7 +21,6 @@ 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;
|
||||
@ -31,12 +29,9 @@ 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 dm's!");
|
||||
}, error -> {
|
||||
event.replyError("Could not sent you a dm!");
|
||||
}); }, error -> {
|
||||
event.replyError("Coulnd't create an invite link due an error!");
|
||||
});
|
||||
event.reply("Check your DMs!");
|
||||
}, error -> event.replyError("Could not sent you a dm!"));
|
||||
}, error -> event.replyError("Couldn't create an invite link due an error!"));
|
||||
|
||||
}
|
||||
}
|
@ -12,10 +12,9 @@ import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
public class MessageCommand extends BaseCommand {
|
||||
|
||||
public MessageCommand() {
|
||||
name = "message";
|
||||
aliases = new String[]{"say"};
|
||||
aliases = new String[] { "say" };
|
||||
help = "Announce something in an embed format.";
|
||||
arguments = "<title> <description>";
|
||||
userPermissions = new Permission[] { Permission.ADMINISTRATOR };
|
||||
|
@ -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;
|
||||
|
Reference in New Issue
Block a user