mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-21 14:04:38 +02:00
Fix lots of code dupe
This commit is contained in:
@@ -14,8 +14,8 @@ module.exports = class RandomUserCommand extends Command {
|
||||
run(msg) {
|
||||
if (msg.channel.type === 'dm') {
|
||||
const members = [this.client.user, msg.channel.recipient];
|
||||
return msg.say(`I choose ${members[Math.floor(Math.random() * members.length)].username}!`);
|
||||
return msg.say(`I choose ${members[Math.floor(Math.random() * members.length)].tag}!`);
|
||||
}
|
||||
return msg.say(`I choose ${msg.guild.members.cache.random().displayName}!`);
|
||||
return msg.say(`I choose ${msg.guild.members.cache.random().user.tag}!`);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user