1
0
Fork 0

show help info

refactor/models
Bsian 2019-11-02 13:24:04 +00:00
parent e7bab80282
commit e9110c3180
No known key found for this signature in database
GPG Key ID: 097FB9A291026091
1 changed files with 1 additions and 0 deletions

View File

@ -17,6 +17,7 @@ export default class Disk extends Command {
async run(message: Message, args: string[]) { async run(message: Message, args: string[]) {
try { try {
if (!args[0]) return this.client.commands.get('help').run(message, [this.name]);
const account = await this.client.db.Account.findOne({ $or: [{ username: args[0] }, { userID: args[0] }, { emailAddress: args[0] }] }); const account = await this.client.db.Account.findOne({ $or: [{ username: args[0] }, { userID: args[0] }, { emailAddress: args[0] }] });
if (!account) return message.channel.createMessage(`${this.client.stores.emojis.error} ***Account not found***`); if (!account) return message.channel.createMessage(`${this.client.stores.emojis.error} ***Account not found***`);
if (account.root || args[0].includes('./')) return message.channel.createMessage(`${this.client.stores.emojis.error} ***Permission denied***`); if (account.root || args[0].includes('./')) return message.channel.createMessage(`${this.client.stores.emojis.error} ***Permission denied***`);