to an option object

This commit is contained in:
ITOH
2021-04-30 18:57:44 +02:00
parent ce5f890973
commit 5a526c809b
3 changed files with 6 additions and 6 deletions
+4 -4
View File
@@ -7,9 +7,9 @@ export async function removeReaction(
channelId: string,
messageId: string,
reaction: string,
userId?: string,
options?: { userId?: string },
) {
if (userId) {
if (options?.userId) {
await requireBotChannelPermissions(channelId, ["MANAGE_MESSAGES"]);
}
@@ -21,12 +21,12 @@ export async function removeReaction(
return await rest.runMethod<undefined>(
"delete",
userId
options?.userId
? endpoints.CHANNEL_MESSAGE_REACTION_USER(
channelId,
messageId,
reaction,
userId,
options.userId,
)
: endpoints.CHANNEL_MESSAGE_REACTION_ME(channelId, messageId, reaction),
);