Merge branch 'dev'

merge-requests/13/head
Matthew 2020-06-15 21:57:54 -04:00
commit b60b4d6aff
No known key found for this signature in database
GPG Key ID: F841AB9BF496C194
1 changed files with 3 additions and 3 deletions

View File

@ -15,7 +15,7 @@ export default class Page extends Command {
this.aliases = ['p']; this.aliases = ['p'];
this.permissions = 1; this.permissions = 1;
this.enabled = true; this.enabled = true;
this.guildOnly = true; this.guildOnly = false;
this.local = { this.local = {
emergencyNumbers: ['#0', '#1', '#2', '#3'], emergencyNumbers: ['#0', '#1', '#2', '#3'],
departmentNumbers: ['00', '01', '10', '20', '21', '22'], departmentNumbers: ['00', '01', '10', '20', '21', '22'],
@ -102,7 +102,7 @@ export default class Page extends Command {
const sender = this.client.guilds.get(this.client.config.guildID).members.get(senderEntry.individualAssignID); const sender = this.client.guilds.get(this.client.config.guildID).members.get(senderEntry.individualAssignID);
const chan = await this.client.getDMChannel(id); const chan = await this.client.getDMChannel(id);
if (!chan) continue; if (!chan) continue;
chan.createMessage(`__**Page**__\n**Recipient PN:** ${recipientNumber}\n**Sender PN:** ${senderNumber} (${sender ? `${sender.username}${sender.discriminator}` : ''})\n\n**Pager Code:** ${code}`); chan.createMessage(`__**Page**__\n**Recipient PN:** ${recipientNumber}\n**Sender PN:** ${senderNumber} (${sender ? `${sender.username}#${sender.discriminator}` : ''})\n\n**Pager Code:** ${code}`);
} }
for (const email of recipientEntry.emailAddresses) { for (const email of recipientEntry.emailAddresses) {
const sender = this.client.guilds.get(this.client.config.guildID).members.get(senderEntry.individualAssignID); const sender = this.client.guilds.get(this.client.config.guildID).members.get(senderEntry.individualAssignID);
@ -110,7 +110,7 @@ export default class Page extends Command {
from: '"LOC Paging System" <internal@libraryofcode.org>', from: '"LOC Paging System" <internal@libraryofcode.org>',
to: email, to: email,
subject: `PAGE FROM ${recipientNumber}`, subject: `PAGE FROM ${recipientNumber}`,
html: `<h1>Page</h1><strong>Recipient PN:</strong> ${recipientNumber}<br><strong>Sender PN:</strong> ${senderNumber} (${sender ? `${sender.username}${sender.discriminator}` : ''})<br><br><strong>Pager Code:</strong> ${code}`, html: `<h1>Page</h1><strong>Recipient PN:</strong> ${recipientNumber}<br><strong>Sender PN:</strong> ${senderNumber} (${sender ? `${sender.username}#${sender.discriminator}` : ''})<br><br><strong>Pager Code:</strong> ${code}`,
}); });
} }
return { status: true, message: `Page to \`${recipientNumber}\` sent.` }; return { status: true, message: `Page to \`${recipientNumber}\` sent.` };