Compare commits

...

4 Commits

Author SHA1 Message Date
2ca87c1227 Bump version: 0.0.0 → 0.0.1
Some checks failed
Build and Push Docker Image / build (push) Failing after 7m5s
2024-12-06 09:48:24 +00:00
de511f67c7 bad file name corrected 2024-12-06 09:48:16 +00:00
7642da6b43 console reader 2024-12-06 09:45:38 +00:00
cb745bc8b1 activity handler 2024-12-06 09:45:32 +00:00
3 changed files with 36 additions and 1 deletions

View File

@ -1,4 +1,4 @@
[bumpversion]
current_version = 0.0.0
current_version = 0.0.1
commit = True
tag = True

35
cogs/activity.py Normal file
View File

@ -0,0 +1,35 @@
"""
Handles the activity displayed on the bot's Discord profile.
The current intent is to display the server's player count as the activity.
"""
import logging
from discord import Activity
from discord.ext import commands, tasks
log = logging.getLogger(__name__)
class CommandCog(commands.Cog):
"""
Handles the bot's profile activity.
"""
def __init__(self, bot: commands.Bot):
self.bot = bot
@tasks.loop(seconds=30)
async def update_activity(self):
"""
Update the bot's profile activity on an interval of 30 seconds.
"""
log.debug("updating activity")
self.bot.
async def setup(bot: commands.Bot):
cog = CommandCog(bot)
await bot.add_cog(cog)
log.info("Added %s cog", cog.__class__.__name__)

0
cogs/console.py Normal file
View File