add deleteserver

This commit is contained in:
Skillz
2020-09-24 13:23:01 -04:00
parent 77b8dde667
commit 8f39ac7434
+6
View File
@@ -44,6 +44,12 @@ export function createServer(options: CreateServerOptions) {
return RequestManager.post(endpoints.GUILDS, options);
}
/** Delete a guild permanently. User must be owner. Returns 204 No Content on success. Fires a Guild Delete Gateway event.
*/
export function deleteServer(guildID: string) {
return RequestManager.delete(endpoints.GUILD(guildID));
}
/** Gets an array of all the channels ids that are the children of this category. */
export function categoryChildrenIDs(guild: Guild, id: string) {
return guild.channels.filter((channel) => channel.parentID === id);