random number dosent put 10 anymore

This commit is contained in:
Loic Bersier 2018-11-28 21:53:11 +01:00
parent 52a7a1c48d
commit 204bb8bcb1

View file

@ -42,7 +42,7 @@ module.exports = class sayCommand extends Command {
text = text.replace(/\[noun\]/, noun[randNumber(noun)]) text = text.replace(/\[noun\]/, noun[randNumber(noun)])
text = text.replace(/\[adjective\]/, adjective[randNumber(adjective)]) text = text.replace(/\[adjective\]/, adjective[randNumber(adjective)])
text = text.replace(/\[member\]/, message.guild.members.random().user.username) text = text.replace(/\[member\]/, message.guild.members.random().user.username)
text = text.replace(/\[number\]/, Math.floor((Math.random() * 10) + 1)) text = text.replace(/\[number\]/, Math.floor((Math.random() * 9) + 1))
} while( text.includes('[verb]') || text.includes('[adverb]') || text.includes('[noun]') || text.includes('[adjective]') || text.includes('[member]') || text.includes('[number]') ) } while( text.includes('[verb]') || text.includes('[adverb]') || text.includes('[noun]') || text.includes('[adjective]') || text.includes('[member]') || text.includes('[number]') )
// Send the final text // Send the final text