mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-11 09:03:29 +01:00
Fix for bulkDelete, acknowledge, createInvite and remove some redundant stuff (#1515)
This commit is contained in:
@@ -975,7 +975,7 @@ class Guild {
|
||||
*/
|
||||
leave() {
|
||||
if (this.ownerID === this.client.user.id) return Promise.reject(new Error('Guild is owned by the client.'));
|
||||
return this.rest.api.users('@me').guilds(this.id).delete()
|
||||
return this.client.api.users('@me').guilds(this.id).delete()
|
||||
.then(() => this.client.actions.GuildDelete.handle({ id: this.id }).guild);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user