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

Adding error unmarshalling event clarity #642

Open
bkuhl opened this issue Apr 21, 2019 · 3 comments
Open

Adding error unmarshalling event clarity #642

bkuhl opened this issue Apr 21, 2019 · 3 comments

Comments

@bkuhl
Copy link

bkuhl commented Apr 21, 2019

Seems to be a type issue in handling the GUILD_CREATE event in my case, I've also seen several others. It's unclear to me what's actually happening under the covers.

2019/04/21 13:34:31 [DG0] wsapi.go:552:onEvent() error unmarshalling GUILD_CREATE event, json: cannot unmarshal string into Go struct field Game.timestamps of type float64

There seems to be a lot of these kinds of type-related issues being tossed around. Maybe it would be a good idea to add some more clear logging as to what the underlying issue is so it's more clear what's happening? I personally would like to have more insight into the event that my bot wasn't able to process.

@VetSoftKeith
Copy link

The master branch doesn't appear to be completely up to date with the current payloads received from Discord

@bwmarrin
Copy link
Owner

@bkuhl I agree actually and was thinking the same thing a couple days ago. What extra data would you like? Personally, I wouldn't mind seeing the user id, guild id, and maybe the value it's having a problem with. I'm not sure if all of that can be added cleanly but it's worth looking into.

@bkuhl
Copy link
Author

bkuhl commented May 15, 2019

Those are the exact fields I'm thinking of.

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

3 participants