defer_interaction
Coroutineà attendre avec await
Accuse réception pour répondre plus tard (15 minutes). Sur un composant, update=True n'affiche rien.
from discord_interactions import defer_interactionSignature
async def defer_interaction( interaction: discord.Interaction, update: bool = False, ephemeral: bool = False, thinking: bool = True,) -> NoneParamètres
| Nom | Type | Défaut | Description |
|---|---|---|---|
interaction | discord.Interaction | requis | |
update | bool | False | Accusé silencieux pour un composant ; le message sera édité ensuite. |
ephemeral | bool | False | Le « réfléchit » et la réponse seront éphémères. |
thinking | bool | True |
Retour
None
Exemple
from discord_interactions import defer_interaction, send_followup await defer_interaction(interaction, ephemeral=True)resultat = await calcul_long()await send_followup(interaction, f"Résultat : {resultat}", ephemeral=True)