Added resolveImage to reduce code duplication (#1820)

* add client#resolveImage

* oops

* resolveFile fix

* async is the future

* async

* update doc example

* build fix

* doc fix

* fix docs

* thx hydar
This commit is contained in:
Isabella
2017-08-25 15:17:38 -05:00
committed by Crawl
parent b8315b79c7
commit fbb1253b3f
6 changed files with 34 additions and 32 deletions

View File

@@ -65,7 +65,7 @@ class TextChannel extends GuildChannel {
name, avatar,
}, reason }).then(data => new Webhook(this.client, data));
} else {
return this.client.resolver.resolveBuffer(avatar).then(data =>
return this.client.resolver.resolveFile(avatar).then(data =>
this.createWebhook(name, this.client.resolver.resolveBase64(data) || null));
}
}