discord-interactions.py

create_link_button

Fonction

Bouton qui ouvre une URL. Aucun événement n'est envoyé au bot.

from discord_interactions import create_link_button

Signature

def create_link_button(    url: str,    label: str = '',    emoji: str | Dict[str, Any] | Any | None = None,    disabled: bool = False,) -> Dict[str, Any]

Paramètres

NomTypeDéfautDescription
urlstrrequisAdresse ouverte au clic (512 caractères max).
labelstr''
emojistr | Dict[str, Any] | Any | NoneNone
disabledboolFalse

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)])

Tape un nom : create_button, ModalBuilder, cooldown.