From ea3edd900be3070477d8975a3bce162970211bd1 Mon Sep 17 00:00:00 2001 From: Loic Bersier Date: Wed, 28 Nov 2018 19:09:14 +0100 Subject: [PATCH] dosent take bot --- commands/fun/random.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commands/fun/random.js b/commands/fun/random.js index 1ce5f7b1..83f7fba5 100644 --- a/commands/fun/random.js +++ b/commands/fun/random.js @@ -41,7 +41,7 @@ module.exports = class RandomCommand extends Command { text = text.replace(/\[adverb\]/, adverb[randNumber(adverb)]) text = text.replace(/\[noun\]/, noun[randNumber(noun)]) text = text.replace(/\[adjective\]/, adjective[randNumber(adjective)]) - text = text.replace(/\[member\]/, message.guild.members.random().user.username) + text = text.replace(/\[member\]/, message.guild.members.filter(member => !member.user.bot).random().user.username) } while( text.includes('[verb]') || text.includes('[adverb]') || text.includes('[noun]') || text.includes('[adjective]' || text.includes('[member]')) ) // Send the final text