mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 08:33:30 +01:00
Add client.destroy();
This commit is contained in:
@@ -26,10 +26,7 @@ class ChannelDeleteAction extends Action {
|
||||
}
|
||||
|
||||
scheduleForDeletion(id) {
|
||||
this.timeouts.push(
|
||||
setTimeout(() => delete this.deleted[id],
|
||||
this.client.options.rest_ws_bridge_timeout)
|
||||
);
|
||||
this.client.setTimeout(() => delete this.deleted[id], this.client.options.rest_ws_bridge_timeout);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -6,7 +6,6 @@ class GuildDeleteAction extends Action {
|
||||
constructor(client) {
|
||||
super(client);
|
||||
this.deleted = {};
|
||||
this.timeouts = [];
|
||||
}
|
||||
|
||||
handle(data) {
|
||||
@@ -39,10 +38,7 @@ class GuildDeleteAction extends Action {
|
||||
}
|
||||
|
||||
scheduleForDeletion(id) {
|
||||
this.timeouts.push(
|
||||
setTimeout(() => delete this.deleted[id],
|
||||
this.client.options.rest_ws_bridge_timeout)
|
||||
);
|
||||
this.client.setTimeout(() => delete this.deleted[id], this.client.options.rest_ws_bridge_timeout)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -5,7 +5,6 @@ class GuildMemberRemoveAction extends Action {
|
||||
|
||||
constructor(client) {
|
||||
super(client);
|
||||
this.timeouts = [];
|
||||
this.deleted = {};
|
||||
}
|
||||
|
||||
@@ -39,10 +38,7 @@ class GuildMemberRemoveAction extends Action {
|
||||
}
|
||||
|
||||
scheduleForDeletion(guildID, userID) {
|
||||
this.timeouts.push(
|
||||
setTimeout(() => delete this.deleted[guildID + userID],
|
||||
this.client.options.rest_ws_bridge_timeout)
|
||||
);
|
||||
this.client.setTimeout(() => delete this.deleted[guildID + userID], this.client.options.rest_ws_bridge_timeout);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -5,7 +5,6 @@ class GuildRoleDeleteAction extends Action {
|
||||
|
||||
constructor(client) {
|
||||
super(client);
|
||||
this.timeouts = [];
|
||||
this.deleted = {};
|
||||
}
|
||||
|
||||
@@ -37,10 +36,7 @@ class GuildRoleDeleteAction extends Action {
|
||||
}
|
||||
|
||||
scheduleForDeletion(guildID, roleID) {
|
||||
this.timeouts.push(
|
||||
setTimeout(() => delete this.deleted[guildID + roleID],
|
||||
this.client.options.rest_ws_bridge_timeout)
|
||||
);
|
||||
this.client.setTimeout(() => delete this.deleted[guildID + roleID], this.client.options.rest_ws_bridge_timeout)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -4,7 +4,6 @@ class MessageDeleteAction extends Action {
|
||||
|
||||
constructor(client) {
|
||||
super(client);
|
||||
this.timeouts = [];
|
||||
this.deleted = {};
|
||||
}
|
||||
|
||||
@@ -33,10 +32,8 @@ class MessageDeleteAction extends Action {
|
||||
}
|
||||
|
||||
scheduleForDeletion(channelID, messageID) {
|
||||
this.timeouts.push(
|
||||
setTimeout(() => delete this.deleted[channelID + messageID],
|
||||
this.client.options.rest_ws_bridge_timeout)
|
||||
);
|
||||
this.client.setTimeout(
|
||||
() => delete this.deleted[channelID + messageID], this.client.options.rest_ws_bridge_timeout);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user