Implemented /event edit and /edit cancel

This commit is contained in:
2025-04-21 22:49:23 +02:00
parent b72f930c94
commit 08d1ca4d33
5 changed files with 286 additions and 120 deletions

View File

@@ -87,9 +87,6 @@ class PycordBot(LibPycordBot):
await super().start(*args, **kwargs)
async def close(self, **kwargs) -> None:
if self.scheduler is not None:
self.scheduler.shutdown()
await super().close(**kwargs)
async def find_event(self, event_id: str | ObjectId | None = None, event_name: str | None = None):
@@ -97,6 +94,6 @@ class PycordBot(LibPycordBot):
raise AttributeError("Either event's ID or name must be provided!")
if event_id is not None:
await PycordEvent.from_id(event_id, cache=self.cache)
return await PycordEvent.from_id(event_id, cache=self.cache)
else:
await PycordEvent.from_name(event_name, cache=self.cache)
return await PycordEvent.from_name(event_name, cache=self.cache)