message member on if
This commit is contained in:
parent
1aa341e0f1
commit
fe75450309
1 changed files with 5 additions and 3 deletions
2
rand.js
2
rand.js
|
@ -19,10 +19,12 @@ exports.random = function (text, message) {
|
|||
|
||||
do {
|
||||
if (message) {
|
||||
if (message.member) {
|
||||
text = text.replace(/\[author\]/, message.author.username);
|
||||
text = text.replace(/\[member\]/g, message.guild.members.cache.random().user.username);
|
||||
text = text.replace(/\[memberRand\]/, message.guild.members.cache.random().user.username);
|
||||
}
|
||||
}
|
||||
text = text.replace(/\[number\]/, Math.floor((Math.random() * 9) + 1));
|
||||
text = text.replace(/\[kick\]/, ' ');
|
||||
text = text.replace(/\[ban\]/, ' ');
|
||||
|
|
Loading…
Reference in a new issue