changed name of adverb

This commit is contained in:
Loic Bersier 2018-12-03 03:45:03 +01:00
parent aa59eb6fa6
commit add06c827f
2 changed files with 10 additions and 10 deletions

View file

@ -8,7 +8,7 @@ module.exports = class sayCommand extends Command {
aliases: ['repeat'], aliases: ['repeat'],
group: 'fun', group: 'fun',
memberName: 'say', memberName: 'say',
description: `Repeat the text you send ( can also use [verb] [noun] [adverb] [adjective] [activitie] [celebreties] [countrie] [diseases] [elements] [hobbie] [music] [prefixe] [pronoun] [state] [title] [unit] [member] [number] to replace it with something else )`, description: `Repeat the text you send ( can also use [verb] [noun] [adverbs] [adjective] [activitie] [celebreties] [countrie] [diseases] [elements] [hobbie] [music] [prefixe] [pronoun] [state] [title] [unit] [member] [number] to replace it with something else )`,
args: [ args: [
{ {
key: 'text', key: 'text',
@ -28,8 +28,8 @@ module.exports = class sayCommand extends Command {
// Load all the different files // Load all the different files
const verb = require('../../dictionary/verbs.json') const verb = require('../../dictionary/verbs.json')
const noun = require('../../dictionary/noun.json') const noun = require('../../dictionary/noun.json')
const adverb = require('../../dictionary/adjectives.json') const adverbs = require('../../dictionary/adjectives.json')
const adjective = require('../../dictionary/adverbs.json') const adjective = require('../../dictionary/adverbss.json')
const activities = require('../../dictionary/activities.json') const activities = require('../../dictionary/activities.json')
const celebreties = require('../../dictionary/celebreties.json') const celebreties = require('../../dictionary/celebreties.json')
const countries = require('../../dictionary/countries.json') const countries = require('../../dictionary/countries.json')
@ -53,7 +53,7 @@ module.exports = class sayCommand extends Command {
// Replace with a random word from the json // Replace with a random word from the json
do { do {
text = text.replace(/\[verb\]/, verb[randNumber(verb)]) text = text.replace(/\[verb\]/, verb[randNumber(verb)])
text = text.replace(/\[adverb\]/, adverb[randNumber(adverb)]) text = text.replace(/\[adverbs\]/, adverbs[randNumber(adverbs)])
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(/\[activities\]/, activities[randNumber(activities)]) text = text.replace(/\[activities\]/, activities[randNumber(activities)])
@ -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('[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]'))
// Send the final text // Send the final text
message.say(text); message.say(text);

View file

@ -8,7 +8,7 @@ module.exports = class saydCommand extends Command {
aliases: ['repeatd'], aliases: ['repeatd'],
group: 'fun', group: 'fun',
memberName: 'sayd', memberName: 'sayd',
description: `Repeat the text you send and dellete it afterward ( can also use [verb] [noun] [adverb] [adjective] [activitie] [celebreties] [countrie] [diseases] [elements] [hobbie] [music] [prefixe] [pronoun] [state] [title] [unit] [member] [number] to replace it with something else )`, description: `Repeat the text you send and dellete it afterward ( can also use [verb] [noun] [adverbs] [adjective] [activitie] [celebreties] [countrie] [diseases] [elements] [hobbie] [music] [prefixe] [pronoun] [state] [title] [unit] [member] [number] to replace it with something else )`,
args: [ args: [
{ {
key: 'text', key: 'text',
@ -28,8 +28,8 @@ module.exports = class saydCommand extends Command {
// Load all the different files // Load all the different files
const verb = require('../../dictionary/verbs.json') const verb = require('../../dictionary/verbs.json')
const noun = require('../../dictionary/noun.json') const noun = require('../../dictionary/noun.json')
const adverb = require('../../dictionary/adjectives.json') const adverbs = require('../../dictionary/adjectives.json')
const adjective = require('../../dictionary/adverbs.json') const adjective = require('../../dictionary/adverbss.json')
const activities = require('../../dictionary/activities.json') const activities = require('../../dictionary/activities.json')
const celebreties = require('../../dictionary/celebreties.json') const celebreties = require('../../dictionary/celebreties.json')
const countries = require('../../dictionary/countries.json') const countries = require('../../dictionary/countries.json')
@ -53,7 +53,7 @@ module.exports = class saydCommand extends Command {
// Replace with a random word from the json // Replace with a random word from the json
do { do {
text = text.replace(/\[verb\]/, verb[randNumber(verb)]) text = text.replace(/\[verb\]/, verb[randNumber(verb)])
text = text.replace(/\[adverb\]/, adverb[randNumber(adverb)]) text = text.replace(/\[adverbs\]/, adverbs[randNumber(adverbs)])
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(/\[activities\]/, activities[randNumber(activities)]) text = text.replace(/\[activities\]/, activities[randNumber(activities)])
@ -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('[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]'))
// Send the final text // Send the final text
message.delete(); message.delete();