update calculation t3 staff benefit
parent
84a539c65a
commit
f91cc0221a
|
@ -125,7 +125,7 @@ export default class Util {
|
|||
}
|
||||
}
|
||||
|
||||
public async handleError(error: Error, message?: Message, command?: Command): Promise<void> {
|
||||
public async handleError(error: Error | any, message?: Message, command?: Command): Promise<void> {
|
||||
try {
|
||||
this.client.signale.error(error);
|
||||
const info = { content: `\`\`\`js\n${error.stack}\n\`\`\``, embed: null };
|
||||
|
|
|
@ -13,7 +13,7 @@ export default class CWG_Create extends Command {
|
|||
super(client);
|
||||
this.name = 'create';
|
||||
this.description = 'Bind a domain to the CWG';
|
||||
this.usage = `${this.client.config.prefix}cwg create [User ID | Username] [Domain] [Port] <Cert Chain> <Private Key> || Use snippets raw URL`;
|
||||
this.usage = `${this.client.config.prefix}cwg create <User ID | Username> <Domain> <Port> [Cert Chain] [Private Key] || Use snippets raw URL`;
|
||||
this.permissions = { roles: ['662163685439045632', '701454780828221450'] };
|
||||
this.aliases = ['bind'];
|
||||
this.enabled = true;
|
||||
|
|
|
@ -113,6 +113,7 @@ export default class CWG_SelfService extends Command {
|
|||
}
|
||||
|
||||
public domainTextValidation(domain: string) {
|
||||
if (domain.length >= 25) return false;
|
||||
return /[A-Za-z0-9](?:[A-Za-z0-9-]{0,19}[A-Za-z0-9])?/.test(domain);
|
||||
}
|
||||
|
||||
|
|
|
@ -52,7 +52,7 @@ export default function checkStaffStatus(client: Client) {
|
|||
await client.db.Account.updateOne({ username: acc.username }, { $set: { 'permissions.intern': false } });
|
||||
}
|
||||
|
||||
if ((acc.permissions.staff || acc.permissions.intern || acc.permissions.technician || acc.permissions.director) && acc.tier < 3) {
|
||||
if ((acc.permissions.staff || acc.permissions.intern || acc.permissions.technician || acc.permissions.director || user.roles.cache.has('858049948401401866')) && acc.tier < 3) {
|
||||
await client.db.Account.updateOne({ username: acc.username }, { $set: { tier: 3 } });
|
||||
const embed = new MessageEmbed();
|
||||
embed.setTitle('Cloud Account | Tier Change');
|
||||
|
@ -60,6 +60,7 @@ export default function checkStaffStatus(client: Client) {
|
|||
embed.addField('User', `${acc.username} | <@${acc.userID}>`, true);
|
||||
embed.addField('Technician', 'SYSTEM', true);
|
||||
embed.addField('Old Tier -> New Tier', `${acc.tier} -> 3`, true);
|
||||
embed.addField('Reason', 'T3 Staff Benefit', true);
|
||||
embed.setFooter(client.user.username, client.user.avatarURL());
|
||||
embed.setTimestamp();
|
||||
const ch = await client.channels.fetch('580950455581147146') as TextChannel;
|
||||
|
|
Loading…
Reference in New Issue