use of com.gamebuster19901.excite.bot.mail.TextualMailResponse 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);
}
Aggregations