discord-interactions.py

TranslationSet

Classe

Traductions d'une clé dans plusieurs langues.

from discord_interactions.slash import TranslationSet

Constructeur

TranslationSet(    key: str,    translations: Dict[str, str] = <factory>,    default: str | None = None,)
NomTypeDéfautDescription
keystrrequis
translationsDict[str, str]<factory>
defaultstr | NoneNone

Propriétés

NomTypeDescription
keystr
translationsDict[str, str]
defaultstr | None

Méthodes

get

def get(locale: str, fallback: str | None = None) -> str

to_api_dict

def to_api_dict() -> Dict[str, str]

Tape un nom : create_button, ModalBuilder, cooldown.