From 39c34fbce18f5dfec6e387d5c66d5834ed7a37e1 Mon Sep 17 00:00:00 2001 From: Olly Nicholass Date: Fri, 15 Jan 2021 12:21:55 +0000 Subject: [PATCH] fix(*): Rename sendEmbedMessage to generateEmbedMessage --- commands.js | 6 ++---- helpers.js | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/commands.js b/commands.js index f2216cd..94c1072 100644 --- a/commands.js +++ b/commands.js @@ -1,4 +1,4 @@ -const { sendEmbedMessage, trim } = require('./helpers.js'); +const { generateEmbedMessage, trim } = require('./helpers.js'); const axios = require('axios'); module.exports = { @@ -36,8 +36,6 @@ The commands available to you are: else { message.channel.send(helpMessage); } - - } function commandUrbanDictionary(Discord, config, logger, message, command, args) { @@ -60,7 +58,7 @@ function commandUrbanDictionary(Discord, config, logger, message, command, args) if (answers.length > 0) { try { // Set up rich embed for the command to return the API response, add the first responses URL with an example of the usage and rating - const embed = sendEmbedMessage(Discord, logger, message, answers[0].word, trim(Discord, logger, answers[0].definition, 1024)); + const embed = generateEmbedMessage(Discord, logger, message, answers[0].word, trim(Discord, logger, answers[0].definition, 1024)); embed.setURL(answers[0].permalink) .addFields( { name: 'Example', value: trim(Discord, logger, answers[0].example, 1024) }, diff --git a/helpers.js b/helpers.js index 9bc108e..beafeb3 100644 --- a/helpers.js +++ b/helpers.js @@ -1,6 +1,6 @@ module.exports = { // Return a stylised embed for consistancy - this allows you to add additional properties like fields - sendEmbedMessage: function (Discord, logger, message, title, description, colour = '#F4B400') { + generateEmbedMessage : function (Discord, logger, message, title, description, colour = '#F4B400') { // For documentation see https://github.com/AnIdiotsGuide/discordjs-bot-guide/blob/master/first-bot/using-embeds-in-messages.md try { const embed = new Discord.MessageEmbed()