galactic-bot/structure/client/components/inhibitors/Restricted.js
Navy d6a0f99601 A lot of shit
Co-authored-by: nolan <noooolaaaan@gmail.com>
2020-04-17 18:23:13 +03:00

25 lines
591 B
JavaScript

const { Inhibitor } = require('../../../interfaces/');
class Restricted extends Inhibitor {
constructor(client) {
super(client, {
name: 'restricted',
priority: 10,
guarded: true
});
}
execute(message, command) {
if(command.restricted && !this.client._options.bot.owners.includes(message.author.id)) {
return super._fail(`The command **${command.moduleResolveable}** can only be run by developers.`);
} else {
return super._succeed();
}
}
}
module.exports = Restricted;