discord-interactions.py

from_coroutine

Fonction

Autocomplétion à partir d'une fonction async, avec cache optionnel.

from discord_interactions.slash import from_coroutine

Signature

def from_coroutine(    coro_func: Callable[..., Awaitable[List[str]]],    *,    cache_ttl: float = 0,) -> Callable[..., Awaitable[List[Tuple[str, Any]]]]

Paramètres

NomTypeDéfautDescription
coro_funcCallable[..., Awaitable[List[str]]]requis
cache_ttlfloat0

Retour

Callable[..., Awaitable[List[Tuple[str, Any]]]]

Tape un nom : create_button, ModalBuilder, cooldown.