refactor: remove typing caching (#6114)

Co-authored-by: DTrombett <73136330+DTrombett@users.noreply.github.com>
This commit is contained in:
Antonio Román
2021-07-16 13:20:05 +02:00
committed by GitHub
parent 4206e35b23
commit 576eee8de2
13 changed files with 140 additions and 200 deletions

View File

@@ -1,7 +1,7 @@
'use strict';
const Action = require('./Action');
const { Events, TextBasedChannelTypes } = require('../../util/Constants');
const { Events } = require('../../util/Constants');
class GuildDeleteAction extends Action {
constructor(client) {
@@ -14,10 +14,6 @@ class GuildDeleteAction extends Action {
let guild = client.guilds.cache.get(data.id);
if (guild) {
for (const channel of guild.channels.cache.values()) {
if (TextBasedChannelTypes.includes(channel.type)) channel.stopTyping(true);
}
if (data.unavailable) {
// Guild is unavailable
guild.available = false;