refactor: make Structure#deleted a getter to a WeakSet (#7074)

This commit is contained in:
Antonio Román
2021-12-08 10:47:54 +01:00
committed by GitHub
parent f410536c51
commit b0937502d3
51 changed files with 297 additions and 120 deletions

View File

@@ -1,6 +1,7 @@
'use strict';
const Action = require('./Action');
const { deletedGuilds } = require('../../structures/Guild');
const { Events } = require('../../util/Constants');
class GuildDeleteAction extends Action {
@@ -37,7 +38,7 @@ class GuildDeleteAction extends Action {
// Delete guild
client.guilds.cache.delete(guild.id);
guild.deleted = true;
deletedGuilds.add(guild);
/**
* Emitted whenever a guild kicks the client or the guild is deleted/left.