mirror of
https://github.com/danbulant/discord.js
synced 2026-05-25 13:02:38 +00:00
Have block in place for rare weird typing in voice channel bug
This commit is contained in:
parent
d7bf40cab0
commit
fd564176ff
2 changed files with 4 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in a new issue