From aa59eb6fa63fe4b1584ca4bbfd7d4998f08126a0 Mon Sep 17 00:00:00 2001 From: Loic Bersier Date: Sun, 2 Dec 2018 22:18:32 +0100 Subject: [PATCH] --- index.js | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/index.js b/index.js index 0223603c..5d1be6a8 100644 --- a/index.js +++ b/index.js @@ -117,24 +117,18 @@ client.registry if (reaction.emoji.name === '🌟' && reaction.count === 4) { const channel = client.channels.find(channel => channel.name === "starboard"); - try { channel.send(`From the channel: **${messageChannel}**\n${messageAuthor}\n${messageContent}\n${messageAttachments}`) - } - catch { - console.error('There is no starboard') - } + .catch + console.error('There is no starboard') } if (reaction.emoji.name === '✡' && reaction.count === 4) { const channel = client.channels.find(channel => channel.name === "shameboard"); - try { channel.send(`From the channel: **${messageChannel}**\n${messageAuthor}\n${messageContent}\n${messageAttachments}`) - } - catch { - console.error('There is no shameboard') - } + .catch + console.error('There is no shameboard') } - }) + }) client.on('error', console.error); process.on('unhandledRejection', error => console.error('Uncaught Promise Rejection', error));