From d685e39af44a17c6794b5d4eb93883b0d08d8d46 Mon Sep 17 00:00:00 2001 From: Lewdcario Date: Thu, 26 Jul 2018 10:24:26 -0600 Subject: [PATCH] backport: add rejection for Emoji#fetchAuthor if managed Signed-off-by: Lewdcario --- src/structures/Emoji.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/structures/Emoji.js b/src/structures/Emoji.js index ef10fd35c..02711e1c4 100644 --- a/src/structures/Emoji.js +++ b/src/structures/Emoji.js @@ -161,6 +161,7 @@ class Emoji { * @returns {Promise} */ fetchAuthor() { + if (this.managed) return Promise.reject(new TypeError('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)); }