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

@@ -285,6 +285,13 @@ class RESTMethods {
.then(() => channel);
}
updateGroupDMChannel(channel, _data) {
const data = {};
data.name = _data.name;
data.icon = _data.icon;
return this.rest.makeRequest('patch', Endpoints.Channel(channel), true, data).then(() => channel);
}
getExistingDM(recipient) {
return this.client.channels.find(channel =>
channel.recipient && channel.recipient.id === recipient.id