Skip to content

Commit

Permalink
Add new nextcord on_presence_update event
Browse files Browse the repository at this point in the history
  • Loading branch information
LordBoos committed Mar 3, 2022
1 parent ab5fdf9 commit 2e653df
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions custom_components/discord_game/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,13 @@ async def on_member_update(before: Member, after: Member):
if watcher is not None:
await update_discord_entity(watcher, after)

# noinspection PyUnusedLocal
@bot.event
async def on_presence_update(before: Member, after: Member):
watcher = watchers.get("{}".format(after))
if watcher is not None:
await update_discord_entity(watcher, after)

# noinspection PyUnusedLocal
@bot.event
async def on_user_update(before: User, after: User):
Expand Down

0 comments on commit 2e653df

Please sign in to comment.