From 50eeb27345231ef9b00303a6082587a6e28cce75 Mon Sep 17 00:00:00 2001 From: Matthew R Date: Mon, 15 Jun 2020 21:57:45 -0400 Subject: [PATCH] allow page to be used in dms --- src/commands/page.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/commands/page.ts b/src/commands/page.ts index 085ffb0..ee64f9e 100644 --- a/src/commands/page.ts +++ b/src/commands/page.ts @@ -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" ', to: email, subject: `PAGE FROM ${recipientNumber}`, - html: `

Page

Recipient PN: ${recipientNumber}
Sender PN: ${senderNumber} (${sender ? `${sender.username}${sender.discriminator}` : ''})

Pager Code: ${code}`, + html: `

Page

Recipient PN: ${recipientNumber}
Sender PN: ${senderNumber} (${sender ? `${sender.username}#${sender.discriminator}` : ''})

Pager Code: ${code}`, }); } return { status: true, message: `Page to \`${recipientNumber}\` sent.` };