Fix random-user in DM

This commit is contained in:
Dragon Fire
2024-04-28 18:26:31 -04:00
parent e15c7e0cf4
commit 8e7ad06b09
+1 -1
View File
@@ -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}!`);
}