mirror of
https://github.com/MelisaDev/melisa.git
synced 2024-09-22 19:22:01 +03:00
feat(listeners): on_interaction_create listener
This commit is contained in:
parent
c3a4752a8c
commit
a1b9b7ba0a
1 changed files with 19 additions and 0 deletions
19
melisa/listeners/interaction_create.py
Normal file
19
melisa/listeners/interaction_create.py
Normal file
|
@ -0,0 +1,19 @@
|
|||
# Copyright MelisaDev 2022 - Present
|
||||
# Full MIT License can be found in `LICENSE.txt` at the project root.
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from ..models.interactions.interactions import Interaction
|
||||
from ..utils.types import Coro
|
||||
|
||||
|
||||
async def interaction_create_listener(self, gateway, payload: dict):
|
||||
interaction = Interaction.from_dict(payload)
|
||||
|
||||
await self.dispatch("on_interaction_create", (interaction,))
|
||||
|
||||
return
|
||||
|
||||
|
||||
def export() -> Coro:
|
||||
return interaction_create_listener
|
Loading…
Reference in a new issue