Skip to content

Commit

Permalink
feat(MessageReaction): add react method (#7810)
Browse files Browse the repository at this point in the history
  • Loading branch information
ImRodry committed Jun 5, 2022
1 parent 0ccc243 commit a328778
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
8 changes: 8 additions & 0 deletions packages/discord.js/src/structures/MessageReaction.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,14 @@ class MessageReaction {
}
}

/**
* Makes the client user react with this reaction
* @returns {Promise<MessageReaction>}
*/
react() {
return this.message.react(this.emoji);
}

/**
* Removes all users from this reaction.
* @returns {Promise<MessageReaction>}
Expand Down
1 change: 1 addition & 0 deletions packages/discord.js/typings/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1886,6 +1886,7 @@ export class MessageReaction {
public message: Message | PartialMessage;
public get partial(): false;
public users: ReactionUserManager;
public react(): Promise<MessageReaction>;
public remove(): Promise<MessageReaction>;
public fetch(): Promise<MessageReaction>;
public toJSON(): unknown;
Expand Down

0 comments on commit a328778

Please sign in to comment.