mirror of
https://github.com/danbulant/discord.js
synced 2026-06-08 01:01:30 +00:00
feat(Emoji): add fetchAuthor method
Backported from commit: e0cbf0bb60
PR: #2315
This commit is contained in:
parent
c0ca73a40c
commit
dd7eedbd48
1 changed files with 9 additions and 0 deletions
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue