mirror of
https://github.com/danbulant/discord.js
synced 2026-06-08 09:13:22 +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);
|
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.
|
* Data for editing an emoji.
|
||||||
* @typedef {Object} GuildEmojiEditData
|
* @typedef {Object} GuildEmojiEditData
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue