refactor(formatters): Add support for object and name param in formatEmoji() (#10076)

* feat: add support for name param and object in `formatEmoji()`

* Update formatters.ts

* refactor: swap priority

---------

Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
This commit is contained in:
codershiba
2024-01-13 16:32:41 +05:30
committed by GitHub
parent 136c66c213
commit 7b8e0debeb
3 changed files with 104 additions and 6 deletions

View File

@@ -98,7 +98,7 @@ class Emoji extends Base {
* reaction.message.channel.send(`The emoji used was: ${reaction.emoji}`);
*/
toString() {
return this.id ? formatEmoji(this.id, this.animated) : this.name;
return this.id ? formatEmoji({ animated: this.animated, id: this.id, name: this.name }) : this.name;
}
toJSON() {