Fix leaving guilds if you are the owner

This commit is contained in:
Amish Shah
2016-08-29 19:03:38 +01:00
parent d9ae732bfd
commit 897cbfec77
2 changed files with 4 additions and 1 deletions

File diff suppressed because one or more lines are too long

View File

@@ -176,6 +176,9 @@ class RESTMethods {
}
leaveGuild(guild) {
if (guild.owner.id === this.rest.client.user.id) {
return this.deleteGuild(guild);
}
return new Promise((resolve, reject) => {
this.rest.makeRequest('del', Constants.Endpoints.meGuild(guild.id), true)
.then(() => {