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

@@ -167,6 +167,7 @@ const Endpoints = exports.Endpoints = {
webhooks: `${base}/webhooks`,
search: `${base}/messages/search`,
pins: `${base}/pins`,
Icon: (root, hash) => Endpoints.CDN(root).GDMIcon(channelID, hash),
Pin: messageID => `${base}/pins/${messageID}`,
Recipient: recipientID => `${base}/recipients/${recipientID}`,
Message: messageID => {
@@ -195,6 +196,7 @@ const Endpoints = exports.Endpoints = {
Asset: name => `${root}/assets/${name}`,
Avatar: (userID, hash) => `${root}/avatars/${userID}/${hash}.${hash.startsWith('a_') ? 'gif' : 'png'}?size=2048`,
Icon: (guildID, hash) => `${root}/icons/${guildID}/${hash}.jpg`,
GDMIcon: (channelID, hash) => `${root}/channel-icons/${channelID}/${hash}.jpg?size=2048`,
Splash: (guildID, hash) => `${root}/splashes/${guildID}/${hash}.jpg`,
};
},