fixed a typo

This commit is contained in:
Loic Bersier 2018-12-01 02:50:47 +01:00
parent 4c2c2e7d27
commit 40b557a7a5
2 changed files with 4 additions and 4 deletions

View file

@ -57,7 +57,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(/\[activitie\]/, activities[randNumber(activities)]) text = text.replace(/\[activitie\]/, activities[randNumber(activities)])
text = text.replace(/\[celebreties\]/, celebreties[randNumber(celebreties)]) text = text.replace(/\[celebrities\]/, celebreties[randNumber(celebreties)])
text = text.replace(/\[countrie\]/, countries[randNumber(countries)]) text = text.replace(/\[countrie\]/, countries[randNumber(countries)])
text = text.replace(/\[diseases\]/, diseases[randNumber(diseases)]) text = text.replace(/\[diseases\]/, diseases[randNumber(diseases)])
text = text.replace(/\[elements\]/, elements[randNumber(elements)]) text = text.replace(/\[elements\]/, elements[randNumber(elements)])
@ -71,7 +71,7 @@ module.exports = class sayCommand extends Command {
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() * 9) + 1)) text = text.replace(/\[number\]/, Math.floor((Math.random() * 9) + 1))
// Verify if it replaced everything // Verify if it replaced everything
} while( text.includes('[verb]') || text.includes('[adverb]') || text.includes('[noun]') || text.includes('[adjective]') || text.includes('[member]') || text.includes('[number]') || text.includes('[activitie]') || text.includes('[celebreties]') || text.includes('[countrie]') || text.includes('[diseases]') || text.includes('[elements]') || text.includes('[hobbie]') || text.includes('[music]') || text.includes('[prefixe]') || text.includes('[pronoun]') || text.includes('[state]') || text.includes('[title]') || text.includes('[unit]')) } while( text.includes('[verb]') || text.includes('[adverb]') || text.includes('[noun]') || text.includes('[adjective]') || text.includes('[member]') || text.includes('[number]') || text.includes('[activitie]') || text.includes('[celebrities]') || text.includes('[countrie]') || text.includes('[diseases]') || text.includes('[elements]') || text.includes('[hobbie]') || text.includes('[music]') || text.includes('[prefixe]') || text.includes('[pronoun]') || text.includes('[state]') || text.includes('[title]') || text.includes('[unit]'))
// Send the final text // Send the final text
message.say(text); message.say(text);

View file

@ -57,7 +57,7 @@ module.exports = class saydCommand 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(/\[activitie\]/, activities[randNumber(activities)]) text = text.replace(/\[activitie\]/, activities[randNumber(activities)])
text = text.replace(/\[celebreties\]/, celebreties[randNumber(celebreties)]) text = text.replace(/\[celebrities\]/, celebreties[randNumber(celebreties)])
text = text.replace(/\[countrie\]/, countries[randNumber(countries)]) text = text.replace(/\[countrie\]/, countries[randNumber(countries)])
text = text.replace(/\[diseases\]/, diseases[randNumber(diseases)]) text = text.replace(/\[diseases\]/, diseases[randNumber(diseases)])
text = text.replace(/\[elements\]/, elements[randNumber(elements)]) text = text.replace(/\[elements\]/, elements[randNumber(elements)])
@ -71,7 +71,7 @@ module.exports = class saydCommand extends Command {
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() * 9) + 1)) text = text.replace(/\[number\]/, Math.floor((Math.random() * 9) + 1))
// Verify if it replaced everything // Verify if it replaced everything
} while( text.includes('[verb]') || text.includes('[adverb]') || text.includes('[noun]') || text.includes('[adjective]') || text.includes('[member]') || text.includes('[number]') || text.includes('[activitie]') || text.includes('[celebreties]') || text.includes('[countrie]') || text.includes('[diseases]') || text.includes('[elements]') || text.includes('[hobbie]') || text.includes('[music]') || text.includes('[prefixe]') || text.includes('[pronoun]') || text.includes('[state]') || text.includes('[title]') || text.includes('[unit]')) } while( text.includes('[verb]') || text.includes('[adverb]') || text.includes('[noun]') || text.includes('[adjective]') || text.includes('[member]') || text.includes('[number]') || text.includes('[activitie]') || text.includes('[celebrities]') || text.includes('[countrie]') || text.includes('[diseases]') || text.includes('[elements]') || text.includes('[hobbie]') || text.includes('[music]') || text.includes('[prefixe]') || text.includes('[pronoun]') || text.includes('[state]') || text.includes('[title]') || text.includes('[unit]'))
// Send the final text // Send the final text
message.delete(); message.delete();