forked from Supositware/Haha-Yes
Added [author]
This commit is contained in:
parent
b9d7ab2e64
commit
c4f4659e93
1 changed files with 2 additions and 1 deletions
3
rand.js
3
rand.js
|
@ -44,8 +44,9 @@ exports.random = function (text, message) {
|
|||
text = text.replace(/\[unit\]/, units[randNumber(units)]);
|
||||
text = text.replace(/\[member\]/, message.guild.members.random().user.username);
|
||||
text = text.replace(/\[number\]/, Math.floor((Math.random() * 9) + 1));
|
||||
text = text.replace(/\[author\]/, message.author.username);
|
||||
// Verify if it replaced everything
|
||||
} while( text.includes('[verb]') || text.includes('[adverbs]') || text.includes('[noun]') || text.includes('[adjective]') || text.includes('[member]') || text.includes('[number]') || text.includes('[activities]') || text.includes('[celebrities]') || text.includes('[countries]') || text.includes('[diseases]') || text.includes('[elements]') || text.includes('[hobbies]') || text.includes('[music]') || text.includes('[prefixes]') || text.includes('[pronoun]') || text.includes('[state]') || text.includes('[title]') || text.includes('[unit]'));
|
||||
} while( text.includes('[verb]') || text.includes('[adverbs]') || text.includes('[noun]') || text.includes('[adjective]') || text.includes('[member]') || text.includes('[number]') || text.includes('[activities]') || text.includes('[celebrities]') || text.includes('[countries]') || text.includes('[diseases]') || text.includes('[elements]') || text.includes('[hobbies]') || text.includes('[music]') || text.includes('[prefixes]') || text.includes('[pronoun]') || text.includes('[state]') || text.includes('[title]') || text.includes('[unit]') || text.includes('[author]'));
|
||||
|
||||
return text;
|
||||
};
|
Loading…
Reference in a new issue