Skip to content

Commit

Permalink
stop spamming api, and kill typing when a guild isn't there anymore (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
devsnek authored and amishshah committed Jan 14, 2017
1 parent f647eb7 commit e216fc7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/client/actions/GuildDelete.js
Expand Up @@ -12,6 +12,8 @@ class GuildDeleteAction extends Action {

let guild = client.guilds.get(data.id);
if (guild) {
for (const channel of guild.channels.values()) channel.stopTyping(true);

if (guild.available && data.unavailable) {
// guild is unavailable
guild.available = false;
Expand Down
2 changes: 1 addition & 1 deletion src/structures/interface/TextBasedChannel.js
Expand Up @@ -250,7 +250,7 @@ class TextBasedChannel {
count: count || 1,
interval: this.client.setInterval(() => {
this.client.rest.methods.sendTyping(this.id);
}, 4000),
}, 9000),
});
this.client.rest.methods.sendTyping(this.id);
} else {
Expand Down

0 comments on commit e216fc7

Please sign in to comment.