feat(Guild): backport misc properties and setRolePositions (#3337)

* feat(Guild): backport misc properties and setRolePositions

PRs:
* #3168
* #3317

* typings
This commit is contained in:
SpaceEEC
2019-06-13 18:33:07 +02:00
committed by GitHub
parent 6f49aadf4f
commit e6a378b361
4 changed files with 139 additions and 19 deletions

View File

@@ -152,6 +152,7 @@ const Endpoints = exports.Endpoints = {
auditLogs: `${base}/audit-logs`,
Emoji: emojiID => `${base}/emojis/${emojiID}`,
Icon: (root, hash) => Endpoints.CDN(root).Icon(guildID, hash),
Banner: (root, hash) => Endpoints.CDN(root).Banner(guildID, hash),
Splash: (root, hash) => Endpoints.CDN(root).Splash(guildID, hash),
Role: roleID => `${base}/roles/${roleID}`,
Member: memberID => {
@@ -210,6 +211,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`,
Banner: (guildID, hash) => `${root}/banners/${guildID}/${hash}.jpg`,
AppIcon: (clientID, hash) => `${root}/app-icons/${clientID}/${hash}.png`,
AppAsset: (clientID, hash) => `${root}/app-assets/${clientID}/${hash}.png`,
GDMIcon: (channelID, hash) => `${root}/channel-icons/${channelID}/${hash}.jpg?size=2048`,