create_link_button
Fonction
Bouton qui ouvre une URL. Aucun événement n'est envoyé au bot.
from discord_interactions import create_link_buttonSignature
def create_link_button( url: str, label: str = '', emoji: str | Dict[str, Any] | Any | None = None, disabled: bool = False,) -> Dict[str, Any]Paramètres
| Nom | Type | Défaut | Description |
|---|---|---|---|
url | str | requis | Adresse ouverte au clic (512 caractères max). |
label | str | '' | |
emoji | str | Dict[str, Any] | Any | None | None | |
disabled | bool | False |
Retour
Dict[str, Any]
Exemple
from discord_interactions import create_action_row, create_link_button lien = create_link_button("https://discord.com/developers/docs", "Documentation Discord")await ctx.respond(components=[create_action_row(lien)])