Split random response and random image, Lando Command

This commit is contained in:
Dragon Fire
2020-03-23 11:42:43 -04:00
parent faa42bd6d8
commit 9745b15e57
57 changed files with 101 additions and 66 deletions
+21
View File
@@ -0,0 +1,21 @@
const Command = require('../../structures/Command');
module.exports = class RandomUserCommand extends Command {
constructor(client) {
super(client, {
name: 'random-user',
aliases: ['member-roulette', 'user-roulette', 'random-member', 'someone', '@someone'],
group: 'random-res',
memberName: 'random-user',
description: 'Randomly chooses a member of the server.'
});
}
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 ${msg.guild.members.cache.random().displayName}!`);
}
};