From cefeb021714e086defcefdc1e5b2617931189aab Mon Sep 17 00:00:00 2001 From: Skillz Date: Fri, 28 Aug 2020 21:08:30 -0400 Subject: [PATCH] optimize reactions --- src/handlers/message.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/handlers/message.ts b/src/handlers/message.ts index da9d90db2..86b967f92 100644 --- a/src/handlers/message.ts +++ b/src/handlers/message.ts @@ -75,6 +75,12 @@ export function addReaction( throw new Error(Errors.MISSING_READ_MESSAGE_HISTORY); } + if (reaction.startsWith("<:")) { + reaction = reaction.substring(2, reaction.length - 1); + } else if (reaction.startsWith("