From 8fbef4dd8416e1414b42e5f371e88e920a1673d8 Mon Sep 17 00:00:00 2001 From: Olly Nicholass Date: Fri, 15 Jan 2021 12:20:41 +0000 Subject: [PATCH] fix(*): Correct indentation in helper.js --- helpers.js | 56 +++++++++++++++++++++++++++--------------------------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/helpers.js b/helpers.js index 82a6586..9bc108e 100644 --- a/helpers.js +++ b/helpers.js @@ -1,33 +1,33 @@ 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 { - const embed = new Discord.MessageEmbed() - .setTitle(title) - .setColor(colour) - .setDescription(description) - .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(); - return embed; - } catch (error) { - logger.error('Failed to send embed message', error); - message.channel.send('There was a problem, sorry!'); - } - }, - // Trim a string to a specific character length - trim: function (Discord, logger, string, max) { - try { - if (string.length > max) { - return `${string.slice(0, max - 3)}...`; - } - else { - return string; - } - } catch (error) { - logger.error('Failed to trim selection', error); - message.channel.send('There was a problem, sorry!'); - } + // 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() + .setTitle(title) + .setColor(colour) + .setDescription(description) + .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(); + return embed; + } catch (error) { + logger.error('Failed to send embed message', error); + message.channel.send('There was a problem, sorry!'); } + }, + // Trim a string to a specific character length + trim: function (Discord, logger, string, max) { + try { + if (string.length > max) { + return `${string.slice(0, max - 3)}...`; + } + else { + return string; + } + } catch (error) { + logger.error('Failed to trim selection', error); + message.channel.send('There was a problem, sorry!'); + } + } };