mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 00:23:30 +01:00
Fix leaving guilds if you are the owner
This commit is contained in:
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(() => {
|
||||
|
||||
Reference in New Issue
Block a user