fix auto tier
parent
9ecc9f1324
commit
c283487b5a
|
@ -18,8 +18,8 @@ export default class Tier extends Command {
|
|||
const account = await this.client.db.Account.findOne({ $or: [{ username: args[0] }, { userID: args[0].replace(/[<@!>]/gi, '') }] });
|
||||
if (!account) return edit.edit(`***${this.client.stores.emojis.error} Cannot find user.***`);
|
||||
if (account.root) return edit.edit(`***${this.client.stores.emojis.error} Permission denied.***`);
|
||||
if (Number.isNaN(Number(args[1]))) return edit.edit(`***${this.client.stores.emojis.error} The tier you provided is not a valid number. It should be between 1 and 3.***`);
|
||||
if (Number(args[1]) > 3 || Number(args[1]) < 1) return edit.edit(`***${this.client.stores.emojis.error} You can only choose a Tier between 1 and 3.***`);
|
||||
if (Number.isNaN(Number(args[1]))) return edit.edit(`***${this.client.stores.emojis.error} The tier you provided is not a valid number. It should be between 0 and 3.***`);
|
||||
if (Number(args[1]) > 3 || Number(args[1]) < 0) return edit.edit(`***${this.client.stores.emojis.error} You can only choose a Tier between 0 and 3.***`);
|
||||
message.delete();
|
||||
const tier = await this.client.db.Tier.findOne({ id: Number(args[1]) });
|
||||
if (account.ramLimitNotification !== -1) {
|
||||
|
|
Loading…
Reference in New Issue