mirror of
https://github.com/danbulant/discord.js
synced 2026-05-27 22:11:53 +00:00
fix(Emoji#fetchAuthor): reject with Error rather than TypeError
This commit is contained in:
parent
41f6eaa635
commit
4a9c2f8884
1 changed files with 1 additions and 1 deletions
|
|
@ -161,7 +161,7 @@ class Emoji {
|
|||
* @returns {Promise<User>}
|
||||
*/
|
||||
fetchAuthor() {
|
||||
if (this.managed) return Promise.reject(new TypeError('Emoji is managed and has no Author.'));
|
||||
if (this.managed) return Promise.reject(new Error('Emoji is managed and has no Author.'));
|
||||
return this.client.rest.makeRequest('get', Constants.Endpoints.Guild(this.guild).Emoji(this.id), true)
|
||||
.then(emoji => this.client.dataManager.newUser(emoji.user));
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue