enregistrer_fonction_bouton
Assigns custom JavaScript code to execute when a specific Discord button is clicked, enabling dynamic button functionality in Discord bots.
Instructions
Enregistre une fonction personnalisée pour un bouton existant (par ID de bouton)
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"buttonId": "<buttonId>",
"functionCode": "<functionCode>"
},
"name": "enregistrer_fonction_bouton"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| buttonId | Yes | ID du bouton (customId) | |
| functionCode | Yes | Code JavaScript à exécuter quand le bouton est cliqué | |
| functionName | No | Nom de la fonction (pour référence) |