From 978655daf1563ae93c1d76152b6eb24bcfb6c090 Mon Sep 17 00:00:00 2001 From: Lamp Date: Sun, 25 Aug 2019 23:10:37 +0000 Subject: [PATCH] allow anyone to pin a message via reaction --- src/misc.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/misc.js b/src/misc.js index ddca784..f45c2cb 100755 --- a/src/misc.js +++ b/src/misc.js @@ -105,7 +105,7 @@ dClient.on("local_emojiDelete", async emoji => { }); -// pinboard +// pinboard // this was removed but no harm leaving it working ¯\_(ツ)_/¯ (async function(){ var webhook = new Discord.WebhookClient(config.webhooks.pinboard[0], config.webhooks.pinboard[1]); dClient.on("local_messageReactionAdd", async (messageReaction, user) => { @@ -129,8 +129,11 @@ dClient.on("local_emojiDelete", async emoji => { })(); - - +// allow anyone to pin a message via reaction +dClient.on("local_messageReactionAdd", async (messageReaction) => { + if (messageReaction.emoji.name == "📌" || messageReaction.emoji.name == "📍") + await messageReaction.message.pin(); +});