Skip to content

Commit

Permalink
fix(MessageButton): allow IDs in setEmoji
Browse files Browse the repository at this point in the history
  • Loading branch information
monbrey committed May 31, 2021
1 parent e5d8b60 commit 261ba3c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/structures/MessageButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,8 @@ class MessageButton extends BaseMessageComponent {
* @returns {MessageButton}
*/
setEmoji(emoji) {
this.emoji = Util.parseEmoji(`${emoji}`);
if (/^\d{17,19}$/.test(emoji)) this.emoji = { id: emoji };
else this.emoji = Util.parseEmoji(`${emoji}`);
return this;
}

Expand Down

0 comments on commit 261ba3c

Please sign in to comment.