From 4e7e72807f7d197653c652828aa3498e5bf6e0c5 Mon Sep 17 00:00:00 2001 From: GoodOne Date: Fri, 30 Jun 2023 18:57:44 +0300 Subject: [PATCH 1/2] message.deleteReaction() with userId --- packages/guilded.js/lib/managers/global/MessageManager.ts | 6 +++--- packages/guilded.js/lib/structures/Message.ts | 5 +++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/packages/guilded.js/lib/managers/global/MessageManager.ts b/packages/guilded.js/lib/managers/global/MessageManager.ts index ae4c647d..d74086f1 100644 --- a/packages/guilded.js/lib/managers/global/MessageManager.ts +++ b/packages/guilded.js/lib/managers/global/MessageManager.ts @@ -106,15 +106,15 @@ export class GlobalMessageManager extends CacheableStructManager { - await this.client.reactions.delete(channelId, contentId, emoteId); + async deleteReaction(channelId: string, contentId: string, emoteId: number, userId?: string): Promise { + await this.client.reactions.delete(channelId, contentId, emoteId, userId); } /** diff --git a/packages/guilded.js/lib/structures/Message.ts b/packages/guilded.js/lib/structures/Message.ts index 37826be1..dc590409 100644 --- a/packages/guilded.js/lib/structures/Message.ts +++ b/packages/guilded.js/lib/structures/Message.ts @@ -245,16 +245,17 @@ export class Message extends Base { } /** - * Delete a reaction emote. + * Deletes either a whole reaction emote from a message or a specific user's if a userId is provided. * * @param emoteId - The ID of the emote to delete. * @returns A promise that resolves when the emote has been deleted. */ - deleteReaction(emoteId: number): Promise { + deleteReaction(emoteId: number, userId?: string): Promise { return this.client.rest.router.reactions.channelMessageReactionDelete({ channelId: this.channelId, messageId: this.id, emoteId, + userId, }); } From 0662dac43f434609d3ea2e4d28caf3c0ce71e135 Mon Sep 17 00:00:00 2001 From: Nico Date: Fri, 30 Jun 2023 13:59:06 -0400 Subject: [PATCH 2/2] chore: changeset --- .changeset/afraid-years-boil.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/afraid-years-boil.md diff --git a/.changeset/afraid-years-boil.md b/.changeset/afraid-years-boil.md new file mode 100644 index 00000000..08f02338 --- /dev/null +++ b/.changeset/afraid-years-boil.md @@ -0,0 +1,5 @@ +--- +"guilded.js": patch +--- + +message.deleteReaction() with userId