fix: bye getserve.rs

This commit is contained in:
2026-01-02 17:06:54 +01:00
parent 3f000b3cf7
commit 808c564d1c
3 changed files with 10 additions and 125 deletions

View File

@@ -128,10 +128,16 @@ async def setup(bot):
@tasks.loop(minutes=10)
async def update_status():
data = fetch_api_data()
countPlayers = data.get("countPlayers", 0)
countServers = data.get("countServers", 0)
total_players = 0
total_servers = 0
if data:
for game_key, game_data in data.items():
total_players += game_data.get("players", 0)
total_servers += game_data.get("servers", 0)
activity = discord.Game(
name=f"with {countPlayers} players on {countServers} servers"
name=f"with {total_players} players on {total_servers} servers"
)
await bot.change_presence(activity=activity)