mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-17 03:53:29 +01:00
feature: add GuildEmoji#fetchAuthor (#2315)
* Make the base code * Fxi lint
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user