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

Panics when handling presences #1506

Open
sentinelb51 opened this issue Mar 5, 2024 · 2 comments
Open

Panics when handling presences #1506

sentinelb51 opened this issue Mar 5, 2024 · 2 comments

Comments

@sentinelb51
Copy link
Contributor

It seems that anything to do with Presences causes a segmentation fault within the library itself. For example, in state.go, presenceAdd has been throwing panics for me:
image

I seemed to have fixed it by adding a simple check to see if User is not nil:
image

Then, another issue came up in state.go:
image

Hopefully this will fix the issue for now, but I was wondering if anyone else is having this issue. This is on the latest commit of discordgo as of this date.
image

@yorukot
Copy link

yorukot commented May 4, 2024

You can try t.Member instead of t.User
t.User is in private message
t.Member is in the guild

I'm new to Discordgo but I also have this problem, but this works for me.

@yorukot
Copy link

yorukot commented May 4, 2024

@sentinelb51 Forgot to mention :(

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

2 participants