@openclaw/discord 2026.2.14 → 2026.2.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/channel.ts +8 -0
package/package.json
CHANGED
package/src/channel.ts
CHANGED
|
@@ -16,6 +16,7 @@ import {
|
|
|
16
16
|
migrateBaseNameToDefaultAccount,
|
|
17
17
|
normalizeAccountId,
|
|
18
18
|
normalizeDiscordMessagingTarget,
|
|
19
|
+
normalizeDiscordOutboundTarget,
|
|
19
20
|
PAIRING_APPROVED_MESSAGE,
|
|
20
21
|
resolveDiscordAccount,
|
|
21
22
|
resolveDefaultDiscordAccountId,
|
|
@@ -158,6 +159,12 @@ export const discordPlugin: ChannelPlugin<ResolvedDiscordAccount> = {
|
|
|
158
159
|
threading: {
|
|
159
160
|
resolveReplyToMode: ({ cfg }) => cfg.channels?.discord?.replyToMode ?? "off",
|
|
160
161
|
},
|
|
162
|
+
agentPrompt: {
|
|
163
|
+
messageToolHints: () => [
|
|
164
|
+
"- Discord components: set `components` when sending messages to include buttons, selects, or v2 containers.",
|
|
165
|
+
"- Forms: add `components.modal` (title, fields). OpenClaw adds a trigger button and routes submissions as new messages.",
|
|
166
|
+
],
|
|
167
|
+
},
|
|
161
168
|
messaging: {
|
|
162
169
|
normalizeTarget: normalizeDiscordMessagingTarget,
|
|
163
170
|
targetResolver: {
|
|
@@ -285,6 +292,7 @@ export const discordPlugin: ChannelPlugin<ResolvedDiscordAccount> = {
|
|
|
285
292
|
chunker: null,
|
|
286
293
|
textChunkLimit: 2000,
|
|
287
294
|
pollMaxOptions: 10,
|
|
295
|
+
resolveTarget: ({ to }) => normalizeDiscordOutboundTarget(to),
|
|
288
296
|
sendText: async ({ to, text, accountId, deps, replyToId, silent }) => {
|
|
289
297
|
const send = deps?.sendDiscord ?? getDiscordRuntime().channel.discord.sendMessageDiscord;
|
|
290
298
|
const result = await send(to, text, {
|