mirror of
https://github.com/danbulant/discord.js
synced 2026-05-27 14:02:02 +00:00
feature: add GuildEmoji#fetchAuthor (#2315)
* Make the base code * Fxi lint
This commit is contained in:
parent
bd1bf11ed0
commit
e0cbf0bb60
1 changed files with 9 additions and 0 deletions
|
|
@ -61,6 +61,15 @@ class GuildEmoji extends Emoji {
|
|||
return new Date(this.createdTimestamp);
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetches the author for this emoji
|
||||
* @returns {Promise<User>}
|
||||
*/
|
||||
fetchAuthor() {
|
||||
return this.client.api.guilds(this.guild.id).emojis(this.id).get()
|
||||
.then(emoji => this.client.users.add(emoji.user));
|
||||
}
|
||||
|
||||
/**
|
||||
* Data for editing an emoji.
|
||||
* @typedef {Object} GuildEmojiEditData
|
||||
|
|
|
|||
Loading…
Reference in a new issue