From c267bfdadccc52467f68cc0420a71117ce5219a2 Mon Sep 17 00:00:00 2001 From: Greg Walker Date: Wed, 11 Dec 2024 14:59:58 -0600 Subject: [PATCH] oop --- src/scripts/best-of-slack.js | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/src/scripts/best-of-slack.js b/src/scripts/best-of-slack.js index 5f84fad..8e615e9 100644 --- a/src/scripts/best-of-slack.js +++ b/src/scripts/best-of-slack.js @@ -1,9 +1,17 @@ module.exports = async (app) => { - app.event("reaction_added", async ({ item: { channel, ts } }) => { - const link = await app.client.chat.getPermalink({ - channel, - message_ts: ts, - }); - console.log(link); - }); + app.event( + "reaction_added", + async ({ + event: { + item: { channel, ts }, + }, + client, + }) => { + const link = await client.chat.getPermalink({ + channel, + message_ts: ts, + }); + console.log(link); + }, + ); };