remove constants directory
This commit is contained in:
parent
c297e45a64
commit
4d8eecff04
19 changed files with 74 additions and 79 deletions
|
@ -1,4 +1,3 @@
|
|||
const Embed = require('../../util/embed');
|
||||
const fetch = require('node-fetch');
|
||||
|
||||
module.exports = class {
|
||||
|
@ -21,7 +20,7 @@ module.exports = class {
|
|||
|
||||
run (client, message, args, data) { //eslint-disable-line no-unused-vars
|
||||
if (!args[0]) return message.channel.createMessage(
|
||||
`${client.constants.emojis.userError} You didn't give me an ability to look up!`
|
||||
`${client.emojis.userError} You didn't give me an ability to look up!`
|
||||
);
|
||||
|
||||
message.channel.sendTyping();
|
||||
|
@ -53,7 +52,7 @@ module.exports = class {
|
|||
json.errors.forEach(error => {
|
||||
if (error.message.startsWith('Failed to get data for ability')) {
|
||||
message.channel.createMessage(
|
||||
`${client.constants.emojis.userError} I couldn't find any abilities with names similar to ${query}. Check your spelling, maybe?`
|
||||
`${client.emojis.userError} I couldn't find any abilities with names similar to ${query}. Check your spelling, maybe?`
|
||||
);
|
||||
} else {
|
||||
client.logger.error('POKEMON_FETCH_ERROR', error.message);
|
||||
|
@ -70,7 +69,7 @@ module.exports = class {
|
|||
fieldEffects = ` Outside of battle, ${ability.isFieldAbility}`;
|
||||
}
|
||||
|
||||
const embed = new Embed()
|
||||
const embed = new client.RichEmbed()
|
||||
.setColour(client.functions.displayHexColour(message.channel.guild, client.user.id))
|
||||
.setTitle(ability.name.toProperCase());
|
||||
if (ability.desc) {
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
const Embed = require('../../util/embed');
|
||||
const { typeArray, colours } = require('../../assets/constants/pokemon.json');
|
||||
const { typeArray, colours } = require('../../assets/pokemon.json');
|
||||
const fetch = require('node-fetch');
|
||||
|
||||
module.exports = class {
|
||||
|
@ -22,7 +21,7 @@ module.exports = class {
|
|||
|
||||
async run (client, message, args, data) { //eslint-disable-line no-unused-vars
|
||||
if (!args[0]) return message.channel.createMessage(
|
||||
`${client.constants.emojis.userError} You didn't give me a pokemon or type combination to look up! Usage: \`${message.prefix + this.name + ' ' + this.help.arguments}\``
|
||||
`${client.emojis.userError} You didn't give me a pokemon or type combination to look up! Usage: \`${message.prefix + this.name + ' ' + this.help.arguments}\``
|
||||
);
|
||||
|
||||
message.channel.sendTyping();
|
||||
|
@ -48,7 +47,7 @@ module.exports = class {
|
|||
json.errors.forEach(error => {
|
||||
if (error.message.startsWith('No Pokémon found')) {
|
||||
message.channel.createMessage(
|
||||
`${client.constants.emojis.userError} I couldn't find any Pokemon with names similar to ${args.join(' ').toLowerCase()}. Check your spelling, maybe?`
|
||||
`${client.emojis.userError} I couldn't find any Pokemon with names similar to ${args.join(' ').toLowerCase()}. Check your spelling, maybe?`
|
||||
);
|
||||
} else {
|
||||
client.logger.error('MATCHUP_FETCH_ERROR', error.message);
|
||||
|
@ -82,7 +81,7 @@ module.exports = class {
|
|||
json.errors.forEach(error => {
|
||||
if (error.message.includes('does not exist in "Types')) {
|
||||
message.channel.createMessage(
|
||||
`${client.constants.emojis.userError} One or more of the types you gave me are invalid. Check your spelling, maybe?`
|
||||
`${client.emojis.userError} One or more of the types you gave me are invalid. Check your spelling, maybe?`
|
||||
);
|
||||
} else {
|
||||
client.logger.error('MATCHUP_FETCH_ERROR', error.message);
|
||||
|
@ -105,7 +104,7 @@ module.exports = class {
|
|||
${typeMatchup.defending.effectlessTypes.map(type => `\`${type.toProperCase()}\``).join(' ')}
|
||||
`;
|
||||
|
||||
const embed = new Embed()
|
||||
const embed = new client.RichEmbed()
|
||||
.setColour(colours[types[0].toProperCase()])
|
||||
.setTitle('Type effectiveness of ' + types.map(type => type.toProperCase()).join(' and '))
|
||||
.addField('Offensive:', `
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
const fetch = require('node-fetch');
|
||||
const Embed = require('../../util/embed');
|
||||
|
||||
module.exports = class {
|
||||
constructor (name, category) {
|
||||
|
@ -21,7 +20,7 @@ module.exports = class {
|
|||
|
||||
run (client, message, args, data) { //eslint-disable-line no-unused-vars
|
||||
if (!args[0]) return message.channel.createMessage(
|
||||
`${client.constants.emojis.userError} You didn't give me an item to look up!`
|
||||
`${client.emojis.userError} You didn't give me an item to look up!`
|
||||
);
|
||||
|
||||
message.channel.sendTyping();
|
||||
|
@ -54,7 +53,7 @@ module.exports = class {
|
|||
json.errors.forEach(error => {
|
||||
if (error.message.startsWith('Failed to get data for item')) {
|
||||
message.channel.createMessage(
|
||||
`${client.constants.emojis.userError} I couldn't find any items with names similar to ${query}. Check your spelling, maybe?`
|
||||
`${client.emojis.userError} I couldn't find any items with names similar to ${query}. Check your spelling, maybe?`
|
||||
);
|
||||
} else {
|
||||
client.logger.error('POKEMON_FETCH_ERROR', error.message);
|
||||
|
@ -66,7 +65,7 @@ module.exports = class {
|
|||
|
||||
const item = json.data.getItemDetailsByFuzzy;
|
||||
|
||||
const embed = new Embed()
|
||||
const embed = new client.RichEmbed()
|
||||
.setColour(client.functions.displayHexColour(message.channel.guild, client.user.id))
|
||||
.setTitle(item.name)
|
||||
.setThumbnail(item.sprite)
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
const fetch = require('node-fetch');
|
||||
const Embed = require('../../util/embed');
|
||||
const { colours } = require('../../assets/constants/pokemon.json');
|
||||
const { colours } = require('../../assets/pokemon.json');
|
||||
|
||||
module.exports = class {
|
||||
constructor (name, category) {
|
||||
|
@ -22,7 +21,7 @@ module.exports = class {
|
|||
|
||||
run (client, message, args, data) { //eslint-disable-line no-unused-vars
|
||||
if (!args[0]) return message.channel.createMessage(
|
||||
`${client.constants.emojis.userError} You didn't give me a pokemon move to look up!`
|
||||
`${client.emojis.userError} You didn't give me a pokemon move to look up!`
|
||||
);
|
||||
|
||||
message.channel.sendTyping();
|
||||
|
@ -66,7 +65,7 @@ module.exports = class {
|
|||
json.errors.forEach(error => {
|
||||
if (error.message.startsWith('Failed to get data for move')) {
|
||||
message.channel.createMessage(
|
||||
`${client.constants.emojis.userError} I couldn't find any moves with names similar to ${query}. Check your spelling, maybe?`
|
||||
`${client.emojis.userError} I couldn't find any moves with names similar to ${query}. Check your spelling, maybe?`
|
||||
);
|
||||
} else {
|
||||
client.logger.error('POKEMON_FETCH_ERROR', error.message);
|
||||
|
@ -91,7 +90,7 @@ module.exports = class {
|
|||
let fieldEffects = '';
|
||||
if (move.isFieldMove) fieldEffects = ' Outside of battle, ' + move.isFieldMove;
|
||||
|
||||
const embed = new Embed()
|
||||
const embed = new client.RichEmbed()
|
||||
.setColour(colours[move.type])
|
||||
.setTitle(move.name.toProperCase() + suffix);
|
||||
if (move.desc) {
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
const Embed = require('../../util/embed');
|
||||
const { colours } = require('../../assets/constants/pokemon.json');
|
||||
const { colours } = require('../../assets/pokemon.json');
|
||||
const fetch = require('node-fetch');
|
||||
|
||||
module.exports = class {
|
||||
|
@ -22,7 +21,7 @@ module.exports = class {
|
|||
|
||||
async run (client, message, args, data) { //eslint-disable-line no-unused-vars
|
||||
if (!args[0]) return message.channel.createMessage(
|
||||
`${client.constants.emojis.userError} You didn't give me a pokemon to look up!`
|
||||
`${client.emojis.userError} You didn't give me a pokemon to look up!`
|
||||
);
|
||||
|
||||
message.channel.sendTyping();
|
||||
|
@ -69,7 +68,7 @@ module.exports = class {
|
|||
json.errors.forEach(error => {
|
||||
if (error.message.startsWith('No Pokémon found')) {
|
||||
message.channel.createMessage(
|
||||
`${client.constants.emojis.userError} I couldn't find any Pokemon with names similar to ${query}. Check your spelling, maybe?`
|
||||
`${client.emojis.userError} I couldn't find any Pokemon with names similar to ${query}. Check your spelling, maybe?`
|
||||
);
|
||||
} else {
|
||||
client.logger.error('POKEMON_FETCH_ERROR', error.message);
|
||||
|
@ -92,7 +91,7 @@ module.exports = class {
|
|||
formes = formes.split().concat(pokemon.cosmeticFormes);
|
||||
}
|
||||
}
|
||||
const embed = new Embed()
|
||||
const embed = new client.RichEmbed()
|
||||
.setColour(colours[pokemon.types[0]])
|
||||
.setTitle(`${pokemon.species.toProperCase()} (No. ${pokemon.num})`)
|
||||
.setDescription(pokemon.flavorTexts[0].flavor)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue