From a3287782b57c28b94c390c24e7d5f2d8c303301f Mon Sep 17 00:00:00 2001 From: Rodry <38259440+ImRodry@users.noreply.github.com> Date: Sun, 5 Jun 2022 22:28:44 +0100 Subject: [PATCH] feat(MessageReaction): add react method (#7810) --- packages/discord.js/src/structures/MessageReaction.js | 8 ++++++++ packages/discord.js/typings/index.d.ts | 1 + 2 files changed, 9 insertions(+) diff --git a/packages/discord.js/src/structures/MessageReaction.js b/packages/discord.js/src/structures/MessageReaction.js index 857e719b8..099ade8c7 100644 --- a/packages/discord.js/src/structures/MessageReaction.js +++ b/packages/discord.js/src/structures/MessageReaction.js @@ -52,6 +52,14 @@ class MessageReaction { } } + /** + * Makes the client user react with this reaction + * @returns {Promise} + */ + react() { + return this.message.react(this.emoji); + } + /** * Removes all users from this reaction. * @returns {Promise} diff --git a/packages/discord.js/typings/index.d.ts b/packages/discord.js/typings/index.d.ts index f99006ed0..3d121dafd 100644 --- a/packages/discord.js/typings/index.d.ts +++ b/packages/discord.js/typings/index.d.ts @@ -1886,6 +1886,7 @@ export class MessageReaction { public message: Message | PartialMessage; public get partial(): false; public users: ReactionUserManager; + public react(): Promise; public remove(): Promise; public fetch(): Promise; public toJSON(): unknown;