Simplified image resolving and used an options object when creating webhooks (#1843)

This commit is contained in:
SpaceEEC
2017-08-28 00:11:19 +02:00
committed by Crawl
parent 258fc4ecf3
commit c4fecf6609
4 changed files with 14 additions and 18 deletions

View File

@@ -1044,11 +1044,8 @@ class Guild extends Base {
.then(emoji => this.client.actions.GuildEmojiCreate.handle(this, emoji).emoji);
}
return this.client.resolver.resolveFile(attachment)
.then(data => {
const dataURI = this.client.resolver.resolveBase64(data);
return this.createEmoji(dataURI, name, { roles, reason });
});
return this.client.resolver.resolveImage(attachment)
.then(image => this.createEmoji(image, name, { roles, reason }));
}
/**