mirror of https://github.com/stijndcl/didier
Fix listeners
parent
1831446f65
commit
4548f0e003
|
@ -48,12 +48,12 @@ class Discord(commands.Cog):
|
||||||
self.client.tree.remove_command(self._bookmark_ctx_menu.name, type=self._bookmark_ctx_menu.type)
|
self.client.tree.remove_command(self._bookmark_ctx_menu.name, type=self._bookmark_ctx_menu.type)
|
||||||
self.client.tree.remove_command(self._pin_ctx_menu.name, type=self._pin_ctx_menu.type)
|
self.client.tree.remove_command(self._pin_ctx_menu.name, type=self._pin_ctx_menu.type)
|
||||||
|
|
||||||
@commands.Cog.listener("event_create")
|
@commands.Cog.listener()
|
||||||
async def on_event_create(self, event: Event):
|
async def on_event_create(self, event: Event):
|
||||||
"""Custom listener called when an event is created"""
|
"""Custom listener called when an event is created"""
|
||||||
self.timer.maybe_replace_task(event)
|
self.timer.maybe_replace_task(event)
|
||||||
|
|
||||||
@commands.Cog.listener("timer_end")
|
@commands.Cog.listener()
|
||||||
async def on_timer_end(self, event_id: int):
|
async def on_timer_end(self, event_id: int):
|
||||||
"""Custom listener called when an event timer ends"""
|
"""Custom listener called when an event timer ends"""
|
||||||
async with self.client.postgres_session as session:
|
async with self.client.postgres_session as session:
|
||||||
|
|
Loading…
Reference in New Issue