Discord-Scout-Council / DSC-Bot

GNU General Public License v3.0
0 stars 0 forks source link

Verification of Roles #1

Closed Muirrum closed 4 years ago

Muirrum commented 4 years ago

Need to allow users to verify their various roles

Muirrum commented 4 years ago
        } else if (event instanceof PrivateMessageReceivedEvent) {
            PrivateMessageReceivedEvent post = (PrivateMessageReceivedEvent) event;
            //if (!Start.blocked.contains(post.getAuthor().getId())) {
                List<Attachment> imgs = post.getMessage().getAttachments();
                if (imgs.size() > 0) {
                    for (Attachment img: imgs) {
                        TextChannel DSC = Start.jda.getTextChannelById("684577265425973285"); //For use in production.
                        //TextChannel DSC = jda.getTextChannelById("668964814684422184"); //For use in testing.
                        try {
                            DSC.sendMessage(post.getAuthor().getId()).addFile(img.downloadToFile().get()).queue((msg) -> {
                            DSC.addReactionById(msg.getId(), "🦅").queue(); //Eagle
                            DSC.addReactionById(msg.getId(), "⛰").queue(); //Summit/Silver
                            DSC.addReactionById(msg.getId(), "🏕").queue(); //Camp Staff
                            DSC.addReactionById(msg.getId(), "🛂").queue(); //YPT
                            DSC.addReactionById(msg.getId(), "↗").queue(); //OA ordeal
                            DSC.addReactionById(msg.getId(), "🟥").queue(); //OA brotherhood
                            DSC.addReactionById(msg.getId(), "🔺").queue(); //OA vigil
                            DSC.addReactionById(msg.getId(), "❌").queue(); //close ticket, Do not move past here
                            DSC.addReactionById(msg.getId(), "⚠").queue(); //issue warning
                            DSC.addReactionById(msg.getId(), "⛔").queue(); //block from eVerify
                            });
                        } catch (InterruptedException | ExecutionException e) {
                        }
                        post.getChannel().sendMessage("[Verify] Opened Request.");
                    }
                }
            //}

Here is relevant portion of code from original DSC bot, that gets the file from the DM and posts it in #tyrants-lair

Muirrum commented 4 years ago

980b980