From 8e7ad06b09143402cc66c183d6d9ca58ef222218 Mon Sep 17 00:00:00 2001 From: Dragon Fire Date: Sun, 28 Apr 2024 18:26:31 -0400 Subject: [PATCH] Fix random-user in DM --- commands/random-res/random-user.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commands/random-res/random-user.js b/commands/random-res/random-user.js index 1a86245b..98ccc01c 100644 --- a/commands/random-res/random-user.js +++ b/commands/random-res/random-user.js @@ -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}!`); }