From 363917895297f1eedd3344f1f82bf2ace28ef051 Mon Sep 17 00:00:00 2001 From: Matthew R Date: Sun, 29 Mar 2020 06:48:20 -0400 Subject: [PATCH] notifs --- src/intervals/checkStaffStatus.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/intervals/checkStaffStatus.ts b/src/intervals/checkStaffStatus.ts index 48f7c0e..0d318de 100644 --- a/src/intervals/checkStaffStatus.ts +++ b/src/intervals/checkStaffStatus.ts @@ -1,5 +1,6 @@ /* eslint-disable no-await-in-loop */ import { Client } from '..'; +import { RichEmbed } from '../class'; export default function checkStaffStatus(client: Client) { setInterval(async () => { @@ -28,6 +29,15 @@ export default function checkStaffStatus(client: Client) { if (acc.permissions.staff && acc.tier < 3) { await client.db.Account.updateOne({ username: acc.username }, { $set: { tier: 3 } }); + const embed = new RichEmbed(); + embed.setTitle('Cloud Account | Tier Change'); + embed.setColor('#0099ff'); + embed.addField('User', `${acc.username} | <@${acc.userID}>`, true); + embed.addField('Moderator', `<@${client.user.id}>`, true); + embed.addField('Old Tier -> New Tier', `${acc.tier} -> 3`, true); + embed.setFooter(this.client.user.username, this.client.user.avatarURL); + embed.setTimestamp(); + this.client.createMessage('580950455581147146', { embed }); client.getDMChannel(acc.userID).then((chan) => { chan.createMessage('***Your account has automatically been upgraded to Tier 3 since you are a Staff member.***'); });