From 1d581a86394ac3e3e8c7e6c93b65fe5739c50aff Mon Sep 17 00:00:00 2001 From: Matthew R Date: Mon, 15 Jun 2020 21:34:54 -0400 Subject: [PATCH] add email transporter to util --- src/class/Util.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/class/Util.ts b/src/class/Util.ts index fce0037..0baf1d7 100644 --- a/src/class/Util.ts +++ b/src/class/Util.ts @@ -1,4 +1,5 @@ /* eslint-disable no-bitwise */ +import nodemailer from 'nodemailer'; import signale from 'signale'; import { Member, Message, Guild, PrivateChannel, GroupChannel, Role, AnyGuildChannel } from 'eris'; import { Client, Command, Moderation, RichEmbed } from '.'; @@ -11,6 +12,8 @@ export default class Util { public signale: signale.Signale; + public transporter: nodemailer.Transporter; + constructor(client: Client) { this.client = client; this.moderation = new Moderation(this.client); @@ -20,6 +23,11 @@ export default class Util { displayTimestamp: true, displayFilename: true, }); + this.transporter = nodemailer.createTransport({ + host: 'staff.libraryofcode.org', + port: 587, + auth: { user: 'internal', pass: this.client.config.emailPass }, + }); } get emojis() {