discord-interactions.py

AutocompleteRegistry

Classe

Registre interne des fonctions d'autocomplétion.

from discord_interactions.slash import AutocompleteRegistry

Constructeur

AutocompleteRegistry()

Méthodes

register

def register(    command_name: str,    option_name: str,    handler: Callable[..., Awaitable[List[Tuple[str, Any]]]],) -> None

register_options

def register_options(command_path: str, command: Any) -> None

Branche les `autocomplete=fonction` déclarés dans les options.

register_global

def register_global(    option_name: str,    handler: Callable[..., Awaitable[List[Tuple[str, Any]]]],) -> None

get_handler

def get_handler(    command_name: str,    option_name: str,) -> Callable[..., Awaitable[List[Tuple[str, Any]]]] | None

handle

async def handle(interaction: discord.Interaction) -> None

Tape un nom : create_button, ModalBuilder, cooldown.