Implemented /event add

This commit is contained in:
2025-04-18 23:34:11 +02:00
parent fd44276021
commit ec733097ea
6 changed files with 298 additions and 24 deletions

View File

@@ -6,7 +6,7 @@ from libbot.cache.classes import CacheMemcached, CacheRedis
from libbot.cache.manager import create_cache_client
from libbot.pycord.classes import PycordBot as LibPycordBot
from classes import PycordGuild, PycordUser
from classes import PycordEvent, PycordGuild, PycordUser
from modules.logging_utils import get_logger
logger: Logger = get_logger(__name__)
@@ -78,6 +78,10 @@ class PycordBot(LibPycordBot):
else await PycordGuild.from_id(guild.id, cache=self.cache)
)
# TODO Document this method
async def create_event(self, **kwargs) -> PycordEvent:
return await PycordEvent.create(**kwargs, cache=self.cache)
async def start(self, *args: Any, **kwargs: Any) -> None:
await super().start(*args, **kwargs)