Que fait discord ?
Utilisez l'outil message avec channel: "discord". Il n'existe pas d'outil Discord séparé.
Règles
- Respectez les gates
channels.discord.actions.*. - Privilégiez les identifiants explicites
guildId,channelId,messageId,userId. - Multi-compte : passez
accountIdsi nécessaire. - Cibles d'envoi :
to: "channel:<id>"outo: "user:<id>". - Mentionnez les utilisateurs avec
<@USER_ID>. - Évitez les tableaux Markdown dans les messages Discord sortants.
- Privilégiez les composants v2 pour une interface riche ; ne mélangez pas les
componentsv2 avec lesembedshérités.
Actions courantes
Envoi :
{ "action": "send", "channel": "discord", "to": "channel:123", "message": "bonjour", "silent": true }
Envoi d'un média :
{
"action": "send",
"channel": "discord",
"to": "channel:123",
"message": "voir la pièce jointe",
"media": "file:///tmp/example.png"
}
Composants v2 :
{
"action": "send",
"channel": "discord",
"to": "channel:123",
"message": "Statut",
"components": "[Composants Carbon v2]"
}
Réaction :
{ "action": "react", "channel": "discord", "channelId": "123", "messageId": "456", "emoji": "👍" }
Lecture :
{ "action": "read", "channel": "discord", "to": "channel:123", "limit": 20 }
Édition / suppression :
{
"action": "edit",
"channel": "discord",
"channelId": "123",
"messageId": "456",
"message": "faute corrigée"
}
{ "action": "delete", "channel": "discord", "channelId": "123", "messageId": "456" }
Sondage :
{
"action": "poll",
"channel": "discord",
"to": "channel:123",
"pollQuestion": "Déjeuner ?",
"pollOption": ["Pizza", "Sushi"],
"pollDurationHours": 24
}
Épingler :
{ "action": "pin", "channel": "discord", "channelId": "123", "messageId": "456" }
Fil de discussion :
{
"action": "thread-create",
"channel": "discord",
"channelId": "123",
"messageId": "456",
"threadName": "tri des bugs"
}
Recherche :
{
"action": "search",
"channel": "discord",
"guildId": "999",
"query": "notes de version",
"channelIds": ["123"],
"limit": 10
}
Présence, souvent soumise à des gates :
{
"action": "set-presence",
"channel": "discord",
"activityType": "playing",
"activityName": "OpenClaw",
"status": "online"
}