Please describe the problem you are having in as much detail as possible:
Bot keeps typing in the channel, despite using stopTyping with or without force. Channel's _typing property is an empty map, typing results to false, typingCount is 0. Likely indicates a problem with the library.
client._intervals seems to have a couple of 9000ms-long intervals indicating the typing intervals were never really cleared?
Include a reproducible code sample here, if possible:
channel.startTyping()
// possibly shortly followed by
channel.stopTyping(true)
Further details:
The stopTyping() event was removed entirely in discord.js v12 as seen here:
https://github.com/discordjs/guide/blob/v12-changes/guide/additional-info/changes-in-v12.md
The
stopTyping()event was removed entirely in discord.js v12 as seen here:https://github.com/discordjs/guide/blob/v12-changes/guide/additional-info/changes-in-v12.md
this refers to the typingStop event and is irrelevant to my issue
How long does the bot continue "typing" - does it never stop, or is there a delay?
Because there is no typingStop event, it can take a few seconds for other clients (desktop/web) to no longer show that the bot is typing. It's when there are no more typingStart events being received.
it never stops typing, even after days
yea.. its very bugged.. good i don't use discord.js lul
Can you try https://github.com/discordjs/discord.js/commit/4e0cf87d0fd717d781d6e633402fb2b1b6ac6fd3 and see if it fixes your issue? Thanks!
Tried and seems to be fixed for me.
still having the same issue, but occurs much much less often
happened now shortly after bot (or internal shard) lost connection to Discord.
The connection loss was actually a good starting point to find the cause of the issue (hopefully).
Looking at Guild#_patch it seems like the linked line is the culprit.
TextChannel#startTypingclient.ws.shards.first().connection.close(1000) (private api))TextChannel#stopTyingGuild#channels and copying TextChannel#_typing onto the new channel if existing.ClientUser#_typing seems to be cleared regardless, _that_ seems to be the issue.Can you try 1bafa4b86bcedb62b2fb349dda06f0867273481b and see whether this fixes your issue?
that fixed it, yeah. thanks
Most helpful comment
that fixed it, yeah. thanks