- Quickstart
- API Reference
- Frequently Asked Questions
- discord.py is dead! Will this library die too?
- Are you going to/will/consider fork(ing) discord.py?
- Will discord.py be able to work with this library?
- Where should we go with discord.py being gone?
- Why are you not supporting cooldowns?
- Will we not be able to create message commands?
- My question is not answered on here!
Dispatching¶
- class interactions.api.dispatch.Listener
A class representing how events become dispatched and listened to.
- Variables
loop (asyncio.AbstractEventLoop) – The coroutine event loop established on.
events (dict) – A list of events being dispatched.
- register(coro: Coroutine, name: Optional[str] = None) None
Registers a given coroutine as an event to be listened to. If the name of the event is not given, it will then be determined by the coroutine’s name.
i.e. : async def on_guild_create -> “ON_GUILD_CREATE” dispatch.
- Parameters
coro (typing.Coroutine) – The coroutine to register as an event.
name (typing.Optional[str]) – The name to associate the coroutine with. Defaults to None.
- Returns
None