Have block in place for rare weird typing in voice channel bug

This commit is contained in:
Amish Shah
2016-09-10 17:28:45 +01:00
parent d7bf40cab0
commit fd564176ff
2 changed files with 4 additions and 1 deletions

View File

@@ -10,6 +10,9 @@ class TypingStartHandler extends AbstractHandler {
const timestamp = new Date(data.timestamp * 1000);
if (channel && user) {
if (channel.type === 'voice') {
return client.emit('warn', `Discord sent a typing packet to voice channel ${channel.id}`);
}
if (channel._typing.has(user.id)) {
const typing = channel._typing.get(user.id);
typing.lastTimestamp = timestamp;

View File

@@ -34,6 +34,7 @@ class GroupDMChannel extends Channel {
constructor(client, data) {
super(client, data);
this.messages = new Collection();
this._typing = new Map();
}
setup(data) {
@@ -74,7 +75,6 @@ class GroupDMChannel extends Channel {
this.type = 'group';
this.lastMessageID = data.last_message_id;
this._typing = new Map();
}
/**