- 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!
Event Context¶
- class interactions.context.Context(**kwargs)
The base class of "context" for dispatched event data from the gateway.
- Variables
message (interactions.api.models.message.Message) – The message data model.
author (interactions.api.models.member.Member) – The member data model.
user (interactions.api.models.user.User) – The user data model.
channel (interactions.api.models.channel.Channel) – The channel data model.
guild (interactions.api.models.guild.Guild) – The guild data model.
*args – Multiple arguments of the context.
**kwargs – Keyword-only arguments of the context.
- class interactions.context.InteractionContext(**kwargs)
This is a derivation of the base Context class designed specifically for interaction data.
- Variables
id (str) – The ID of the interaction.
application_id (str) – The application ID of the interaction.
type (typing.Union[str, int, interactions.enums.InteractionType]) – The type of interaction.
data (interactions.models.misc.InteractionData) – The application command data.
guild_id (str) – The guild ID the interaction falls under.
channel_id (str) – The channel ID the interaction was instantiated from.
token (str) – The token of the interaction response.
version (int=1) – The version of interaction creation. Always defaults to
1
.
- async send(content: Optional[str] = None, tts: Optional[bool] = None, embeds: Optional[Union[interactions.api.models.message.Embed, List[interactions.api.models.message.Embed]]] = None, allowed_mentions: Optional[interactions.api.models.message.MessageInteraction] = None, message_reference: Optional[interactions.api.models.message.MessageReference] = None, components: Optional[Union[interactions.models.component.Component, List[interactions.models.component.Component]]] = None, sticker_ids: Optional[Union[str, List[str]]] = None, type: Optional[int] = None) interactions.api.models.message.Message
A very primitive form of the send model to get the uttermost basic implementation of command responses up and running.
ok he kinda work now
- class interactions.context.ComponentContext(**kwargs)
This is a derivation of the base Context class designed specifically for component data.
- Variables
custom_id (str) – The customized ID for the component to call.
type (typing.Union[str, int, interactions.enums.ComponentType]) – The type of component.
values (list) – The curated list of values under the component. This will be
None
if the type is notSELECT_MENU
.origin (bool) – Whether this is the origin of the component.