Search in sources :

Example 1 with Wii

use of com.gamebuster19901.excite.bot.user.Wii in project ExciteBot by TheGameCommunity.

the class ArchiveCommand method archive.

private static int archive(MessageContext source, String argument) {
    if (source.isAdmin()) {
        if (source.isGuildMessage()) {
            if (argument.isEmpty()) {
                source.sendMessage("Usage: archive <TextChannels>");
                return 1;
            }
            DiscordServer server = source.getServer();
            Guild guild = server.getGuild();
            Member member = DiscordUser.getMember(source.getDiscordAuthor(), server);
            HashSet<TextChannel> channelsToArchive = getChannels(source, guild, Arrays.asList(argument.split(" ")));
            for (TextChannel channel : channelsToArchive) {
                if (!member.hasPermission(channel, Permission.MANAGE_CHANNEL, Permission.MESSAGE_MANAGE)) {
                    source.sendMessage("You must have the `MANAGE_CHANNEL` and `MESSAGE_MANAGE` permission in " + channel.getAsMention() + " in order to archive it.");
                    return 1;
                }
            }
            Thread workerThread = ThreadService.run("Archiver thread", new Thread() {

                private final Thread workerThread = this;

                private final int newlineSize = System.lineSeparator().length();

                public volatile WorkerStatus status = NOT_STARTED;

                public volatile byte updates = 0;

                public volatile int messagesArchived = 0;

                public volatile int wiiMessagesArchived = 0;

                public volatile int attachmentsArchived = 0;

                public volatile long estimatedSize = 0;

                private volatile Throwable error;

                @Override
                public void run() {
                    Thread monitorThread = ThreadService.run("Archive monitor", new Thread() {

                        public void run() {
                            Instant start = Instant.now();
                            EmbedBuilder embed = new EmbedBuilder();
                            embed.setTitle("Archive in progress...");
                            Field archivedDiscordMessagesField = new Field("Discord Messages archived:", "0", true, true);
                            Field archivedDiscordAttachmentsField = new Field("Discord Attachments archived:", "0", true, true);
                            Field emailsArchivedField = new Field("Wii Mails archived:", "0", true, true);
                            Field estimatedSizeField = new Field("Estimated size:", FileUtils.humanReadableByteCount(0), true, true);
                            Field timeElapsedField = new Field("Time elapsed:", "0 seconds", true, true);
                            embed.setTimestamp(start);
                            WorkerStatus currentStatus = status;
                            embed.addField(archivedDiscordMessagesField);
                            embed.addField(archivedDiscordAttachmentsField);
                            embed.addField(emailsArchivedField);
                            embed.addField(estimatedSizeField);
                            embed.addField(timeElapsedField);
                            Message message = source.sendMessage(embed.build());
                            while (!currentStatus.finished()) {
                                try {
                                    Thread.sleep(2500);
                                    currentStatus = status;
                                    Instant now = Instant.now();
                                    embed = new EmbedBuilder();
                                    if (currentStatus == NOT_STARTED) {
                                        embed.setColor(Color.DARK_GRAY);
                                    }
                                    if (currentStatus == WORKING) {
                                        if (updates++ % 2 == 0) {
                                            embed.setColor(Color.YELLOW);
                                        } else {
                                            // dark yellow
                                            embed.setColor(new Color(204, 204, 0));
                                        }
                                        embed.setTitle("Archive in progress...");
                                        embed.addField(archivedDiscordMessagesField = new Field("Discord Messages archived:", messagesArchived + "", true, true));
                                        embed.addField(archivedDiscordAttachmentsField = new Field("Discord Attachments archived:", attachmentsArchived + "", true, true));
                                        embed.addField(emailsArchivedField = new Field("Wii Messages archived:", wiiMessagesArchived + "", true, true));
                                        embed.addField(estimatedSizeField = new Field("Estimated size:", FileUtils.humanReadableByteCount(estimatedSize), true, true));
                                        embed.addField(timeElapsedField = new Field("Time elapsed:", TimeUtils.readableDuration(Duration.between(start, now)), true, true));
                                        embed.setTimestamp(now);
                                        message.editMessage(embed.build()).complete();
                                    }
                                    Thread.sleep(2500);
                                } catch (InterruptedException e) {
                                    currentStatus = ERRORED;
                                    embed.setTitle("Archive failed");
                                    embed.setColor(Color.RED);
                                    message.editMessage(embed.build()).complete();
                                    System.out.println("Monitor thread interrupted... stopping!");
                                    return;
                                }
                            }
                            Instant now = Instant.now();
                            embed.addField(archivedDiscordMessagesField = new Field("Discord Messages archived:", messagesArchived + "", true, true));
                            embed.addField(archivedDiscordAttachmentsField = new Field("Discord Attachments archived:", attachmentsArchived + "", true, true));
                            embed.addField(emailsArchivedField = new Field("Wii Messages archived:", wiiMessagesArchived + "", true, true));
                            embed.addField(estimatedSizeField = new Field("Estimated size:", FileUtils.humanReadableByteCount(estimatedSize), true, true));
                            embed.addField(timeElapsedField = new Field("Time elapsed:", TimeUtils.readableDuration(Duration.between(start, now)), true, true));
                            embed.setTimestamp(now);
                            message.editMessage(embed.build()).complete();
                            if (currentStatus == COMPLETE) {
                                embed.setColor(Color.GREEN);
                                embed.setTitle("Archive complete");
                                source.sendMessage(source.getDiscordAuthor().getJDAUser().getAsMention() + " Archive complete.");
                            } else {
                                embed.setColor(Color.RED);
                                embed.setTitle("Archive failed");
                                source.sendMessage(source.getDiscordAuthor().getJDAUser().getAsMention() + " Archive FAILED.");
                            }
                            message.editMessage(embed.build()).complete();
                        }
                    });
                    String date = TimeUtils.getDBDate(Instant.now());
                    try {
                        status = WORKING;
                        for (File f : org.apache.commons.io.FileUtils.listFiles(Mailbox.MAILBOX, null, true)) {
                            File archive = new File(".archive/" + date + "/" + f.getPath().replace("/run", ""));
                            if (!archive.getParentFile().mkdirs() && !archive.getParentFile().exists()) {
                                throw new IOException("Could not create " + archive.getAbsolutePath());
                            }
                            org.apache.commons.io.FileUtils.copyFile(f, archive);
                            wiiMessagesArchived++;
                            estimatedSize += archive.length();
                        }
                        for (TextChannel channel : channelsToArchive) {
                            try {
                                File file = new File(".archive/" + date + "/" + channel.getName() + "/" + channel.getName() + ".arc");
                                if (!file.getParentFile().mkdirs()) {
                                    throw new IOException("Could not create " + file.getAbsolutePath());
                                }
                                System.out.println(file.getAbsolutePath());
                                file.createNewFile();
                                MessagePaginationAction action = channel.getIterableHistory();
                                BufferedWriter fileWriter = new BufferedWriter(new FileWriter(file));
                                action.forEach((message) -> {
                                    try {
                                        List<Attachment> attachments = message.getAttachments();
                                        write(fileWriter, "==========START " + message.getIdLong() + " USER:" + message.getAuthor().getAsTag());
                                        write(fileWriter, message.getContentRaw());
                                        if (!attachments.isEmpty()) {
                                            write(fileWriter, "==========ATTACHMENTS " + message.getIdLong());
                                            for (Attachment attachment : attachments) {
                                                File attachmentFile = new File(file.getParentFile().getPath() + "/attach" + attachment.getIdLong() + attachment.getFileName());
                                                CompletableFuture<File> future = attachment.downloadToFile(attachmentFile);
                                                future.exceptionally(error -> {
                                                    int i = 0;
                                                    source.sendMessage("Encountered " + error.getClass().getSimpleName() + " while downloading " + attachmentFile + " retrying... (" + i++ + "/4)");
                                                    while (i < 4) {
                                                        try {
                                                            future.get();
                                                            i++;
                                                        } catch (Throwable t) {
                                                            if (t instanceof InterruptedException) {
                                                                throw new ThreadDeath();
                                                            }
                                                            if (i < 4) {
                                                                source.sendMessage("Encountered " + t.getClass().getSimpleName() + " while downloading " + attachmentFile + " retrying... (" + i + "/4)");
                                                            }
                                                        }
                                                    }
                                                    return null;
                                                }).get();
                                                write(fileWriter, attachment.getId() + attachmentFile.getName());
                                                estimatedSize += attachment.getSize();
                                                attachmentsArchived++;
                                            }
                                        }
                                        write(fileWriter, "==========END " + message.getIdLong());
                                        messagesArchived++;
                                    } catch (IOException | InterruptedException | ExecutionException e) {
                                        throw new RuntimeException(e);
                                    }
                                });
                                fileWriter.close();
                            } catch (Throwable t) {
                                source.sendMessage("Could not back up channel " + channel.getAsMention());
                                throw t;
                            }
                        }
                        status = COMPLETE;
                    } catch (Throwable t) {
                        source.sendMessage(StacktraceUtil.getStackTrace(t));
                        status = ERRORED;
                    }
                }

                private void write(BufferedWriter writer, String text) throws IOException {
                    estimatedSize += text.length() + newlineSize;
                    writer.write(text);
                    writer.newLine();
                }
            });
        } else {
            source.sendMessage("You must execute this command in a server");
        }
    } else {
        source.sendMessage("You must be an administator to execute this command");
    }
    return 1;
}
Also used : Color(java.awt.Color) ThreadService(com.gamebuster19901.excite.util.ThreadService) Arrays(java.util.Arrays) CommandDispatcher(com.mojang.brigadier.CommandDispatcher) Permission(net.dv8tion.jda.api.Permission) CompletableFuture(java.util.concurrent.CompletableFuture) Member(net.dv8tion.jda.api.entities.Member) Field(net.dv8tion.jda.api.entities.MessageEmbed.Field) TextChannel(net.dv8tion.jda.api.entities.TextChannel) MessagePaginationAction(net.dv8tion.jda.api.requests.restaction.pagination.MessagePaginationAction) HashSet(java.util.HashSet) StringArgumentType(com.mojang.brigadier.arguments.StringArgumentType) WorkerStatus(com.gamebuster19901.excite.bot.command.ArchiveCommand.WorkerStatus) Guild(net.dv8tion.jda.api.entities.Guild) Duration(java.time.Duration) Mailbox(com.gamebuster19901.excite.bot.mail.Mailbox) StacktraceUtil(com.gamebuster19901.excite.util.StacktraceUtil) Message(net.dv8tion.jda.api.entities.Message) Attachment(net.dv8tion.jda.api.entities.Message.Attachment) BufferedWriter(java.io.BufferedWriter) FileUtils(com.gamebuster19901.excite.util.file.FileUtils) FileWriter(java.io.FileWriter) DiscordUser(com.gamebuster19901.excite.bot.user.DiscordUser) IOException(java.io.IOException) EmbedBuilder(net.dv8tion.jda.api.EmbedBuilder) Instant(java.time.Instant) File(java.io.File) ExecutionException(java.util.concurrent.ExecutionException) DiscordServer(com.gamebuster19901.excite.bot.server.DiscordServer) List(java.util.List) TimeUtils(com.gamebuster19901.excite.util.TimeUtils) Message(net.dv8tion.jda.api.entities.Message) FileWriter(java.io.FileWriter) Attachment(net.dv8tion.jda.api.entities.Message.Attachment) Guild(net.dv8tion.jda.api.entities.Guild) BufferedWriter(java.io.BufferedWriter) Field(net.dv8tion.jda.api.entities.MessageEmbed.Field) TextChannel(net.dv8tion.jda.api.entities.TextChannel) CompletableFuture(java.util.concurrent.CompletableFuture) WorkerStatus(com.gamebuster19901.excite.bot.command.ArchiveCommand.WorkerStatus) List(java.util.List) Member(net.dv8tion.jda.api.entities.Member) Instant(java.time.Instant) Color(java.awt.Color) IOException(java.io.IOException) EmbedBuilder(net.dv8tion.jda.api.EmbedBuilder) DiscordServer(com.gamebuster19901.excite.bot.server.DiscordServer) File(java.io.File) MessagePaginationAction(net.dv8tion.jda.api.requests.restaction.pagination.MessagePaginationAction)

Example 2 with Wii

use of com.gamebuster19901.excite.bot.user.Wii in project ExciteBot by TheGameCommunity.

the class WhoIsCommand method sendResponse.

@SuppressWarnings("serial")
public static int sendResponse(MessageContext context, String lookingFor) {
    if (context.isConsoleMessage() || context.isIngameEvent()) {
        context.sendMessage("You cannot execute this command as " + context.getEvent().getClass().getSimpleName());
        return 1;
    }
    Wiimmfi wiimmfi = Main.discordBot.getWiimmfi();
    EmbedBuilder embed = new EmbedBuilder();
    boolean hasMembers = context.isGuildMessage();
    if (wiimmfi.getError() == null) {
        if (!lookingFor.isEmpty()) {
            HashSet<DiscordUser> users = new HashSet<DiscordUser>() {

                {
                    this.addAll(Arrays.asList(DiscordUser.getDiscordUsersWithUsernameOrID(context, lookingFor)));
                }
            };
            HashSet<Player> players = new HashSet<Player>() {

                {
                    this.addAll(Arrays.asList(Player.getPlayersByAnyIdentifier(context, lookingFor)));
                }
            };
            HashSet<Named> matches = new HashSet<Named>();
            matches.addAll(users);
            matches.addAll(players);
            SimpleDateFormat date = new SimpleDateFormat("yyyy/MM/dd HH:mm z", Locale.ENGLISH);
            if (matches.size() == 1) {
                Named match = matches.iterator().next();
                embed.setTitle("Information about " + match.getIdentifierName());
                if (match instanceof DiscordUser) {
                    DiscordUser user = (DiscordUser) match;
                    Member member;
                    embed.setColor(Color.WHITE);
                    Wii[] wiis = user.getRegisteredWiis();
                    Set<Player> profiles = user.getProfiles(context);
                    Duration timeOnline = Duration.ZERO;
                    Instant lastOnline = TimeUtils.PLAYER_EPOCH;
                    String profileList = "";
                    String wiiList = "";
                    for (Player profile : profiles) {
                        profileList = profileList + profile.toEmbedstring() + "\n";
                        timeOnline = timeOnline.plus(profile.getOnlineDuration());
                        Instant profileLastOnline = profile.getLastOnline();
                        if (profileLastOnline.isAfter(lastOnline)) {
                            lastOnline = profileLastOnline;
                        }
                    }
                    for (Wii wii : wiis) {
                        wiiList = wiiList + wii.getName() + "\n";
                    }
                    if (hasMembers && (member = user.getMember(context.getServer())) != null) {
                        embed.setColor(member.getColor());
                        embed.setThumbnail(user.getJDAUser().getEffectiveAvatarUrl());
                        embed.addField("Username:", user.getJDAUser().getName(), false);
                        embed.addField("Discriminator", user.getJDAUser().getDiscriminator(), false);
                        // embed.addField("Badges:", "", false);
                        embed.addField("ID:", "" + user.getID(), false);
                        embed.addField("Nickname:", member.getNickname() != null ? member.getNickname() : "##Not Nicknamed##", false);
                        embed.addField("Joined Discord:", date.format(member.getTimeCreated().toInstant().toEpochMilli()), false);
                        embed.addField("Joined " + context.getServer().getName() + ":", date.format(member.getTimeJoined().toInstant().toEpochMilli()), false);
                        embed.addField("Member for:", readableDuration(TimeUtils.since(member.getTimeJoined().toInstant()), false), false);
                        embed.addField("Time Online:", readableDuration(timeOnline, true), false);
                        embed.addField(profiles.size() + " registered Profiles:", profileList, false);
                        embed.addField(wiis.length + " registered Wiis:", wiiList, false);
                    } else {
                        embed.setThumbnail(user.getJDAUser().getEffectiveAvatarUrl());
                        embed.addField("Username:", user.getJDAUser().getName(), false);
                        embed.addField("Discriminator", user.getJDAUser().getDiscriminator(), false);
                        embed.addField("ID:", "" + user.getID(), false);
                        embed.addField("Time Online:", readableDuration(timeOnline, true), false);
                        embed.addField(profiles.size() + " registered Profiles:", profileList, false);
                        embed.addField(wiis.length + " registered Wiis:", wiiList, false);
                        embed.appendDescription("For more information, execute this command in a server the user is in.");
                    }
                } else if (match instanceof Player) {
                    Player profile = (Player) match;
                    DiscordUser user = DiscordUser.getDiscordUserTreatingUnknownsAsNobody(context, profile.getDiscord());
                    embed.addField("Name:", profile.getName(), false);
                    embed.addField("ID:", profile.getID() + "", false);
                    embed.addField("FC:", profile.getFriendCode(), false);
                    embed.addField("Owner:", user.toDetailedString(), false);
                    embed.addField("Time Online:", readableDuration(profile.getOnlineDuration(), true), false);
                    embed.addField("First Seen:", date.format(profile.getFirstSeen().toEpochMilli()), false);
                    embed.addField("Last Seen:", date.format(profile.getLastOnline().toEpochMilli()), false);
                }
            } else if (matches.size() == 0) {
                embed.setColor(Color.RED);
                embed.setTitle("Target not found");
                embed.addField("Target:", lookingFor, true);
            } else {
                embed.setTitle("Ambigious target string, supply an ID");
                embed.setColor(Color.RED);
                embed.addField("Target", lookingFor, true);
                embed.addField("Ambiguities", "" + matches.size(), true);
                if (users.size() > 0) {
                    embed.appendDescription("Discord users:\n");
                    String userList = "";
                    for (DiscordUser user : users) {
                        Member member;
                        if (hasMembers && (member = user.getMember(context.getServer())) != null && member.getNickname() != null) {
                            userList = userList + user.toDetailedString() + " AKA " + member.getEffectiveName() + "#" + member.getIdLong() + "\n";
                        } else {
                            userList = userList + user.toDetailedString() + "\n";
                        }
                    }
                    embed.addField("Ambiguous Users:", userList, false);
                }
                if (players.size() > 0) {
                    String playerList = "";
                    for (Player player : players) {
                        playerList = playerList + player.toFullString() + "\n";
                    }
                    embed.addField("Ambiguous Profiles:", playerList, false);
                }
            }
            embed.setTimestamp(Instant.now());
            context.sendMessage(embed.build());
        }
    }
    return 1;
}
Also used : DiscordUser(com.gamebuster19901.excite.bot.user.DiscordUser) Named(com.gamebuster19901.excite.util.Named) Player(com.gamebuster19901.excite.Player) Instant(java.time.Instant) Duration(java.time.Duration) EmbedBuilder(net.dv8tion.jda.api.EmbedBuilder) Wii(com.gamebuster19901.excite.bot.user.Wii) SimpleDateFormat(java.text.SimpleDateFormat) Member(net.dv8tion.jda.api.entities.Member) Wiimmfi(com.gamebuster19901.excite.Wiimmfi) HashSet(java.util.HashSet)

Example 3 with Wii

use of com.gamebuster19901.excite.bot.user.Wii in project ExciteBot by TheGameCommunity.

the class WiiRegistrationAudit method addWiiRegistrationAudit.

public static WiiRegistrationAudit addWiiRegistrationAudit(MessageContext registrant, Wii wii, boolean unregister) {
    Audit parent;
    if (!unregister) {
        parent = Audit.addAudit(registrant, AuditType.WII_REGISTRATION_AUDIT, registrant.getAuthor().getIdentifierName() + " registered " + wii.getWiiCode().hyphenate());
    } else {
        parent = Audit.addAudit(registrant, AuditType.WII_REGISTRATION_AUDIT, registrant.getAuthor().getIdentifierName() + " unregistered " + wii.getWiiCode().hyphenate());
    }
    PreparedStatement st;
    try {
        st = Insertion.insertInto(Table.AUDIT_WII_REGISTER).setColumns(AUDIT_ID, WII_ID, DISCORD_ID, UNREGISTER).to(parent.getID(), wii.getWiiCode().toString(), registrant.getSenderId(), unregister).prepare(true);
        st.execute();
        WiiRegistrationAudit ret = getWiiRegistrationAuditByID(ConsoleContext.INSTANCE, parent.getID());
        ret.parentData = parent;
        return ret;
    } catch (SQLException e) {
        throw new IOError(e);
    }
}
Also used : SQLException(java.sql.SQLException) IOError(java.io.IOError) PreparedStatement(com.gamebuster19901.excite.bot.database.sql.PreparedStatement)

Example 4 with Wii

use of com.gamebuster19901.excite.bot.user.Wii in project ExciteBot by TheGameCommunity.

the class Mailbox method analyzeMail.

private static LinkedHashSet<MailResponse> analyzeMail(Wii responder, MimeMessage prompt) throws MessagingException {
    LinkedHashSet<MailResponse> responses = new LinkedHashSet<MailResponse>();
    Session session = Session.getInstance(new Properties());
    Address[] from = prompt.getFrom();
    LOGGER.log(Level.FINEST, "Analyzing mail from: " + (from != null ? from[0] : from));
    if (from == null) {
        responses.add(new NoResponse(prompt));
        return responses;
    }
    ElectronicAddress senderEmail = new EmailAddress(prompt.getFrom()[0]);
    Wii sender = Wii.getWii(senderEmail);
    if (sender instanceof InvalidWii) {
        LOGGER.log(Level.FINEST, "Ignoring non-wii mail");
        responses.add(new NoResponse(prompt));
        return responses;
    } else {
        boolean wasKnown;
        if (!(wasKnown = sender.isKnown())) {
            try {
                Insertion.insertInto(WIIS).setColumns(WII_ID).to(sender.getWiiCode().toString()).prepare(ConsoleContext.INSTANCE).execute();
            } catch (SQLException e) {
                throw new MessagingException("Database error", e);
            }
        }
        String[] appheaders = prompt.getHeader(APP_ID_HEADER);
        String app = "";
        if (appheaders.length > 0) {
            app = appheaders[0];
        }
        Rewardable attachment = InvalidChallenge.INSTANCE;
        if (app.equals(EXCITEBOTS)) {
            attachment = analyzeIngameMail(prompt, sender);
        }
        if (sender.getOwner() instanceof UnknownDiscordUser) {
            // if wii is not registered
            if (app.equals(FRIEND_REQUEST) && !wasKnown) {
                MailResponse friendResponse = new AddFriendResponse(responder, sender, prompt);
                LOGGER.finest("Sending friend request to " + sender.getEmail());
                MailResponse codeResponse = new DiscordCodeResponse(responder, sender, prompt);
                LOGGER.finest("Sending verification discord code to " + sender.getEmail());
                responses.add(friendResponse);
                responses.add(codeResponse);
            }
            if (attachment.getReward() > 0) {
            // responses.add(new RefundResponse(responder, prompt, attachment));
            }
        } else {
            // excitebot is not currently accepting mail from anything other than Excitebots
            LOGGER.log(Level.FINEST, "Excitebot is not currently accepting mail from anything other than Excitebots");
            responses.add(new NoResponse(prompt));
        }
    }
    return responses;
}
Also used : LinkedHashSet(java.util.LinkedHashSet) InvalidWii(com.gamebuster19901.excite.bot.user.Wii.InvalidWii) Address(javax.mail.Address) SQLException(java.sql.SQLException) MessagingException(javax.mail.MessagingException) UnknownDiscordUser(com.gamebuster19901.excite.bot.user.UnknownDiscordUser) Properties(java.util.Properties) Rewardable(com.gamebuster19901.excite.game.challenge.Rewardable) InvalidWii(com.gamebuster19901.excite.bot.user.Wii.InvalidWii) Wii(com.gamebuster19901.excite.bot.user.Wii) Session(javax.mail.Session)

Example 5 with Wii

use of com.gamebuster19901.excite.bot.user.Wii in project ExciteBot by TheGameCommunity.

the class Wii method register.

public void register(MessageContext owner) throws SQLException, MessagingException {
    Table.updateWhere(owner, WIIS, DISCORD_ID, owner.getSenderId(), new Comparison(WII_ID, EQUALS, wiiCode.code));
    Table.updateWhere(owner, WIIS, REGISTRATION_CODE, null, new Comparison(WII_ID, EQUALS, wiiCode.code));
    WiiRegistrationAudit.addWiiRegistrationAudit(owner, this, false);
    EmbedBuilder embed = new EmbedBuilder();
    embed.setColor(Color.GREEN);
    embed.setTitle("Registration Successful");
    embed.setDescription("You have succesfully registered the following wii:\n\n" + this.getIdentifierName());
    ElectronicAddress exciteEmail = Mailbox.ADDRESS;
    owner.sendMessage(embed.build());
    LinkedHashSet<MailResponse> wiiMail = Mailbox.packResponses(new TextualMailResponse((Wii) exciteEmail, this, null).setText("This wii has been registered with\n Excitebot.\n" + "registrant: " + owner.getDiscordAuthor().getIdentifierName() + "\n\n" + "If this is not you, contact a TCG\nadmin immediately.\n\n" + "-The Game Community"));
    Mailbox.sendResponses(wiiMail);
}
Also used : EmbedBuilder(net.dv8tion.jda.api.EmbedBuilder) Comparison(com.gamebuster19901.excite.bot.database.Comparison) TextualMailResponse(com.gamebuster19901.excite.bot.mail.TextualMailResponse) ElectronicAddress(com.gamebuster19901.excite.bot.mail.ElectronicAddress) MailResponse(com.gamebuster19901.excite.bot.mail.MailResponse) TextualMailResponse(com.gamebuster19901.excite.bot.mail.TextualMailResponse)

Aggregations

SQLException (java.sql.SQLException)4 Comparison (com.gamebuster19901.excite.bot.database.Comparison)3 Wii (com.gamebuster19901.excite.bot.user.Wii)3 HashSet (java.util.HashSet)3 EmbedBuilder (net.dv8tion.jda.api.EmbedBuilder)3 Result (com.gamebuster19901.excite.bot.database.Result)2 DiscordUser (com.gamebuster19901.excite.bot.user.DiscordUser)2 IOError (java.io.IOError)2 Duration (java.time.Duration)2 Instant (java.time.Instant)2 Member (net.dv8tion.jda.api.entities.Member)2 Player (com.gamebuster19901.excite.Player)1 Wiimmfi (com.gamebuster19901.excite.Wiimmfi)1 WorkerStatus (com.gamebuster19901.excite.bot.command.ArchiveCommand.WorkerStatus)1 PreparedStatement (com.gamebuster19901.excite.bot.database.sql.PreparedStatement)1 ElectronicAddress (com.gamebuster19901.excite.bot.mail.ElectronicAddress)1 MailResponse (com.gamebuster19901.excite.bot.mail.MailResponse)1 Mailbox (com.gamebuster19901.excite.bot.mail.Mailbox)1 TextualMailResponse (com.gamebuster19901.excite.bot.mail.TextualMailResponse)1 DiscordServer (com.gamebuster19901.excite.bot.server.DiscordServer)1