From 245903b6207be1357b2b6600ec3633580ec10323 Mon Sep 17 00:00:00 2001 From: Olly Nicholass Date: Fri, 15 Jan 2021 11:41:35 +0000 Subject: [PATCH] feat(*): Change embed helper to return for more flexibilty --- helpers.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/helpers.js b/helpers.js index b432cdb..82a6586 100644 --- a/helpers.js +++ b/helpers.js @@ -1,4 +1,5 @@ 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') { // For documentation see https://github.com/AnIdiotsGuide/discordjs-bot-guide/blob/master/first-bot/using-embeds-in-messages.md try { @@ -9,8 +10,7 @@ module.exports = { .setFooter('This is a community-made open source bot - if it goes down, fix it') .setThumbnail('https://cdn.discordapp.com/icons/333376110329069578/b5cf0e90b74a3e1b828c15a262b7a5c8.png?size=128') .setTimestamp(); - - message.channel.send(embed); + return embed; } catch (error) { logger.error('Failed to send embed message', error); message.channel.send('There was a problem, sorry!');