From 1d6d81e972b3987d7634ca09a25bab9cd068e7ac Mon Sep 17 00:00:00 2001 From: loicbersier Date: Wed, 13 Mar 2019 19:19:30 +0100 Subject: [PATCH] Jump to message in embed --- event/listeners/messageReactionAdd.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/event/listeners/messageReactionAdd.js b/event/listeners/messageReactionAdd.js index dc9a6cd2..8504f68e 100644 --- a/event/listeners/messageReactionAdd.js +++ b/event/listeners/messageReactionAdd.js @@ -45,12 +45,12 @@ class MessageReactionAddListener extends Listener { const starEmbed = new MessageEmbed() .setColor(reaction.message.member.displayHexColor) - .setDescription(messageContent) + .setDescription(`[Jump to message](https://discordapp.com/channels/${reaction.message.guild.id}/${reaction.message.channel.id}/${reaction.message.id})\n\n${messageContent}`) .setAuthor(reaction.message.author.username, reaction.message.author.displayAvatarURL()) .setTimestamp(); - return channel.send(`in: ${reaction.message.channel}\nhttps://discordapp.com/channels/${reaction.message.guild.id}/${reaction.message.channel.id}/${reaction.message.id}`, {files: messageAttachments, embed: starEmbed}) - .catch(() => channel.send(`${reaction.message.author.username}, in: ${reaction.message.channel}\nhttps://discordapp.com/channels/${reaction.message.guild.id}/${reaction.message.channel.id}/${reaction.message.id}\n${messageAttachments}`, { embed: starEmbed})); + return channel.send(`in: ${reaction.message.channel}`, {files: messageAttachments, embed: starEmbed}) + .catch(() => channel.send(`${reaction.message.author.username}, in: ${reaction.message.channel}`, { embed: starEmbed})); } let shameboardChannel; @@ -83,12 +83,12 @@ class MessageReactionAddListener extends Listener { const shameEmbed = new MessageEmbed() .setColor(reaction.message.member.displayHexColor) - .setDescription(messageContent) + .setDescription(`[Jump to message](https://discordapp.com/channels/${reaction.message.guild.id}/${reaction.message.channel.id}/${reaction.message.id})\n\n${messageContent}`) .setAuthor(reaction.message.author.username, reaction.message.author.displayAvatarURL()) .setTimestamp(); - return channel.send(`in: ${reaction.message.channel}\nhttps://discordapp.com/channels/${reaction.message.guild.id}/${reaction.message.channel.id}/${reaction.message.id}}`,{files: messageAttachments, embed: shameEmbed}) - .catch(() => channel.send(`${reaction.message.author.username}, in: ${reaction.message.channel}\nhttps://discordapp.com/channels/${reaction.message.guild.id}/${reaction.message.channel.id}/${reaction.message.id}\n${messageAttachments}`, { embed: shameEmbed})); + return channel.send(`in: ${reaction.message.channel}`,{files: messageAttachments, embed: shameEmbed}) + .catch(() => channel.send(`${reaction.message.author.username}, in: ${reaction.message.channel}`, { embed: shameEmbed})); } } }