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