discord-interactions.py

create_context

Fonction

Crée un SlashContext (usage interne ou tests).

from discord_interactions.slash import create_context

Signature

def create_context(    interaction: discord.Interaction,    command: SlashCommand | None = None,    options: Dict[str, Any] | None = None,) -> SlashContext

Paramètres

NomTypeDéfautDescription
interactiondiscord.Interactionrequis
commandSlashCommand | NoneNone
optionsDict[str, Any] | NoneNone

Retour

SlashContext

Tape un nom : create_button, ModalBuilder, cooldown.