dice (random number between 1 to 6)

This commit is contained in:
loicbersier 2020-07-11 01:24:41 +02:00
parent 284ed42afc
commit 0e3bd97223

View file

@ -25,6 +25,8 @@ exports.random = function (text, message) {
text = text.replace(/\[memberRand\]/, message.guild.members.cache.random().user.username); text = text.replace(/\[memberRand\]/, message.guild.members.cache.random().user.username);
} }
} }
text = text.replace(/\[dice\]/, Math.floor((Math.random() * 6) + 1));
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\]/, ' ');
text = text.replace(/\[ban\]/, ' '); text = text.replace(/\[ban\]/, ' ');