mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-17 12:03:31 +01:00
stop spamming api, and kill typing when a guild isn't there anymore (#1096)
This commit is contained in:
@@ -12,6 +12,8 @@ class GuildDeleteAction extends Action {
|
|||||||
|
|
||||||
let guild = client.guilds.get(data.id);
|
let guild = client.guilds.get(data.id);
|
||||||
if (guild) {
|
if (guild) {
|
||||||
|
for (const channel of guild.channels.values()) channel.stopTyping(true);
|
||||||
|
|
||||||
if (guild.available && data.unavailable) {
|
if (guild.available && data.unavailable) {
|
||||||
// guild is unavailable
|
// guild is unavailable
|
||||||
guild.available = false;
|
guild.available = false;
|
||||||
|
|||||||
@@ -250,7 +250,7 @@ class TextBasedChannel {
|
|||||||
count: count || 1,
|
count: count || 1,
|
||||||
interval: this.client.setInterval(() => {
|
interval: this.client.setInterval(() => {
|
||||||
this.client.rest.methods.sendTyping(this.id);
|
this.client.rest.methods.sendTyping(this.id);
|
||||||
}, 4000),
|
}, 9000),
|
||||||
});
|
});
|
||||||
this.client.rest.methods.sendTyping(this.id);
|
this.client.rest.methods.sendTyping(this.id);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user