Fix message.guild check

Signed-off-by: loicbersier <loic.bersier1@gmail.com>
This commit is contained in:
loicbersier 2020-07-23 21:18:29 +02:00
parent d12f621ce7
commit 1df280fae0

View file

@ -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*\]/,