Fixed ClientUser#createGroupDM on user accounts and added some more GroupDMChannel stuff (#1747)

* ClientUser#createGroupDM now works like the docs states on user accounts

* Added GroupDMChannel#setIcon and fixed null handling for the channel name

* Added an s

* Don't resolve when icon is falsy and removed useless name trimming

* Removed now unnecessary name constant

* vscode being great

* Added GroupDMChannel#iconURL
This commit is contained in:
SpaceEEC
2017-08-04 09:17:46 +02:00
committed by Crawl
parent a30fc87816
commit abfda7c3cc
3 changed files with 36 additions and 3 deletions

View File

@@ -119,6 +119,10 @@ exports.Endpoints = {
checkImage({ size, format });
return `${root}/app-icons/${clientID}/${hash}.${format}${size ? `?size=${size}` : ''}`;
},
GDMIcon: (channelID, hash, format = 'webp', size) => {
checkImage({ size, format });
return `${root}/channel-icons/${channelID}/${hash}.${format}${size ? `?size=${size}` : ''}`;
},
Splash: (guildID, hash, format = 'webp', size) => {
checkImage({ size, format });
return `${root}/splashes/${guildID}/${hash}.${format}${size ? `?size=${size}` : ''}`;