We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 49e8bd9 commit 45a17e7Copy full SHA for 45a17e7
src/structures/Emoji.js
@@ -162,6 +162,11 @@ class Emoji {
162
*/
163
fetchAuthor() {
164
if (this.managed) return Promise.reject(new Error('Emoji is managed and has no Author.'));
165
+ if (!this.guild.me.permissions.has(Permissions.FLAGS.MANAGE_EMOJIS)) {
166
+ return Promise.reject(
167
+ new Error(`Client must have Manage Emoji permission in guild ${this.guild} to see emoji authors.`)
168
+ );
169
+ }
170
return this.client.rest.makeRequest('get', Constants.Endpoints.Guild(this.guild).Emoji(this.id), true)
171
.then(emoji => this.client.dataManager.newUser(emoji.user));
172
}
0 commit comments