mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-16 19:43:29 +01:00
feat(Emoji): add fetchAuthor method
Backported from commit: e0cbf0bb60
PR: #2315
This commit is contained in:
@@ -150,6 +150,15 @@ class Emoji {
|
|||||||
return this.edit({ name }, reason);
|
return this.edit({ name }, reason);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Fetches the author for this emoji
|
||||||
|
* @returns {Promise<User>}
|
||||||
|
*/
|
||||||
|
fetchAuthor() {
|
||||||
|
return this.client.rest.makeRequest('get', Constants.Endpoints.Guild(this.guild).Emoji(this.id), true)
|
||||||
|
.then(emoji => this.client.dataManager.newUser(emoji.user));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add a role to the list of roles that can use this emoji.
|
* Add a role to the list of roles that can use this emoji.
|
||||||
* @param {Role} role The role to add
|
* @param {Role} role The role to add
|
||||||
|
|||||||
Reference in New Issue
Block a user