Added discord support to emailing with @
This commit is contained in:
parent
d80fe57567
commit
501faaf4c5
|
@ -56,19 +56,22 @@ module.exports = class Summon {
|
||||||
text = `${text} in channel ${this.channel}`;
|
text = `${text} in channel ${this.channel}`;
|
||||||
text = `${text} for reason: ${reason}`;
|
text = `${text} for reason: ${reason}`;
|
||||||
|
|
||||||
if (!user.startsWith("@")) {
|
let email = `${user}@tilde.team`;
|
||||||
this.transporter.sendMail({
|
if (user.startsWith("@")) {
|
||||||
from: this.client.config.email,
|
email = email.slice(1);
|
||||||
to: `${user}@tilde.team`,
|
|
||||||
subject: subject,
|
|
||||||
text: text
|
|
||||||
}, (err, info) => {
|
|
||||||
// DEBUG
|
|
||||||
// console.log("Summon::email", info);
|
|
||||||
response.debug.email = info;
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.transporter.sendMail({
|
||||||
|
from: this.client.config.email,
|
||||||
|
to: email,
|
||||||
|
subject: subject,
|
||||||
|
text: text
|
||||||
|
}, (err, info) => {
|
||||||
|
// DEBUG
|
||||||
|
// console.log("Summon::email", info);
|
||||||
|
response.debug.email = info;
|
||||||
|
});
|
||||||
|
|
||||||
// I obvious don't know everyone's Pushbullet API
|
// I obvious don't know everyone's Pushbullet API
|
||||||
if (user === this.client.config.author) {
|
if (user === this.client.config.author) {
|
||||||
const self = this;
|
const self = this;
|
||||||
|
|
Loading…
Reference in New Issue