allow page to be used in dms
parent
1c4834aec2
commit
50eeb27345
|
@ -15,7 +15,7 @@ export default class Page extends Command {
|
|||
this.aliases = ['p'];
|
||||
this.permissions = 1;
|
||||
this.enabled = true;
|
||||
this.guildOnly = true;
|
||||
this.guildOnly = false;
|
||||
this.local = {
|
||||
emergencyNumbers: ['#0', '#1', '#2', '#3'],
|
||||
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 chan = await this.client.getDMChannel(id);
|
||||
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) {
|
||||
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>',
|
||||
to: email,
|
||||
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.` };
|
||||
|
|
Loading…
Reference in New Issue