merge-requests/4/head
Matthew 2020-03-29 06:48:20 -04:00
parent 682d067f67
commit 3639178952
No known key found for this signature in database
GPG Key ID: 766BE43AE75F7559
1 changed files with 10 additions and 0 deletions

View File

@ -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.***');
});