Files
xiao/structures/Command.js
T
2017-09-03 22:26:43 +00:00

23 lines
470 B
JavaScript

const { Command } = require('discord.js-commando');
class XiaoCommand extends Command {
constructor(client, info) {
super(client, info);
this.ownerOnly = info.ownerOnly;
this.throttling = info.throttling || {
usages: 1,
duration: 2
};
}
hasPermission(msg) {
if (this.ownerOnly && !this.client.isOwner(msg.author)) {
return `The \`${this.name}\` command can only be used by the bot owner.`;
}
return true;
}
}
module.exports = XiaoCommand;