discordgo
discordgo copied to clipboard
Presence update events not showing game if custom status is active
Looks like Discord will send multiple "games" if the user has a custom status and starts playing a game. Would adding an activities field to Presence be a way to tackle this? Hoping to look into it myself soon.
Example debug event from discordgo
{
"user": {
"id": "..."
},
"status": "online",
"roles": [
"..."
],
"nick": "...",
"guild_id": "...",
"game": {
"type": 4,
"name": "Custom Status",
"id": "custom",
"emoji": {
"name": "moon2DOIT",
"id": "508113472811302923",
"animated": false
},
"created_at": 1574802972622
},
"client_status": {
"desktop": "online"
},
"activities": [
{
"type": 4,
"name": "Custom Status",
"id": "custom",
"emoji": {
"name": "moon2DOIT",
"id": "508113472811302923",
"animated": false
},
"created_at": 1574802972622
},
{
"type": 0,
"timestamps": {
"start": 1574803206220
},
"name": "Emacs",
"id": "7ed35de5c4f795d3",
"created_at": 1574803206272
}
]
}
How it appears as a Game on Presence
{Name:Custom Status Type:4 URL: Details: State: TimeStamps:{EndTimestamp:0 StartTimestamp:0} Assets:{LargeImageID: SmallImageID: LargeText: SmallText:} ApplicationID: Instance:0}
This should be resolved in the develop branch as it was merged from #730