2020-04-17 17:23:13 +02:00
|
|
|
const { Inhibitor } = require('../../../interfaces/');
|
2020-04-16 14:37:04 +02:00
|
|
|
|
|
|
|
class Restricted extends Inhibitor {
|
|
|
|
|
|
|
|
constructor(client) {
|
|
|
|
|
|
|
|
super(client, {
|
|
|
|
name: 'restricted',
|
|
|
|
priority: 10,
|
|
|
|
guarded: true
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
execute(message, command) {
|
2020-04-17 17:23:13 +02:00
|
|
|
if(command.restricted && !this.client._options.bot.owners.includes(message.author.id)) {
|
2020-04-16 14:37:04 +02:00
|
|
|
return super._fail(`The command **${command.moduleResolveable}** can only be run by developers.`);
|
2020-05-21 12:47:58 +02:00
|
|
|
}
|
|
|
|
return super._succeed();
|
|
|
|
|
2020-04-16 14:37:04 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
module.exports = Restricted;
|