refactor: share reaction schemas and notes

This commit is contained in:
Peter Steinberger
2026-01-07 04:24:11 +01:00
parent 654e14df31
commit 8ef0609f8e
11 changed files with 81 additions and 40 deletions

View File

@@ -201,8 +201,7 @@ Notes:
- `to` accepts `channel:<id>` or `user:<id>`.
- Polls require 210 answers and default to 24 hours.
- `reactions` returns per-emoji user lists (limited to 100 per reaction).
- `emoji=""` on `react` removes the bot's reaction(s) on the message.
- `remove: true` on `react` removes just that emoji.
- Reaction removal semantics: see [/tools/reactions](/tools/reactions).
- `discord.actions.*` gates Discord tool actions; `roles` + `moderation` default to `false`.
- `searchMessages` follows the Discord preview spec (limit max 25, channel/author filters accept arrays).
- The tool is only exposed when the current provider is Discord.
@@ -214,8 +213,7 @@ Core actions:
- `react` (`chatJid`, `messageId`, `emoji`, optional `remove`, `participant`, `fromMe`, `accountId`)
Notes:
- `emoji=""` removes the bot's reaction(s) on the message.
- `remove: true` removes the bot's reaction (same effect as empty emoji).
- Reaction removal semantics: see [/tools/reactions](/tools/reactions).
- `whatsapp.actions.*` gates WhatsApp tool actions.
- The tool is only exposed when the current provider is WhatsApp.
@@ -226,8 +224,7 @@ Core actions:
- `react` (`chatId`, `messageId`, `emoji`, optional `remove`)
Notes:
- `emoji=""` removes the bot's reaction(s) on the message.
- `remove: true` removes the reaction (Telegram only supports removing your own reaction).
- Reaction removal semantics: see [/tools/reactions](/tools/reactions).
- `telegram.actions.*` gates Telegram tool actions.
- The tool is only exposed when the current provider is Telegram.

13
docs/tools/reactions.md Normal file
View File

@@ -0,0 +1,13 @@
# Reaction tooling
Shared reaction semantics across providers:
- `emoji` is required for reactions.
- `emoji=""` removes the bot's reaction(s) on the message.
- `remove: true` removes the specified emoji when supported.
Provider notes:
- **Discord/Slack**: empty `emoji` removes all of the bot's reactions on the message; `remove: true` removes just that emoji.
- **Telegram**: `remove: true` removes your own reaction (Bot API limitation).
- **WhatsApp**: `remove: true` maps to empty emoji (remove bot reaction).