From 1912e4e242eff6462c581e68ac9f62dfff1264ec Mon Sep 17 00:00:00 2001 From: ITOH Date: Sat, 13 Nov 2021 17:42:50 +0100 Subject: [PATCH] fix(helpers): removeReaction --- src/helpers/messages/remove_reaction.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/helpers/messages/remove_reaction.ts b/src/helpers/messages/remove_reaction.ts index d43b84f5c..e15274565 100644 --- a/src/helpers/messages/remove_reaction.ts +++ b/src/helpers/messages/remove_reaction.ts @@ -18,7 +18,12 @@ export async function removeReaction( bot.rest, "delete", options?.userId - ? bot.constants.endpoints.CHANNEL_MESSAGE_REACTION_USER(channelId, messageId, reaction, options.userId) - : bot.constants.endpoints.CHANNEL_MESSAGE_REACTION_ME(channelId, messageId, reaction) + ? bot.constants.endpoints.CHANNEL_MESSAGE_REACTION_USER( + channelId, + messageId, + encodeURIComponent(reaction), + options.userId + ) + : bot.constants.endpoints.CHANNEL_MESSAGE_REACTION_ME(channelId, messageId, encodeURIComponent(reaction)) ); }