Skip to content
This repository has been archived by the owner on Nov 29, 2022. It is now read-only.

Commit

Permalink
Merge pull request #5 from rfalias/Activity
Browse files Browse the repository at this point in the history
Change bot status to 'watching survivors' instead of 'game'
  • Loading branch information
rfalias authored Jan 24, 2022
2 parents 14cd59b + a35ca9e commit 493c175
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pzbot.py
Original file line number Diff line number Diff line change
Expand Up @@ -376,9 +376,10 @@ async def status_task():
if _serverUp:
playercount = await pzplayers()
print(playercount)
await bot.change_presence(activity=discord.Game(name=f"{playercount} survivors online"))

await bot.change_presence(activity=discord.Activity(type=discord.ActivityType.watching, name=f"{playercount} survivors online"))
else:
await bot.change_presence(activity=discord.Game(name=f"Server offline"))
await bot.change_presence(activity=discord.Activity(type=discord.ActivityType.watching, name=f"Server offline"))
await asyncio.sleep(20)

@bot.event
Expand Down

0 comments on commit 493c175

Please sign in to comment.