change createMessage to send (eris to d.js)

This commit is contained in:
Emily 2021-07-15 12:39:19 +10:00
parent abc21ac158
commit 9d0fd0ee01
23 changed files with 71 additions and 71 deletions

View file

@ -19,7 +19,7 @@ module.exports = class {
}
run (client, message, args, data) { //eslint-disable-line no-unused-vars
if (!args[0]) return message.channel.createMessage(
if (!args[0]) return message.channel.send(
`${client.config.emojis.userError} You didn't give me an ability to look up!`
);
@ -52,7 +52,7 @@ module.exports = class {
if (json.errors) {
json.errors.forEach(error => {
if (error.message.startsWith('Failed to get data for ability')) {
message.channel.createMessage(
message.channel.send(
`${client.config.emojis.userError} I couldn't find any abilities with names similar to ${query}. Check your spelling, maybe?`
);
} else {
@ -79,7 +79,7 @@ module.exports = class {
embed.setDescription(ability.shortDesc + fieldEffects);
}
embed.addField('External Resources:', `[Bulbapedia](${ability.bulbapediaPage}) • [Serebii](${ability.serebiiPage}) • [Smogon](${ability.smogonPage})`);
message.channel.createMessage({ embed: embed });
message.channel.send({ embed: embed });
});
}
};

View file

@ -20,7 +20,7 @@ module.exports = class {
}
async run (client, message, args, data) { //eslint-disable-line no-unused-vars
if (!args[0]) return message.channel.createMessage(
if (!args[0]) return message.channel.send(
`${client.config.emojis.userError} You didn't give me a pokemon or type combination to look up! Usage: \`${message.prefix + this.name + ' ' + this.help.arguments}\``
);
@ -47,7 +47,7 @@ module.exports = class {
if (json.errors) {
json.errors.forEach(error => {
if (error.message.startsWith('No Pokémon found')) {
message.channel.createMessage(
message.channel.send(
`${client.config.emojis.userError} I couldn't find any Pokemon with names similar to ${args.join(' ').toLowerCase()}. Check your spelling, maybe?`
);
} else {
@ -81,7 +81,7 @@ module.exports = class {
if (json.errors) {
json.errors.forEach(error => {
if (error.message.includes('does not exist in "Types')) {
message.channel.createMessage(
message.channel.send(
`${client.config.emojis.userError} One or more of the types you gave me are invalid. Check your spelling, maybe?`
);
} else {
@ -120,7 +120,7 @@ module.exports = class {
**Resistances:**
${this.parseResistedTypes(typeMatchup.defending.resistedTypes, typeMatchup.defending.doubleResistedTypes)}${immune}
`);
message.channel.createMessage({ embed: embed });
message.channel.send({ embed: embed });
});
}

View file

@ -19,7 +19,7 @@ module.exports = class {
}
run (client, message, args, data) { //eslint-disable-line no-unused-vars
if (!args[0]) return message.channel.createMessage(
if (!args[0]) return message.channel.send(
`${client.config.emojis.userError} You didn't give me an item to look up!`
);
@ -53,7 +53,7 @@ module.exports = class {
if (json.errors) {
json.errors.forEach(error => {
if (error.message.startsWith('Failed to get data for item')) {
message.channel.createMessage(
message.channel.send(
`${client.config.emojis.userError} I couldn't find any items with names similar to ${query}. Check your spelling, maybe?`
);
} else {
@ -76,7 +76,7 @@ module.exports = class {
} else {
embed.setDescription(`${item.shortDesc} Added in Generation ${item.generationIntroduced}.`);
}
message.channel.createMessage({ embed: embed });
message.channel.send({ embed: embed });
});
}
};

View file

@ -20,7 +20,7 @@ module.exports = class {
}
run (client, message, args, data) { //eslint-disable-line no-unused-vars
if (!args[0]) return message.channel.createMessage(
if (!args[0]) return message.channel.send(
`${client.config.emojis.userError} You didn't give me a pokemon move to look up!`
);
@ -65,7 +65,7 @@ module.exports = class {
if (json.errors) {
json.errors.forEach(error => {
if (error.message.startsWith('Failed to get data for move')) {
message.channel.createMessage(
message.channel.send(
`${client.config.emojis.userError} I couldn't find any moves with names similar to ${query}. Check your spelling, maybe?`
);
} else {
@ -113,7 +113,7 @@ module.exports = class {
if (move.isGMax) embed.addField('G-Max Pokemon:', move.isGMax, true);
if (move.contestType !== null) embed.addField('Contest Type', move.contestType, true);
embed.addField('External Resources:', `[Bulbapedia](${move.bulbapediaPage}) • [Serebii](${move.serebiiPage}) • [Smogon](${move.smogonPage})`);
message.channel.createMessage({ embed: embed });
message.channel.send({ embed: embed });
});
}
};

View file

@ -20,7 +20,7 @@ module.exports = class {
}
async run (client, message, args, data) { //eslint-disable-line no-unused-vars
if (!args[0]) return message.channel.createMessage(
if (!args[0]) return message.channel.send(
`${client.config.emojis.userError} You didn't give me a pokemon to look up!`
);
@ -68,7 +68,7 @@ module.exports = class {
if (json.errors) {
json.errors.forEach(error => {
if (error.message.startsWith('No Pokémon found')) {
message.channel.createMessage(
message.channel.send(
`${client.config.emojis.userError} I couldn't find any Pokemon with names similar to ${query}. Check your spelling, maybe?`
);
} else {
@ -108,7 +108,7 @@ module.exports = class {
embed.addField('Egg Groups:', pokemon.eggGroups.join(', '), true);
embed.addField('Smogon Tier:', pokemon.smogonTier, true);
embed.addField('External Resources:', `[Bulbapedia](${pokemon.bulbapediaPage}) • [Serebii](${pokemon.serebiiPage}) • [Smogon](${pokemon.smogonPage})`);
message.channel.createMessage({ embed: embed });
message.channel.send({ embed: embed });
});
}