LordBoos / discord_game

Home Assistant custom component to get online and game status of Discord users
MIT License
56 stars 7 forks source link

Idea - Use Activities rather than Activity #5

Closed C0NTi closed 4 years ago

C0NTi commented 4 years ago

In the api you have

discord_member.activity.name or discord_member.activities

The problem I have with the default behaviour of activity.name is that it shows you the most current activity. So if I fire up a game my and then decide to listen to spotify while in game my activity will display Spotify not the game I'm playing.

image

I have modified the component to also include the activities feed, as you can see the response is a bit messy, I don't know a thing about python and how to tidy it up, so at the moment Im just using another home assistant sensor..

image

If this could be incorporated into the component, I could remove all my redundant template sensors, and I could see the true game activity for my friends.

From what I can tell in the responses a game can come in different formats depending on whether its a Discord 'RICH PRESENCE GAME', A discord automatically recognised game or a manually added game.

LordBoos commented 4 years ago

Good idea, might as well get some additional information from the discord like song currently listened to etc.

LordBoos commented 4 years ago

Implemented in the release 2.0.0: https://github.com/LordBoos/discord_game/releases/tag/2.0.0