mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-25 14:21:41 +02:00
Rewrite Permission Checks and Validators
This commit is contained in:
@@ -4,12 +4,6 @@ module.exports = class RouletteCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'roulette',
|
||||
aliases: [
|
||||
'randommember',
|
||||
'randomuser',
|
||||
'pickmember',
|
||||
'pickuser'
|
||||
],
|
||||
group: 'response',
|
||||
memberName: 'roulette',
|
||||
description: 'Chooses a random member in the server.',
|
||||
@@ -18,9 +12,6 @@ module.exports = class RouletteCommand extends Command {
|
||||
}
|
||||
|
||||
run(message) {
|
||||
if (message.channel.type !== 'dm') {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
}
|
||||
return message.say(`I choose ${message.guild.members.random().displayName}!`);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user