mirror of
https://github.com/danbulant/discord.js
synced 2026-06-18 22:21:17 +00:00
Fix leaving guilds if you are the owner
This commit is contained in:
parent
d9ae732bfd
commit
897cbfec77
2 changed files with 4 additions and 1 deletions
File diff suppressed because one or more lines are too long
|
|
@ -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(() => {
|
||||
|
|
|
|||
Loading…
Reference in a new issue