forked from Supositware/Haha-Yes
message member on if
This commit is contained in:
parent
1aa341e0f1
commit
fe75450309
1 changed files with 5 additions and 3 deletions
8
rand.js
8
rand.js
|
@ -19,9 +19,11 @@ exports.random = function (text, message) {
|
||||||
|
|
||||||
do {
|
do {
|
||||||
if (message) {
|
if (message) {
|
||||||
text = text.replace(/\[author\]/, message.author.username);
|
if (message.member) {
|
||||||
text = text.replace(/\[member\]/g, message.guild.members.cache.random().user.username);
|
text = text.replace(/\[author\]/, message.author.username);
|
||||||
text = text.replace(/\[memberRand\]/, message.guild.members.cache.random().user.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(/\[number\]/, Math.floor((Math.random() * 9) + 1));
|
||||||
text = text.replace(/\[kick\]/, ' ');
|
text = text.replace(/\[kick\]/, ' ');
|
||||||
|
|
Loading…
Reference in a new issue