From 1df280fae0ab24714f0efb68644f47474cd7ded6 Mon Sep 17 00:00:00 2001 From: loicbersier Date: Thu, 23 Jul 2020 21:18:29 +0200 Subject: [PATCH] Fix message.guild check Signed-off-by: loicbersier --- rand.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rand.js b/rand.js index 4cba8187..79cc903c 100644 --- a/rand.js +++ b/rand.js @@ -27,11 +27,11 @@ exports.random = function (text, message) { }, { name: /\[member\]/, - value: message ? message.guild.members.cache.random().user.username : '' + value: message.guild ? message.guild.members.cache.random().user.username : '' }, { name: /\[memberRand\]/, - value: (() => message ? message.guild.members.cache.random().user.username : '') + value: (() => message.guild ? message.guild.members.cache.random().user.username : '') }, { name: /\[dice\d*\]/,