resolveImage backport (#1822)

* add resolveImage

* add groupDMChannel#setIcon + icon getter

* doc fix

* crawl no kill pls

* *whistles*

* channe
This commit is contained in:
Isabella
2017-08-22 22:29:22 -05:00
committed by Crawl
parent a85fc91630
commit 17d7f5c723
8 changed files with 98 additions and 61 deletions

View File

@@ -73,7 +73,7 @@ class TextChannel extends GuildChannel {
if (typeof avatar === 'string' && avatar.startsWith('data:')) {
resolve(this.client.rest.methods.createWebhook(this, name, avatar, reason));
} else {
this.client.resolver.resolveBuffer(avatar).then(data =>
this.client.resolver.resolveFile(avatar).then(data =>
resolve(this.client.rest.methods.createWebhook(this, name, data, reason))
);
}