diff --git a/bot/commands/Bot/help.js b/bot/commands/Bot/help.js index b7b8656..233b5f8 100644 --- a/bot/commands/Bot/help.js +++ b/bot/commands/Bot/help.js @@ -48,7 +48,7 @@ module.exports = class { }); embed.setFooter('<> = required, / = either/or, [] = optional'); - return message.channel.createMessage({ embed: embed }); + return message.channel.send({ embed: embed }); } const cat = args[0].toProperCase(); @@ -70,7 +70,7 @@ module.exports = class { .setDescription(cmds) .setFooter('<> = required, / = either/or, [] = optional'); - return message.channel.createMessage({ embed: embed }); + return message.channel.send({ embed: embed }); } if (client.commands.has(cmd) || client.aliases.has(cmd)) { @@ -87,9 +87,9 @@ module.exports = class { if (command.botPerms.length > 0) embed.addField('Bot permissions:', command.botPerms.join(', '), true); embed.addField('Cooldown:', `${command.cooldown / 1000} seconds`, true); embed.setFooter('<> = required, / = either/or, [] = optional'); - return message.channel.createMessage({ embed: embed }); + return message.channel.send({ embed: embed }); } - return message.channel.createMessage(`${client.config.emojis.userError} ${cmd} doesn't appear to be a command, alias, or category. Are you sure you spelt it right?`); + return message.channel.send(`${client.config.emojis.userError} ${cmd} doesn't appear to be a command, alias, or category. Are you sure you spelt it right?`); } }; \ No newline at end of file diff --git a/bot/commands/Bot/ping.js b/bot/commands/Bot/ping.js index 4d00331..769aa1d 100644 --- a/bot/commands/Bot/ping.js +++ b/bot/commands/Bot/ping.js @@ -19,7 +19,7 @@ module.exports = class { } run (client, message, args, data) { //eslint-disable-line no-unused-vars - message.channel.createMessage(replies.ping.random()) + message.channel.send(replies.ping.random()) .then(m => { m.edit(`${m.content} \`roundtrip: ${m.timestamp - message.timestamp}ms | websocket: ${message.channel.guild.shard.latency}ms\``); }); diff --git a/bot/commands/Configuration/blocklist.js b/bot/commands/Configuration/blocklist.js index acfb9ee..714cc04 100644 --- a/bot/commands/Configuration/blocklist.js +++ b/bot/commands/Configuration/blocklist.js @@ -24,14 +24,14 @@ module.exports = class { list.push(`${user.username}#${user.discriminator}`); } - if (list.length === 0) return message.channel.createMessage('The server blocklist is currently empty. Use `blocklist add ` to add people to the blocklist!'); + if (list.length === 0) return message.channel.send('The server blocklist is currently empty. Use `blocklist add ` to add people to the blocklist!'); const embed = new client.RichEmbed() .setTitle('Users on blocklist: ' + data.guild.blocklist.length) .setDescription('```' + list.join(', ') + '```') .setColour(client.functions.displayHexColour(message.channel.guild)); - message.channel.createMessage({ embed: embed }); + message.channel.send({ embed: embed }); return; } @@ -39,10 +39,10 @@ module.exports = class { action = action.toLowerCase(); if (action !== 'add' & action !== 'remove') { - return message.channel.createMessage(`${client.config.emojis.userError} You didn't specify a valid action. Usage: \`${this.help.usage}\``); + return message.channel.send(`${client.config.emojis.userError} You didn't specify a valid action. Usage: \`${this.help.usage}\``); } - if (!user) return message.channel.createMessage( + if (!user) return message.channel.send( `${client.config.emojis.userError} You didn't specify a user. Usage: \`${message.prefix + this.help.usage}\`` ); @@ -56,11 +56,11 @@ module.exports = class { if (!member) { member = await message.channel.guild.searchMembers(user.join(' '), 2); - if (member.length === 0) return message.channel.createMessage( + if (member.length === 0) return message.channel.send( `${client.config.emojis.userError} No users found. Check for mispellings, or ping the user instead.` ); - if (member.length > 1) return message.channel.createMessage( + if (member.length > 1) return message.channel.send( `${client.config.emojis.userError} Found more than one user, try refining your search or pinging the user instead.` ); @@ -71,25 +71,25 @@ module.exports = class { const blocklist = data.guild.blocklist; if (action === 'add') { - if (member.id === message.channel.guild.ownerID) return message.channel.createMessage( + if (member.id === message.channel.guild.ownerID) return message.channel.send( `${client.config.emojis.userError} You can't block the owner, silly!` ); if (client.functions.highestRole(member).position >= client.functions.highestRole(message.member).position && message.member.id !== message.channel.guild.ownerID) { - return message.channel.createMessage(`${client.config.emojis.userError} This user has a higher role than you, you can't add them to the blocklist!`); + return message.channel.send(`${client.config.emojis.userError} This user has a higher role than you, you can't add them to the blocklist!`); } - if (blocklist.includes(member.id)) return message.channel.createMessage( + if (blocklist.includes(member.id)) return message.channel.send( `${client.config.emojis.userError} This user is already on the blocklist, you can't add them twice!` ); blocklist.push(member.id); client.db.updateGuild(message.channel.guild.id, 'blocklist', blocklist).then(() => { - message.channel.createMessage(`${client.config.emojis.success} Added \`${member.username}#${member.discriminator}\` to the blocklist.`); + message.channel.send(`${client.config.emojis.success} Added \`${member.username}#${member.discriminator}\` to the blocklist.`); }).catch(error => { client.logger.error('GUILD_UPDATE_ERROR', error); - message.channel.createMessage(`${client.config.emojis.botError} An error occured while adding this user to the blocklist, please try again! **Error:** ${error}`); + message.channel.send(`${client.config.emojis.botError} An error occured while adding this user to the blocklist, please try again! **Error:** ${error}`); }) ; return; @@ -97,20 +97,20 @@ module.exports = class { if (action === 'remove') { if (client.functions.highestRole(member).position >= client.functions.highestRole(message.member).position && message.member.id !== message.channel.guild.ownerID) { - return message.channel.createMessage(`${client.config.emojis.userError} This user has a higher role than you, you can't remove them to the blocklist!`); + return message.channel.send(`${client.config.emojis.userError} This user has a higher role than you, you can't remove them to the blocklist!`); } - if (!blocklist.includes(member.id)) return message.channel.createMessage( + if (!blocklist.includes(member.id)) return message.channel.send( `${client.config.emojis.userError} This user isn't on the blocklist.` ); blocklist.remove(member.id); client.db.updateGuild(message.channel.guild.id, 'blocklist', blocklist).then(() => { - message.channel.createMessage(`${client.config.emojis.success} Removed \`${member.username}#${member.discriminator}\` from the blocklist.`); + message.channel.send(`${client.config.emojis.success} Removed \`${member.username}#${member.discriminator}\` from the blocklist.`); }).catch(error => { client.logger.error('GUILD_UPDATE_ERROR', error); - message.channel.createMessage(`${client.config.emojis.botError} An error occured while removing this user from the blocklist, please try again! **Error:** ${error}`); + message.channel.send(`${client.config.emojis.botError} An error occured while removing this user from the blocklist, please try again! **Error:** ${error}`); }) ; return; diff --git a/bot/commands/Configuration/disable.js b/bot/commands/Configuration/disable.js index cbcf659..1bf46e0 100644 --- a/bot/commands/Configuration/disable.js +++ b/bot/commands/Configuration/disable.js @@ -26,7 +26,7 @@ module.exports = class { return; } - if (!args[1]) return message.channel.createMessage( + if (!args[1]) return message.channel.send( `${client.config.emojis.userError} You didn't specify what command/category to disable. Usage: \`${this.help.usage}\`` ); @@ -41,17 +41,17 @@ module.exports = class { command = client.commands.get(client.aliases.get(args[1])); } - if (!command) return message.channel.createMessage( + if (!command) return message.channel.send( `${client.config.emojis.userError} ${args[1]} isn't a command or an alias, are you sure you spelt it correctly?` ); if (essential.commands.includes(command.name) || essential.categories.includes(command.category)) { - return message.channel.createMessage( + return message.channel.send( `${client.config.emojis.userError} This command is essential and cannot be disabled. Sorry!` ); } - if (disabled.includes(command.name)) return message.channel.createMessage( + if (disabled.includes(command.name)) return message.channel.send( `${client.config.emojis.userError} This command is already disabled.` ); @@ -59,7 +59,7 @@ module.exports = class { await client.db.updateGuild(message.channel.guild.id, 'disabledcommands', disabled); - return message.channel.createMessage( + return message.channel.send( `${client.config.emojis.success} Added **${args[1]}** to the list of disabled commands for this server.` ); } @@ -75,11 +75,11 @@ module.exports = class { command = client.commands.get(client.aliases.get(args[1])); } - if (!command) return message.channel.createMessage( + if (!command) return message.channel.send( `${client.config.emojis.userError} ${args[1]} isn't a category, are you sure you spelt it correctly?` ); - if (!disabled.includes(command.name)) return message.channel.createMessage( + if (!disabled.includes(command.name)) return message.channel.send( `${client.config.emojis.userError} This category isn't disabled.` ); @@ -87,7 +87,7 @@ module.exports = class { await client.db.updateGuild(message.channel.guild.id, 'disabledcommands', disabled); - return message.channel.createMessage( + return message.channel.send( `${client.config.emojis.success} Added **${args[1]}** to the list of disabled category for this server!` ); } diff --git a/bot/commands/Configuration/userprefix.js b/bot/commands/Configuration/userprefix.js index ce46817..1e465f6 100644 --- a/bot/commands/Configuration/userprefix.js +++ b/bot/commands/Configuration/userprefix.js @@ -18,14 +18,14 @@ module.exports = class { async run (client, message, args, data) { if (!args[0]) { - return message.channel.createMessage( + return message.channel.send( `Your prefix for Woomy is currently: \`${data.user.prefix}\`` ); } await client.db.updateUser(message.author.id, 'prefix', args[0]); - message.channel.createMessage( + message.channel.send( `${client.config.emojis.success} Your personal prefix has been set to: \`${args[0]}\`` ); } diff --git a/bot/commands/Developer/eval.js b/bot/commands/Developer/eval.js index 1e8d66f..c1462fb 100644 --- a/bot/commands/Developer/eval.js +++ b/bot/commands/Developer/eval.js @@ -23,17 +23,17 @@ module.exports = class { const clean = await client.functions.clean(evaled); const MAX_CHARS = 3 + 2 + clean.length + 3; if (MAX_CHARS > 2000) { - return message.channel.createMessage(undefined, { file: Buffer.from(clean), name: 'EVAL_SUCCESS.js' }); + return message.channel.send(undefined, { file: Buffer.from(clean), name: 'EVAL_SUCCESS.js' }); } - message.channel.createMessage(`\`\`\`js\n${clean}\n\`\`\``); + message.channel.send(`\`\`\`js\n${clean}\n\`\`\``); } catch (err) { const e = await client.functions.clean(err); const MAX_CHARS = 3 + 2 + e.length + 3; if (MAX_CHARS > 2000) { - return message.channel.createMessage(undefined, { file: Buffer.from(e), name: 'EVAL_ERROR.txt' }); + return message.channel.send(undefined, { file: Buffer.from(e), name: 'EVAL_ERROR.txt' }); } - message.channel.createMessage(`\`\`\`xl\n${e}\n\`\`\``); + message.channel.send(`\`\`\`xl\n${e}\n\`\`\``); } } }; \ No newline at end of file diff --git a/bot/commands/Developer/reload.js b/bot/commands/Developer/reload.js index 8c6d25f..2e73b0f 100644 --- a/bot/commands/Developer/reload.js +++ b/bot/commands/Developer/reload.js @@ -19,6 +19,6 @@ module.exports = class { run (client, message, args, data) { //eslint-disable-line no-unused-vars client.commandLoader.reloadCommands(); client.eventLoader.reloadEventModules(); - message.channel.createMessage('All commands and event modules have been reloaded!'); + message.channel.send('All commands and event modules have been reloaded!'); } }; \ No newline at end of file diff --git a/bot/commands/Fun/colour.js b/bot/commands/Fun/colour.js index d0c7ea6..5d4cb27 100644 --- a/bot/commands/Fun/colour.js +++ b/bot/commands/Fun/colour.js @@ -41,6 +41,6 @@ module.exports = class { .setColour(colour) .setImage(`https://fakeimg.pl/256x256/${colour.replace('#', '')}/?text=%20`); - message.channel.createMessage({ embed: embed }); + message.channel.send({ embed: embed }); } }; \ No newline at end of file diff --git a/bot/commands/Fun/garfield.js b/bot/commands/Fun/garfield.js index 2e63116..dbd9740 100644 --- a/bot/commands/Fun/garfield.js +++ b/bot/commands/Fun/garfield.js @@ -30,10 +30,10 @@ module.exports = class { .setColour(client.functions.displayHexColour(message.channel.guild)) .setURL('https://www.mezzacotta.net/garfield/?comic=' + json.data.number) .setImage(json.data.image.src); - message.channel.createMessage({ embed: embed }); + message.channel.send({ embed: embed }); }) .catch(err => { - message.channel.createMessage(`${client.config.emojis.botError} An error has occurred: ${err}`); + message.channel.send(`${client.config.emojis.botError} An error has occurred: ${err}`); }); } }; \ No newline at end of file diff --git a/bot/commands/Fun/inspire.js b/bot/commands/Fun/inspire.js index fe7dbd3..f05a502 100644 --- a/bot/commands/Fun/inspire.js +++ b/bot/commands/Fun/inspire.js @@ -23,9 +23,9 @@ module.exports = class { try { fetch('http://inspirobot.me/api?generate=true', { headers: { 'User-Agent': client.config.userAgent }}) .then(res => res.text()) - .then(body => message.channel.createMessage(body)); + .then(body => message.channel.send(body)); } catch (err) { - message.channel.createMessage(`${client.config.emojis.botError} An error has occurred: ${err}`); + message.channel.send(`${client.config.emojis.botError} An error has occurred: ${err}`); } } }; \ No newline at end of file diff --git a/bot/commands/Pokemon/ability.js b/bot/commands/Pokemon/ability.js index 743ae5c..1746bb9 100644 --- a/bot/commands/Pokemon/ability.js +++ b/bot/commands/Pokemon/ability.js @@ -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 }); }); } }; \ No newline at end of file diff --git a/bot/commands/Pokemon/effective.js b/bot/commands/Pokemon/effective.js index af9ada4..43552c9 100644 --- a/bot/commands/Pokemon/effective.js +++ b/bot/commands/Pokemon/effective.js @@ -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 }); }); } diff --git a/bot/commands/Pokemon/item.js b/bot/commands/Pokemon/item.js index e30a45f..3b8db71 100644 --- a/bot/commands/Pokemon/item.js +++ b/bot/commands/Pokemon/item.js @@ -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 }); }); } }; \ No newline at end of file diff --git a/bot/commands/Pokemon/move.js b/bot/commands/Pokemon/move.js index 6a82f6d..d711a10 100644 --- a/bot/commands/Pokemon/move.js +++ b/bot/commands/Pokemon/move.js @@ -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 }); }); } }; \ No newline at end of file diff --git a/bot/commands/Pokemon/pokemon.js b/bot/commands/Pokemon/pokemon.js index 19bf8c3..8a5884e 100644 --- a/bot/commands/Pokemon/pokemon.js +++ b/bot/commands/Pokemon/pokemon.js @@ -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 }); }); } diff --git a/bot/commands/Splatoon/salmonrun.js b/bot/commands/Splatoon/salmonrun.js index 243736f..2cbeb8a 100644 --- a/bot/commands/Splatoon/salmonrun.js +++ b/bot/commands/Splatoon/salmonrun.js @@ -68,7 +68,7 @@ module.exports = class { }); }) .catch(err => { - message.channel.createMessage(`${client.config.emojis.botError} An error has occurred: ${err}`); + message.channel.send(`${client.config.emojis.botError} An error has occurred: ${err}`); }); } }; \ No newline at end of file diff --git a/bot/commands/Splatoon/splatnet.js b/bot/commands/Splatoon/splatnet.js index ef95cee..173a495 100644 --- a/bot/commands/Splatoon/splatnet.js +++ b/bot/commands/Splatoon/splatnet.js @@ -44,7 +44,7 @@ module.exports = class { createPaginationEmbed(message, embeds); }) .catch(err => { - message.channel.createMessage(`${client.config.emojis.botError} An error has occurred: ${err}`); + message.channel.send(`${client.config.emojis.botError} An error has occurred: ${err}`); }); } }; \ No newline at end of file diff --git a/bot/commands/Splatoon/splatoonmaps.js b/bot/commands/Splatoon/splatoonmaps.js index 3633f43..439c72a 100644 --- a/bot/commands/Splatoon/splatoonmaps.js +++ b/bot/commands/Splatoon/splatoonmaps.js @@ -50,7 +50,7 @@ module.exports = class { createPaginationEmbed(message, embeds); }) .catch(err => { - message.channel.createMessage(`${client.config.emojis.botError} An error has occurred: ${err}`); + message.channel.send(`${client.config.emojis.botError} An error has occurred: ${err}`); }); } }; \ No newline at end of file diff --git a/bot/commands/Utility/avatar.js b/bot/commands/Utility/avatar.js index 62f4ddf..7ca3fe4 100644 --- a/bot/commands/Utility/avatar.js +++ b/bot/commands/Utility/avatar.js @@ -29,11 +29,11 @@ module.exports = class { if (!member) { member = await message.channel.guild.searchMembers(args.join(' '), 2); - if (member.length === 0) return message.channel.createMessage( + if (member.length === 0) return message.channel.send( `${client.config.emojis.userError} No users found. Check for mispellings, or ping the user instead.` ); - if (member.length > 1) return message.channel.createMessage( + if (member.length > 1) return message.channel.send( `${client.config.emojis.userError} Found more than one user, try refining your search or pinging the user instead.` ); @@ -47,6 +47,6 @@ module.exports = class { .setColour(client.functions.displayHexColour(message.channel.guild, member)) .setImage(member.user.avatarURL); - message.channel.createMessage({ embed: embed }); + message.channel.send({ embed: embed }); } }; \ No newline at end of file diff --git a/bot/commands/Utility/serverinfo.js b/bot/commands/Utility/serverinfo.js index 2c1a1d7..fef6a55 100644 --- a/bot/commands/Utility/serverinfo.js +++ b/bot/commands/Utility/serverinfo.js @@ -29,6 +29,6 @@ module.exports = class { .addField('Boosts', `${guild.premiumSubscriptionCount} (Level ${guild.premiumTier})`, true) .addField('Member Count (Approximate)', `${guild.memberCount} (${guild.memberCount - guild.members.filter(member => member.user.bot).length} humans, ${guild.members.filter(member => member.user.bot).length} bots)`, true) .addField('Channels', `${guild.channels.size} ()`) - message.channel.createMessage({ embed: embed }); + message.channel.send({ embed: embed }); } }; \ No newline at end of file diff --git a/bot/commands/Utility/userinfo.js b/bot/commands/Utility/userinfo.js index b09119e..83b96eb 100644 --- a/bot/commands/Utility/userinfo.js +++ b/bot/commands/Utility/userinfo.js @@ -31,11 +31,11 @@ module.exports = class { if (!member) { member = await message.channel.guild.searchMembers(args.join(' '), 2); - if (member.length === 0) return message.channel.createMessage( + if (member.length === 0) return message.channel.send( `${client.config.emojis.userError} No users found. Check for mispellings, or ping the user instead.` ); - if (member.length > 1) return message.channel.createMessage( + if (member.length > 1) return message.channel.send( `${client.config.emojis.userError} Found more than one user, try refining your search or pinging the user instead.` ); @@ -73,6 +73,6 @@ module.exports = class { .addField('Joined Discord', `${dayjs(member.user.createdAt).format('D/M/YYYY HH:mm (UTCZ)')}\n*${dayjs().to(member.user.createdAt)}*`, true); if (badges.length > 0) embed.setDescription(badges.join(' ')); - message.channel.createMessage({ embed: embed }); + message.channel.send({ embed: embed }); } }; \ No newline at end of file diff --git a/bot/commands/Utility/weather.js b/bot/commands/Utility/weather.js index 02469ba..c250112 100644 --- a/bot/commands/Utility/weather.js +++ b/bot/commands/Utility/weather.js @@ -71,16 +71,16 @@ module.exports = class { .addField('Wind Speed:', `${Math.round(json.wind.speed * 10) / 10}km/h | ${Math.round(json.wind.speed * 10 / 1.609344)}mi/h`, true) .addField('Wind Direction:', windrose.getPoint(json.wind.deg).name, true) .setFooter('Powered by openweathermap.org'); - return message.channel.createMessage({ embed:embed }); + return message.channel.send({ embed:embed }); } else { if (json.message && json.message === 'city not found') { - return message.channel.createMessage(`${client.config.emojis.userError} You provided an invalid city name. Maybe check your spelling?`); + return message.channel.send(`${client.config.emojis.userError} You provided an invalid city name. Maybe check your spelling?`); } - return message.channel.createMessage(`${client.config.emojis.botError} API error occured: \`code ${json.cod}: ${json.message}\``); + return message.channel.send(`${client.config.emojis.botError} API error occured: \`code ${json.cod}: ${json.message}\``); } }) .catch(err => { - return message.channel.createMessage(`${client.config.emojis.botError} An error has occured: \`${err.stack}\``); + return message.channel.send(`${client.config.emojis.botError} An error has occured: \`${err.stack}\``); }); } }; \ No newline at end of file diff --git a/bot/util/functions.js b/bot/util/functions.js index 56653a9..643186c 100644 --- a/bot/util/functions.js +++ b/bot/util/functions.js @@ -13,7 +13,7 @@ class Functions { async awaitReply (message, input, limit = 60000) { const filter = (m) => m.author.id === message.author.id; - await message.channel.createMessage(input); + await message.channel.send(input); try { const collected = await message.channel.awaitMessages(filter, {