Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can I be notified when the token is reset after I've connected to the Discord gateway? #1469

Open
wasd96040501 opened this issue Dec 14, 2023 · 0 comments

Comments

@wasd96040501
Copy link

wasd96040501 commented Dec 14, 2023

I attempted to reset the token after establishing a connection with the Discord gateway, but it appears that session.LastHeartbeatAck continues to update.

Edited:
In line 608, it appears we're never notified when authentication fails. What if we added a channel variable to the Session struct? (I would be more than happy to assist by making a PR).

discordgo/wsapi.go

Lines 603 to 614 in f7800ef

if e.Operation == 9 {
s.log(LogInformational, "sending identify packet to gateway in response to Op9")
err = s.identify()
if err != nil {
s.log(LogWarning, "error sending gateway identify packet, %s, %s", s.gateway, err)
return e, err
}
return e, nil
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant