discordgo icon indicating copy to clipboard operation
discordgo copied to clipboard

Why does it still report: websocket: close 4004: Authentication failed, even though the connection was successful?

Open linliyuan opened this issue 7 months ago • 0 comments

I encountered an issue while using the Discord reconnection mechanism. The reconnection seems to be successful, but I keep getting the error 'websocket: close 4004: Authentication failed' when trying to receive messages. This causes the bot to enter an infinite reconnection loop.

The third-party package I am using is github.com/bwmarrin/discordgo v0.27.1.

Here is a screenshot of the specific logs:

image

image

image

image

linliyuan avatar Jul 11 '24 04:07 linliyuan