changelog and activity fix
All checks were successful
Build and Push Docker Image / build (push) Successful in 12s

This commit is contained in:
Corban-Lee Jones 2024-12-06 17:14:08 +00:00
parent 8bfcf7eca4
commit cf580d741d
2 changed files with 17 additions and 2 deletions

View File

@ -9,8 +9,21 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added
- Commands for accessing remote console.
- Shorthand commands for commonly used rcon commands.
- Online user count that is automatically updated and set as the bot's activity presence.
- Console reader for handling events in-game.
- Announce when user has joined/left the server.
- Mod update checker and manager, with announcements for server restart.
### Fixed
### Changed
### Removed
## [0.0.1] - 2024-12-06
### Added
- Initial project files and repository

View File

@ -6,7 +6,7 @@ The current intent is to display the server's player count as the activity.
import re
import logging
from discord import Game
from discord import Game, Status
from discord.ext import commands, tasks
from rcon.source import rcon
@ -36,7 +36,9 @@ class ActivityCog(commands.Cog):
return
players_count = int(re_match.group(1))
await self.bot.change_presence(activity=Game(name=f"with {players_count} survivor{'s' if players_count != 1 else ''}!"))
activity = Game(name=f"with {players_count} survivor{'s' if players_count != 1 else ''}!")
await self.bot.change_presence(activity=activity, status=Status.online)
log.debug("player count in activity updated to: %s", players_count)