@openclaw/discord 2026.5.28 → 2026.5.31-beta.1
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/dist/{account-inspect-C4sJZNbI.js → account-inspect-DDZtT5C8.js} +9 -7
- package/dist/account-inspect-api.js +1 -1
- package/dist/{accounts-dXTfmnSZ.js → accounts-P19jm1lf.js} +1 -1
- package/dist/action-runtime-api.js +1 -1
- package/dist/api.js +16 -16
- package/dist/{approval-handler.runtime-CN_E7nkQ.js → approval-handler.runtime-DSFfzXpo.js} +4 -4
- package/dist/{audit-BFCBp74H.js → audit-kgIklCyI.js} +4 -4
- package/dist/{channel-COXb22wL.js → channel-D0gX0yj6.js} +44 -31
- package/dist/{channel-actions-C2g9OmnG.js → channel-actions-DDoc4V7x.js} +4 -4
- package/dist/{channel-actions.runtime-drnbrgpt.js → channel-actions.runtime-CqZfnMaA.js} +5 -5
- package/dist/channel-config-api.js +1 -1
- package/dist/channel-plugin-api.js +1 -1
- package/dist/{channel.setup-BsrP5-hv.js → channel.setup-BNZm3eed.js} +8 -23
- package/dist/{components-CjQujWa1.js → components-DcLQ2JkV.js} +1 -1
- package/dist/{config-schema-3tZYNVTM.js → config-schema-spuxW477.js} +17 -1
- package/dist/contract-api.js +3 -3
- package/dist/{conversation-identity-CsPV1Gjx.js → conversation-identity-BURFgcfI.js} +7 -5
- package/dist/{directory-config-BqPvRoDv.js → directory-config-B9Jw1Q2R.js} +2 -2
- package/dist/directory-contract-api.js +1 -1
- package/dist/{directory-live-CCI0IMZq.js → directory-live-CDWUg-nA.js} +2 -2
- package/dist/{doctor-Dy7sI1sL.js → doctor-BUhqxLb9.js} +4 -5
- package/dist/{doctor-contract-8-Ia3d_X.js → doctor-contract-BAu3WLvd.js} +5 -5
- package/dist/doctor-contract-api.js +1 -1
- package/dist/{handle-action.guild-admin-BmjclQbR.js → handle-action.guild-admin-Dpa-kUzu.js} +1 -1
- package/dist/index.js +1 -1
- package/dist/legacy-state-migrations-api.js +3 -1
- package/dist/{manager.runtime-ClhnLsZf.js → manager.runtime-BWBENHRA.js} +22 -19
- package/dist/{message-handler-BnhAHqem.js → message-handler-HO8BbZmQ.js} +182 -29
- package/dist/{message-handler.preflight-B1RTQ6ZO.js → message-handler.preflight-DxHBPQvD.js} +24 -17
- package/dist/{message-handler.process-B1ODKav3.js → message-handler.process-Cq3j7A9k.js} +41 -29
- package/dist/{message-utils-CmB03FoF.js → message-utils-D_3KTxh_.js} +19 -15
- package/dist/{outbound-adapter-DfY2Dtf3.js → outbound-adapter-BkPkILpq.js} +52 -87
- package/dist/{pluralkit-DAZN3ZMK.js → pluralkit-Ds9aZAM4.js} +1 -1
- package/dist/{probe-BiEg-_i1.js → probe-2MdGjUAf.js} +1 -1
- package/dist/{probe.runtime-Dja7CbJT.js → probe.runtime-J927koKG.js} +1 -1
- package/dist/{provider-DCcqVFp-.js → provider-BK8hjk_y.js} +224 -150
- package/dist/{provider-session.runtime-mKSG07RE.js → provider-session.runtime-CYMFlLg9.js} +3 -3
- package/dist/provider.runtime-RfQSSM_v.js +2 -0
- package/dist/{resolve-allowlist-common-DAIbZobr.js → resolve-allowlist-common-BIf3417N.js} +1 -1
- package/dist/{resolve-channels-D1zgoxnw.js → resolve-channels-DK-3f_aA.js} +2 -2
- package/dist/{resolve-users-wPAvLk_8.js → resolve-users-DUDPsfWt.js} +2 -2
- package/dist/{runtime-gaB5-Wsj.js → runtime-Blf_d9E7.js} +8 -8
- package/dist/runtime-api.actions.js +2 -2
- package/dist/runtime-api.js +22 -22
- package/dist/runtime-api.lookup.js +5 -5
- package/dist/runtime-api.monitor-LVbgPRHA.js +6 -0
- package/dist/runtime-api.monitor.js +5 -5
- package/dist/runtime-api.send.js +5 -5
- package/dist/runtime-api.threads.js +5 -5
- package/dist/{send-CBxhnbKU.js → send-BHkA8a-k.js} +7 -7
- package/dist/{send.components-uuQuHL3t.js → send.components-CUHzDapa.js} +26 -12
- package/dist/{send.outbound-DZHJYmNF.js → send.outbound-DSKZbjML.js} +15 -5
- package/dist/{send.receipt-3y2lVFRf.js → send.receipt-CjsWpitW.js} +25 -13
- package/dist/{send.shared-Ddl21-Gt.js → send.shared-Cluujl6W.js} +3 -3
- package/dist/setup-plugin-api.js +1 -1
- package/dist/{shared-D3NkInmq.js → shared-BMGLQw74.js} +5 -5
- package/dist/{subagent-hooks-BacIbIBD.js → subagent-hooks-7jAn9HT5.js} +3 -3
- package/dist/subagent-hooks-api.js +1 -5
- package/dist/{system-events-Cw6Hp8RF.js → system-events-BjuNA9Zs.js} +1 -1
- package/dist/{target-resolver-jjQzAS6T.js → target-resolver-BYuWNVQp.js} +3 -3
- package/dist/targets-BNDUOdvI.js +3 -0
- package/dist/{thread-bindings-BBq-yzq2.js → thread-bindings-CKruJE91.js} +6 -6
- package/dist/{thread-bindings.discord-api-5QgEd_dW.js → thread-bindings.discord-api-BjLUwwSP.js} +5 -5
- package/dist/{thread-bindings.manager-COkxjwR9.js → thread-bindings.manager-Dji7SZHG.js} +4 -4
- package/dist/{thread-bindings.session-updates-D5gY2ZTE.js → thread-bindings.session-updates-DoDFvU_h.js} +1 -1
- package/dist/{thread-bindings.state-BsOnj5NX.js → thread-bindings.state-DYp4FVEB.js} +8 -2
- package/dist/{timeouts-l_PsHQvX.js → timeouts-CEJ3--Uw.js} +5 -2
- package/dist/timeouts.js +1 -1
- package/dist/{transcripts-source-DDrS8HrV.js → transcripts-source-O73_YIDs.js} +1 -1
- package/dist/transcripts-source-api.js +1 -1
- package/dist/{typing-B7bCMPJJ.js → typing-CKW0i8du.js} +2 -2
- package/node_modules/typebox/build/type/script/mapping.d.mts +5 -2
- package/node_modules/typebox/build/type/script/mapping.mjs +15 -8
- package/node_modules/typebox/build/type/script/parser.d.mts +3 -1
- package/node_modules/typebox/build/type/script/parser.mjs +2 -1
- package/node_modules/typebox/package.json +29 -29
- package/npm-shrinkwrap.json +7 -38
- package/openclaw.plugin.json +77 -1
- package/package.json +5 -5
- package/dist/provider.runtime-BmpunJHX.js +0 -2
- package/dist/runtime-api.monitor-B38upMUK.js +0 -5
- package/dist/targets-BVKF5wbg.js +0 -3
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { u as resolveDiscordChannelInfoSafe } from "./thread-bindings.discord-api-
|
|
2
|
-
import { a as mergeAbortSignals } from "./timeouts-
|
|
1
|
+
import { u as resolveDiscordChannelInfoSafe } from "./thread-bindings.discord-api-BjLUwwSP.js";
|
|
2
|
+
import { a as mergeAbortSignals } from "./timeouts-CEJ3--Uw.js";
|
|
3
3
|
import { normalizeLowercaseStringOrEmpty, normalizeOptionalString, normalizeOptionalStringifiedId, uniqueStrings } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
4
4
|
import { ComponentType, StickerFormatType } from "discord-api-types/v10";
|
|
5
|
+
import { asDateTimestampMs, resolveExpiresAtMsFromDurationMs } from "openclaw/plugin-sdk/number-runtime";
|
|
5
6
|
import { saveRemoteMedia } from "openclaw/plugin-sdk/media-runtime";
|
|
6
7
|
import { buildMediaPayload } from "openclaw/plugin-sdk/reply-payload";
|
|
7
8
|
import { logVerbose } from "openclaw/plugin-sdk/runtime-env";
|
|
@@ -10,6 +11,16 @@ import { getFileExtension } from "openclaw/plugin-sdk/media-mime";
|
|
|
10
11
|
const DISCORD_CHANNEL_INFO_CACHE_TTL_MS = 300 * 1e3;
|
|
11
12
|
const DISCORD_CHANNEL_INFO_NEGATIVE_CACHE_TTL_MS = 30 * 1e3;
|
|
12
13
|
const DISCORD_CHANNEL_INFO_CACHE = /* @__PURE__ */ new Map();
|
|
14
|
+
function resolveDiscordChannelInfoCacheExpiresAt(ttlMs, nowMs) {
|
|
15
|
+
return resolveExpiresAtMsFromDurationMs(ttlMs, { nowMs });
|
|
16
|
+
}
|
|
17
|
+
function cacheDiscordChannelInfo(channelId, value, ttlMs, nowMs) {
|
|
18
|
+
const expiresAt = resolveDiscordChannelInfoCacheExpiresAt(ttlMs, nowMs);
|
|
19
|
+
if (expiresAt !== void 0) DISCORD_CHANNEL_INFO_CACHE.set(channelId, {
|
|
20
|
+
value,
|
|
21
|
+
expiresAt
|
|
22
|
+
});
|
|
23
|
+
}
|
|
13
24
|
function normalizeDiscordChannelId(value) {
|
|
14
25
|
return normalizeOptionalStringifiedId(value) ?? "";
|
|
15
26
|
}
|
|
@@ -18,18 +29,17 @@ function resolveDiscordMessageChannelId(params) {
|
|
|
18
29
|
return normalizeDiscordChannelId(message.channelId) || normalizeDiscordChannelId(message.channel_id) || normalizeDiscordChannelId(message.rawData?.channel_id) || normalizeDiscordChannelId(params.eventChannelId);
|
|
19
30
|
}
|
|
20
31
|
async function resolveDiscordChannelInfo(client, channelId) {
|
|
32
|
+
const rawNow = Date.now();
|
|
33
|
+
const now = asDateTimestampMs(rawNow);
|
|
21
34
|
const cached = DISCORD_CHANNEL_INFO_CACHE.get(channelId);
|
|
22
35
|
if (cached) {
|
|
23
|
-
if (cached.expiresAt >
|
|
36
|
+
if (now !== void 0 && cached.expiresAt > now) return cached.value;
|
|
24
37
|
DISCORD_CHANNEL_INFO_CACHE.delete(channelId);
|
|
25
38
|
}
|
|
26
39
|
try {
|
|
27
40
|
const channel = await client.fetchChannel(channelId);
|
|
28
41
|
if (!channel) {
|
|
29
|
-
|
|
30
|
-
value: null,
|
|
31
|
-
expiresAt: Date.now() + DISCORD_CHANNEL_INFO_NEGATIVE_CACHE_TTL_MS
|
|
32
|
-
});
|
|
42
|
+
cacheDiscordChannelInfo(channelId, null, DISCORD_CHANNEL_INFO_NEGATIVE_CACHE_TTL_MS, rawNow);
|
|
33
43
|
return null;
|
|
34
44
|
}
|
|
35
45
|
const channelInfo = resolveDiscordChannelInfoSafe(channel);
|
|
@@ -43,17 +53,11 @@ async function resolveDiscordChannelInfo(client, channelId) {
|
|
|
43
53
|
parentId: channelInfo.parentId,
|
|
44
54
|
ownerId: channelInfo.ownerId
|
|
45
55
|
};
|
|
46
|
-
|
|
47
|
-
value: payload,
|
|
48
|
-
expiresAt: Date.now() + DISCORD_CHANNEL_INFO_CACHE_TTL_MS
|
|
49
|
-
});
|
|
56
|
+
cacheDiscordChannelInfo(channelId, payload, DISCORD_CHANNEL_INFO_CACHE_TTL_MS, rawNow);
|
|
50
57
|
return payload;
|
|
51
58
|
} catch (err) {
|
|
52
59
|
logVerbose(`discord: failed to fetch channel ${channelId}: ${String(err)}`);
|
|
53
|
-
|
|
54
|
-
value: null,
|
|
55
|
-
expiresAt: Date.now() + DISCORD_CHANNEL_INFO_NEGATIVE_CACHE_TTL_MS
|
|
56
|
-
});
|
|
60
|
+
cacheDiscordChannelInfo(channelId, null, DISCORD_CHANNEL_INFO_NEGATIVE_CACHE_TTL_MS, rawNow);
|
|
57
61
|
return null;
|
|
58
62
|
}
|
|
59
63
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { o as normalizeDiscordOutboundTarget, s as chunkDiscordTextWithMode, t as createDiscordSendReceipt, x as DiscordError } from "./send.receipt-
|
|
2
|
-
import { s as resolveDiscordAccount } from "./accounts-
|
|
3
|
-
import { d as readDiscordComponentSpec } from "./components-
|
|
1
|
+
import { o as normalizeDiscordOutboundTarget, s as chunkDiscordTextWithMode, t as createDiscordSendReceipt, x as DiscordError } from "./send.receipt-CjsWpitW.js";
|
|
2
|
+
import { s as resolveDiscordAccount } from "./accounts-P19jm1lf.js";
|
|
3
|
+
import { d as readDiscordComponentSpec } from "./components-DcLQ2JkV.js";
|
|
4
4
|
import { t as parseDiscordRetryAfterBodySeconds } from "./retry-after-D5_VmM-_.js";
|
|
5
5
|
import { n as notifyDiscordInboundEventOutboundPayloadSuccess } from "./inbound-event-delivery-CEPlt2uz.js";
|
|
6
6
|
import { normalizeLowercaseStringOrEmpty, normalizeOptionalString, normalizeOptionalStringifiedId } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
@@ -86,11 +86,11 @@ function normalizeDiscordApprovalPayload(payload) {
|
|
|
86
86
|
let discordComponentSendPromise;
|
|
87
87
|
let discordSharedInteractivePromise;
|
|
88
88
|
async function sendDiscordComponentMessageLazy(...args) {
|
|
89
|
-
discordComponentSendPromise ??= import("./send.components-
|
|
89
|
+
discordComponentSendPromise ??= import("./send.components-CUHzDapa.js").then((n) => n.i).then((module) => module.sendDiscordComponentMessage);
|
|
90
90
|
return await (await discordComponentSendPromise)(...args);
|
|
91
91
|
}
|
|
92
92
|
function loadDiscordSharedInteractive() {
|
|
93
|
-
discordSharedInteractivePromise ??= import("./components-
|
|
93
|
+
discordSharedInteractivePromise ??= import("./components-DcLQ2JkV.js").then((n) => n.a);
|
|
94
94
|
return discordSharedInteractivePromise;
|
|
95
95
|
}
|
|
96
96
|
function addPayloadTextFallback(spec, payload) {
|
|
@@ -125,7 +125,7 @@ async function resolveDiscordComponentSpec(payload) {
|
|
|
125
125
|
//#region extensions/discord/src/outbound-send-context.ts
|
|
126
126
|
let discordSendRuntimePromise;
|
|
127
127
|
async function loadDiscordSendRuntime() {
|
|
128
|
-
discordSendRuntimePromise ??= import("./send-
|
|
128
|
+
discordSendRuntimePromise ??= import("./send-BHkA8a-k.js").then((n) => n.t);
|
|
129
129
|
return await discordSendRuntimePromise;
|
|
130
130
|
}
|
|
131
131
|
function resolveDiscordOutboundTarget(params) {
|
|
@@ -167,6 +167,40 @@ async function createDiscordPayloadSendContext(ctx) {
|
|
|
167
167
|
}
|
|
168
168
|
//#endregion
|
|
169
169
|
//#region extensions/discord/src/outbound-payload.ts
|
|
170
|
+
function createDiscordUnknownPayloadResult(target) {
|
|
171
|
+
return {
|
|
172
|
+
messageId: "",
|
|
173
|
+
channelId: target,
|
|
174
|
+
receipt: createDiscordSendReceipt({
|
|
175
|
+
platformMessageIds: [],
|
|
176
|
+
channelId: target,
|
|
177
|
+
kind: "unknown"
|
|
178
|
+
})
|
|
179
|
+
};
|
|
180
|
+
}
|
|
181
|
+
function resolveDiscordDeliveryOptions(ctx, sendContext) {
|
|
182
|
+
return {
|
|
183
|
+
replyTo: sendContext.resolveReplyTo(),
|
|
184
|
+
accountId: ctx.accountId ?? void 0,
|
|
185
|
+
silent: ctx.silent ?? void 0,
|
|
186
|
+
cfg: ctx.cfg
|
|
187
|
+
};
|
|
188
|
+
}
|
|
189
|
+
function resolveDiscordFormattedDeliveryOptions(ctx, sendContext) {
|
|
190
|
+
return {
|
|
191
|
+
...resolveDiscordDeliveryOptions(ctx, sendContext),
|
|
192
|
+
...sendContext.formatting
|
|
193
|
+
};
|
|
194
|
+
}
|
|
195
|
+
function resolveDiscordMediaDeliveryOptions(ctx, sendContext, mediaUrl) {
|
|
196
|
+
return {
|
|
197
|
+
mediaUrl,
|
|
198
|
+
mediaAccess: ctx.mediaAccess,
|
|
199
|
+
mediaLocalRoots: ctx.mediaLocalRoots,
|
|
200
|
+
mediaReadFile: ctx.mediaReadFile,
|
|
201
|
+
...resolveDiscordFormattedDeliveryOptions(ctx, sendContext)
|
|
202
|
+
};
|
|
203
|
+
}
|
|
170
204
|
async function sendDiscordOutboundPayload(params) {
|
|
171
205
|
const ctx = params.ctx;
|
|
172
206
|
const payload = normalizeDiscordApprovalPayload({
|
|
@@ -176,31 +210,14 @@ async function sendDiscordOutboundPayload(params) {
|
|
|
176
210
|
const mediaUrls = resolvePayloadMediaUrls(payload);
|
|
177
211
|
const sendContext = await createDiscordPayloadSendContext(ctx);
|
|
178
212
|
if (payload.audioAsVoice && mediaUrls.length > 0) {
|
|
179
|
-
let lastResult = await sendContext.withRetry(async () => await sendContext.sendVoice(sendContext.target, mediaUrls[0],
|
|
180
|
-
cfg: ctx.cfg,
|
|
181
|
-
replyTo: sendContext.resolveReplyTo(),
|
|
182
|
-
accountId: ctx.accountId ?? void 0,
|
|
183
|
-
silent: ctx.silent ?? void 0
|
|
184
|
-
}));
|
|
213
|
+
let lastResult = await sendContext.withRetry(async () => await sendContext.sendVoice(sendContext.target, mediaUrls[0], resolveDiscordDeliveryOptions(ctx, sendContext)));
|
|
185
214
|
if (payload.text?.trim()) lastResult = await sendContext.withRetry(async () => await sendContext.send(sendContext.target, payload.text, {
|
|
186
215
|
verbose: false,
|
|
187
|
-
|
|
188
|
-
accountId: ctx.accountId ?? void 0,
|
|
189
|
-
silent: ctx.silent ?? void 0,
|
|
190
|
-
cfg: ctx.cfg,
|
|
191
|
-
...sendContext.formatting
|
|
216
|
+
...resolveDiscordFormattedDeliveryOptions(ctx, sendContext)
|
|
192
217
|
}));
|
|
193
218
|
for (const mediaUrl of mediaUrls.slice(1)) lastResult = await sendContext.withRetry(async () => await sendContext.send(sendContext.target, "", {
|
|
194
219
|
verbose: false,
|
|
195
|
-
mediaUrl
|
|
196
|
-
mediaAccess: ctx.mediaAccess,
|
|
197
|
-
mediaLocalRoots: ctx.mediaLocalRoots,
|
|
198
|
-
mediaReadFile: ctx.mediaReadFile,
|
|
199
|
-
replyTo: sendContext.resolveReplyTo(),
|
|
200
|
-
accountId: ctx.accountId ?? void 0,
|
|
201
|
-
silent: ctx.silent ?? void 0,
|
|
202
|
-
cfg: ctx.cfg,
|
|
203
|
-
...sendContext.formatting
|
|
220
|
+
...resolveDiscordMediaDeliveryOptions(ctx, sendContext, mediaUrl)
|
|
204
221
|
}));
|
|
205
222
|
return attachChannelToResult("discord", lastResult);
|
|
206
223
|
}
|
|
@@ -213,40 +230,20 @@ async function sendDiscordOutboundPayload(params) {
|
|
|
213
230
|
if (nativeComponents || embeds?.length || filename) return attachChannelToResult("discord", await sendPayloadMediaSequenceOrFallback({
|
|
214
231
|
text: payload.text ?? "",
|
|
215
232
|
mediaUrls,
|
|
216
|
-
fallbackResult:
|
|
217
|
-
messageId: "",
|
|
218
|
-
channelId: sendContext.target,
|
|
219
|
-
receipt: createDiscordSendReceipt({
|
|
220
|
-
platformMessageIds: [],
|
|
221
|
-
channelId: sendContext.target,
|
|
222
|
-
kind: "unknown"
|
|
223
|
-
})
|
|
224
|
-
},
|
|
233
|
+
fallbackResult: createDiscordUnknownPayloadResult(sendContext.target),
|
|
225
234
|
sendNoMedia: async () => await sendContext.withRetry(async () => await sendContext.send(sendContext.target, payload.text ?? "", {
|
|
226
235
|
verbose: false,
|
|
227
236
|
components: nativeComponents,
|
|
228
237
|
embeds,
|
|
229
238
|
filename,
|
|
230
|
-
|
|
231
|
-
accountId: ctx.accountId ?? void 0,
|
|
232
|
-
silent: ctx.silent ?? void 0,
|
|
233
|
-
cfg: ctx.cfg,
|
|
234
|
-
...sendContext.formatting
|
|
239
|
+
...resolveDiscordFormattedDeliveryOptions(ctx, sendContext)
|
|
235
240
|
})),
|
|
236
241
|
send: async ({ text, mediaUrl, isFirst }) => await sendContext.withRetry(async () => await sendContext.send(sendContext.target, text, {
|
|
237
242
|
verbose: false,
|
|
238
|
-
mediaUrl,
|
|
239
|
-
mediaAccess: ctx.mediaAccess,
|
|
240
|
-
mediaLocalRoots: ctx.mediaLocalRoots,
|
|
241
|
-
mediaReadFile: ctx.mediaReadFile,
|
|
243
|
+
...resolveDiscordMediaDeliveryOptions(ctx, sendContext, mediaUrl),
|
|
242
244
|
components: isFirst ? nativeComponents : void 0,
|
|
243
245
|
embeds: isFirst ? embeds : void 0,
|
|
244
|
-
filename: isFirst ? filename : void 0
|
|
245
|
-
replyTo: sendContext.resolveReplyTo(),
|
|
246
|
-
accountId: ctx.accountId ?? void 0,
|
|
247
|
-
silent: ctx.silent ?? void 0,
|
|
248
|
-
cfg: ctx.cfg,
|
|
249
|
-
...sendContext.formatting
|
|
246
|
+
filename: isFirst ? filename : void 0
|
|
250
247
|
}))
|
|
251
248
|
}));
|
|
252
249
|
return await sendTextMediaPayload({
|
|
@@ -261,45 +258,13 @@ async function sendDiscordOutboundPayload(params) {
|
|
|
261
258
|
return attachChannelToResult("discord", await sendPayloadMediaSequenceOrFallback({
|
|
262
259
|
text: payload.text ?? "",
|
|
263
260
|
mediaUrls,
|
|
264
|
-
fallbackResult:
|
|
265
|
-
|
|
266
|
-
channelId: sendContext.target,
|
|
267
|
-
receipt: createDiscordSendReceipt({
|
|
268
|
-
platformMessageIds: [],
|
|
269
|
-
channelId: sendContext.target,
|
|
270
|
-
kind: "unknown"
|
|
271
|
-
})
|
|
272
|
-
},
|
|
273
|
-
sendNoMedia: async () => await sendContext.withRetry(async () => await sendDiscordComponentMessageLazy(sendContext.target, componentSpec, {
|
|
274
|
-
replyTo: sendContext.resolveReplyTo(),
|
|
275
|
-
accountId: ctx.accountId ?? void 0,
|
|
276
|
-
silent: ctx.silent ?? void 0,
|
|
277
|
-
cfg: ctx.cfg,
|
|
278
|
-
...sendContext.formatting
|
|
279
|
-
})),
|
|
261
|
+
fallbackResult: createDiscordUnknownPayloadResult(sendContext.target),
|
|
262
|
+
sendNoMedia: async () => await sendContext.withRetry(async () => await sendDiscordComponentMessageLazy(sendContext.target, componentSpec, { ...resolveDiscordFormattedDeliveryOptions(ctx, sendContext) })),
|
|
280
263
|
send: async ({ text, mediaUrl, isFirst }) => {
|
|
281
|
-
if (isFirst) return await sendContext.withRetry(async () => await sendDiscordComponentMessageLazy(sendContext.target, componentSpec, {
|
|
282
|
-
mediaUrl,
|
|
283
|
-
mediaAccess: ctx.mediaAccess,
|
|
284
|
-
mediaLocalRoots: ctx.mediaLocalRoots,
|
|
285
|
-
mediaReadFile: ctx.mediaReadFile,
|
|
286
|
-
replyTo: sendContext.resolveReplyTo(),
|
|
287
|
-
accountId: ctx.accountId ?? void 0,
|
|
288
|
-
silent: ctx.silent ?? void 0,
|
|
289
|
-
cfg: ctx.cfg,
|
|
290
|
-
...sendContext.formatting
|
|
291
|
-
}));
|
|
264
|
+
if (isFirst) return await sendContext.withRetry(async () => await sendDiscordComponentMessageLazy(sendContext.target, componentSpec, { ...resolveDiscordMediaDeliveryOptions(ctx, sendContext, mediaUrl) }));
|
|
292
265
|
return await sendContext.withRetry(async () => await sendContext.send(sendContext.target, text, {
|
|
293
266
|
verbose: false,
|
|
294
|
-
mediaUrl
|
|
295
|
-
mediaAccess: ctx.mediaAccess,
|
|
296
|
-
mediaLocalRoots: ctx.mediaLocalRoots,
|
|
297
|
-
mediaReadFile: ctx.mediaReadFile,
|
|
298
|
-
replyTo: sendContext.resolveReplyTo(),
|
|
299
|
-
accountId: ctx.accountId ?? void 0,
|
|
300
|
-
silent: ctx.silent ?? void 0,
|
|
301
|
-
cfg: ctx.cfg,
|
|
302
|
-
...sendContext.formatting
|
|
267
|
+
...resolveDiscordMediaDeliveryOptions(ctx, sendContext, mediaUrl)
|
|
303
268
|
}));
|
|
304
269
|
}
|
|
305
270
|
}));
|
|
@@ -315,7 +280,7 @@ function stripDiscordInternalRuntimeScaffolding(text) {
|
|
|
315
280
|
}
|
|
316
281
|
let discordThreadBindingsPromise;
|
|
317
282
|
function loadDiscordThreadBindings() {
|
|
318
|
-
discordThreadBindingsPromise ??= import("./thread-bindings-
|
|
283
|
+
discordThreadBindingsPromise ??= import("./thread-bindings-CKruJE91.js").then((n) => n.t);
|
|
319
284
|
return discordThreadBindingsPromise;
|
|
320
285
|
}
|
|
321
286
|
function resolveDiscordWebhookIdentity(params) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Wt as __exportAll } from "./send.receipt-
|
|
1
|
+
import { Wt as __exportAll } from "./send.receipt-CjsWpitW.js";
|
|
2
2
|
import { resolveFetch } from "openclaw/plugin-sdk/fetch-runtime";
|
|
3
3
|
//#region extensions/discord/src/pluralkit.ts
|
|
4
4
|
var pluralkit_exports = /* @__PURE__ */ __exportAll({ fetchPluralKitMessageInfo: () => fetchPluralKitMessageInfo });
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { p as normalizeDiscordToken } from "./accounts-
|
|
1
|
+
import { p as normalizeDiscordToken } from "./accounts-P19jm1lf.js";
|
|
2
2
|
import { n as fetchDiscord, t as DiscordApiError } from "./api-BmXlcjYW.js";
|
|
3
3
|
import { resolveFetch } from "openclaw/plugin-sdk/fetch-runtime";
|
|
4
4
|
import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as resolveDiscordPrivilegedIntentsFromFlags, i as probeDiscord, n as fetchDiscordApplicationSummary, r as parseApplicationIdFromToken, t as fetchDiscordApplicationId } from "./probe-
|
|
1
|
+
import { a as resolveDiscordPrivilegedIntentsFromFlags, i as probeDiscord, n as fetchDiscordApplicationSummary, r as parseApplicationIdFromToken, t as fetchDiscordApplicationId } from "./probe-2MdGjUAf.js";
|
|
2
2
|
export { fetchDiscordApplicationId, fetchDiscordApplicationSummary, parseApplicationIdFromToken, probeDiscord, resolveDiscordPrivilegedIntentsFromFlags };
|