discordgo
discordgo copied to clipboard
Adding error unmarshalling event clarity
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.
The master branch doesn't appear to be completely up to date with the current payloads received from Discord
@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.
Those are the exact fields I'm thinking of.