mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-11 17:13:31 +01:00
resolveImage backport (#1822)
* add resolveImage * add groupDMChannel#setIcon + icon getter * doc fix * crawl no kill pls * *whistles* * channe
This commit is contained in:
@@ -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`,
|
||||
};
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user