@openclaw/discord 2026.8.1-beta.2 → 2026.9.1-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.
Files changed (287) hide show
  1. package/dist/{account-inspect-CqzrH14k.js → account-inspect-BDfKyuvL.js} +1 -1
  2. package/dist/account-inspect-api.js +1 -1
  3. package/dist/{accounts-DJTf1LtA.js → accounts-CfQ-vSyf.js} +34 -1
  4. package/dist/action-runtime-api.js +1 -1
  5. package/dist/{activities-api-DS7vpdtp.js → activities-api-q-9PaaHH.js} +134 -175
  6. package/dist/activities-api.js +1 -1
  7. package/dist/api.js +17 -17
  8. package/dist/{approval-handler.runtime-B6yEV79q.js → approval-handler.runtime-B7qhK3fR.js} +29 -106
  9. package/dist/{audit-Db-rlntl.js → audit-CBEv_ERu.js} +5 -5
  10. package/dist/{channel-CnnbJSt5.js → channel-Dx1tMTfx.js} +72 -50
  11. package/dist/{channel-actions.runtime-CLKrx6tr.js → channel-actions.runtime-CLWWu9nC.js} +28 -43
  12. package/dist/channel-config-api.js +1 -1
  13. package/dist/channel-plugin-api.js +1 -1
  14. package/dist/channel-type-CVLZyGYS.js +7 -0
  15. package/dist/{channel.setup-BFAO-V1P.js → channel.setup-DOzXS2Pk.js} +5 -5
  16. package/dist/{outbound-session-route-DxLkrgKQ.js → components-B9V5o361.js} +8 -70
  17. package/dist/{config-schema-BgEskFAs.js → config-schema-BR13IAx6.js} +33 -7
  18. package/dist/conversation-binding-route-DJYrY2TQ.js +43 -0
  19. package/dist/{directory-config-BVX7Cflc.js → directory-config-BK6eqekJ.js} +2 -2
  20. package/dist/directory-contract-api.js +1 -1
  21. package/dist/{directory-live-DGIGxpIo.js → directory-live-DSAJSrJk.js} +3 -3
  22. package/dist/{doctor-BzC-TLnB.js → doctor-Cm7Y1pJ2.js} +33 -12
  23. package/dist/doctor-contract-api.js +2 -2
  24. package/dist/{handle-action.guild-admin-BNVTUISF.js → handle-action.guild-admin-BdwCRHmm.js} +9 -5
  25. package/dist/index.js +3 -4
  26. package/dist/{message-handler-Unk_f10F.js → message-handler-BXpWZyni.js} +82 -6
  27. package/dist/{message-handler.preflight-C9zecxR9.js → message-handler.preflight-Ba5LAY_X.js} +38 -50
  28. package/dist/{message-handler.process-DWQ6UHHu.js → message-handler.process-3HEzmemS.js} +204 -234
  29. package/dist/{message-utils-BSCPVgy0.js → message-text-aiwO5R2F.js} +41 -40
  30. package/dist/{outbound-adapter-D9nRivT1.js → outbound-adapter-BE4jSq2d.js} +113 -88
  31. package/dist/{outbound-components-cTzwBJ60.js → outbound-components-oLpg8Qzb.js} +3 -3
  32. package/dist/outbound-session-route-Cg15ZFJd.js +625 -0
  33. package/dist/owner-access-UlYi9t0M.js +107 -0
  34. package/dist/{pluralkit-DdiJ9KMK.js → pluralkit-Tiyl70dx.js} +1 -1
  35. package/dist/{probe-Bl-k5_Ku.js → probe-n6ZXxK8V.js} +1 -1
  36. package/dist/{probe.runtime-M9fREKvp.js → probe.runtime-CN4bdPfZ.js} +1 -1
  37. package/dist/{provider-DvSNb-2v.js → provider-B11xwilq.js} +720 -1325
  38. package/dist/{provider-session.runtime-BUEqD0rA.js → provider-session.runtime-B9xe-Qaf.js} +3 -3
  39. package/dist/provider.runtime-DiYaHvOz.js +2 -0
  40. package/dist/{realtime-session.runtime-C7wen-aF.js → realtime-session.runtime-CU8IQUS-.js} +97 -98
  41. package/dist/{resolve-allowlist-common-D04lpEzb.js → resolve-allowlist-common-BLoYaxEG.js} +2 -2
  42. package/dist/{resolve-channels-Dm7jEeg6.js → resolve-channels-C2sT_n67.js} +5 -4
  43. package/dist/{resolve-users-bktrCUUU.js → resolve-users-CzpjLwjy.js} +2 -2
  44. package/dist/{retry-CLpJcXXf.js → retry-Cv4jCU5Z.js} +111 -18
  45. package/dist/{runtime-DGsSyDTS.js → runtime-BHrTlFkf.js} +88 -85
  46. package/dist/{runtime-DoHjckYm.js → runtime-CY4PRMF-.js} +9 -10
  47. package/dist/runtime-api.js +19 -25
  48. package/dist/{sdk-runtime-QpY8PvCh.js → sdk-runtime-4geQHtXc.js} +57 -89
  49. package/dist/{secret-config-contract-B1akrlyY.js → secret-config-contract-B3i6WxV5.js} +53 -25
  50. package/dist/secret-contract-api.js +1 -1
  51. package/dist/security-audit-contract-api.js +1 -1
  52. package/dist/{security-audit.runtime-CPN0xFYz.js → security-audit.runtime-BVKF9VtY.js} +1 -1
  53. package/dist/{send-B7Q6Oc1I.js → send-C49MFF9j.js} +82 -19
  54. package/dist/{send.components-iJyFXw9L.js → send.components-DKKAw5VX.js} +21 -38
  55. package/dist/{send.outbound-DS5tHwfR.js → send.outbound-zam0TrZx.js} +77 -78
  56. package/dist/{send.shared-BmwFjW6T.js → send.shared-JjljcV4O.js} +135 -120
  57. package/dist/{sender-identity-QtalnCYv.js → sender-identity-BJtfyise.js} +1 -1
  58. package/dist/setup-plugin-api.js +1 -1
  59. package/dist/{shared-BIXIX6uJ.js → shared-_5EcP4jW.js} +38 -14
  60. package/dist/subagent-hooks-DQzvOptn.js +49 -0
  61. package/dist/subagent-hooks-api.js +1 -6
  62. package/dist/{system-events-CTqDf6_s.js → system-events-C7yxaHWP.js} +2 -2
  63. package/dist/{target-resolver-maOKSqO0.js → target-resolver-vxIh6O3-.js} +3 -3
  64. package/dist/targets-CtTKvntJ.js +3 -0
  65. package/dist/{thread-bindings-3L8p82GV.js → thread-bindings-DW5F9vat.js} +28 -26
  66. package/dist/{thread-bindings.manager-DCIH6WDC.js → thread-bindings.manager-ByOtwjo_.js} +9 -12
  67. package/dist/{thread-bindings.session-updates-bJ2KQFY6.js → thread-bindings.session-updates-CJb-BpPL.js} +1 -1
  68. package/dist/{thread-bindings.state-aeV8HNgV.js → thread-bindings.state-D8OMdk4O.js} +1 -1
  69. package/dist/threading-agH1T_6s.js +478 -0
  70. package/dist/transcripts-source-BR11iHA4.js +265 -0
  71. package/dist/transcripts-source-api.js +7 -2
  72. package/dist/{typing-CS-nNVoe.js → typing-Dc_YMY2e.js} +1 -1
  73. package/dist/{voice-runtime-BEdqNcST.js → voice-runtime-DIeaa8fJ.js} +230 -148
  74. package/node_modules/@discord/embedded-app-sdk/node_modules/uuid/README.md +19 -19
  75. package/node_modules/@discord/embedded-app-sdk/node_modules/uuid/dist/v1.js +7 -3
  76. package/node_modules/@discord/embedded-app-sdk/node_modules/uuid/dist/v7.js +5 -2
  77. package/node_modules/@discord/embedded-app-sdk/node_modules/uuid/dist-node/v1.js +7 -3
  78. package/node_modules/@discord/embedded-app-sdk/node_modules/uuid/dist-node/v7.js +5 -2
  79. package/node_modules/@discord/embedded-app-sdk/node_modules/uuid/package.json +4 -3
  80. package/node_modules/@discordjs/voice/node_modules/@types/node/README.md +1 -1
  81. package/node_modules/@discordjs/voice/node_modules/@types/node/child_process.d.ts +0 -1
  82. package/node_modules/@discordjs/voice/node_modules/@types/node/crypto.d.ts +6 -6
  83. package/node_modules/@discordjs/voice/node_modules/@types/node/dns/promises.d.ts +5 -5
  84. package/node_modules/@discordjs/voice/node_modules/@types/node/dns.d.ts +5 -5
  85. package/node_modules/@discordjs/voice/node_modules/@types/node/fs.d.ts +7 -0
  86. package/node_modules/@discordjs/voice/node_modules/@types/node/http.d.ts +30 -0
  87. package/node_modules/@discordjs/voice/node_modules/@types/node/http2.d.ts +4 -4
  88. package/node_modules/@discordjs/voice/node_modules/@types/node/os.d.ts +30 -30
  89. package/node_modules/@discordjs/voice/node_modules/@types/node/package.json +2 -2
  90. package/node_modules/@discordjs/voice/node_modules/@types/node/perf_hooks.d.ts +2 -1
  91. package/node_modules/@discordjs/voice/node_modules/@types/node/process.d.ts +42 -43
  92. package/node_modules/@discordjs/voice/node_modules/@types/node/quic.d.ts +1049 -84
  93. package/node_modules/@discordjs/voice/node_modules/@types/node/sqlite.d.ts +14 -1
  94. package/node_modules/@discordjs/voice/node_modules/@types/node/stream/iter.d.ts +3 -2
  95. package/node_modules/@discordjs/voice/node_modules/@types/node/test.d.ts +61 -0
  96. package/node_modules/@discordjs/voice/node_modules/@types/node/v8.d.ts +20 -23
  97. package/node_modules/discord-api-types/CHANGELOG.md +8 -0
  98. package/node_modules/discord-api-types/package.json +4 -4
  99. package/node_modules/discord-api-types/payloads/v10/channel.d.ts +2 -2
  100. package/node_modules/discord-api-types/payloads/v10/channel.d.ts.map +1 -1
  101. package/node_modules/discord-api-types/payloads/v10/gateway.d.ts +4 -0
  102. package/node_modules/discord-api-types/payloads/v10/gateway.d.ts.map +1 -1
  103. package/node_modules/discord-api-types/payloads/v10/gateway.js.map +1 -1
  104. package/node_modules/discord-api-types/payloads/v10/message.d.ts +4 -1
  105. package/node_modules/discord-api-types/payloads/v10/message.d.ts.map +1 -1
  106. package/node_modules/discord-api-types/payloads/v10/message.js +1 -0
  107. package/node_modules/discord-api-types/payloads/v10/message.js.map +1 -1
  108. package/node_modules/discord-api-types/payloads/v9/channel.d.ts +2 -2
  109. package/node_modules/discord-api-types/payloads/v9/channel.d.ts.map +1 -1
  110. package/node_modules/discord-api-types/payloads/v9/gateway.d.ts +4 -0
  111. package/node_modules/discord-api-types/payloads/v9/gateway.d.ts.map +1 -1
  112. package/node_modules/discord-api-types/payloads/v9/gateway.js.map +1 -1
  113. package/node_modules/discord-api-types/payloads/v9/message.d.ts +4 -1
  114. package/node_modules/discord-api-types/payloads/v9/message.d.ts.map +1 -1
  115. package/node_modules/discord-api-types/payloads/v9/message.js +1 -0
  116. package/node_modules/discord-api-types/payloads/v9/message.js.map +1 -1
  117. package/node_modules/typebox/build/format/date.d.mts +1 -1
  118. package/node_modules/typebox/build/format/date.mjs +1 -1
  119. package/node_modules/typebox/build/format/date_time.d.mts +2 -2
  120. package/node_modules/typebox/build/format/date_time.mjs +3 -3
  121. package/node_modules/typebox/build/format/email.d.mts +1 -1
  122. package/node_modules/typebox/build/format/email.mjs +2 -2
  123. package/node_modules/typebox/build/format/hostname.mjs +2 -10
  124. package/node_modules/typebox/build/format/idn_email.d.mts +1 -1
  125. package/node_modules/typebox/build/format/idn_email.mjs +3 -3
  126. package/node_modules/typebox/build/format/idn_hostname.d.mts +1 -0
  127. package/node_modules/typebox/build/format/idn_hostname.mjs +3 -11
  128. package/node_modules/typebox/build/format/idna/format/bidi.d.mts +3 -0
  129. package/node_modules/typebox/build/format/idna/format/bidi.mjs +98 -0
  130. package/node_modules/typebox/build/format/idna/format/puny.d.mts +3 -0
  131. package/node_modules/typebox/build/format/idna/format/puny.mjs +144 -0
  132. package/node_modules/typebox/build/format/idna/hostname.d.mts +1 -0
  133. package/node_modules/typebox/build/format/idna/hostname.mjs +16 -0
  134. package/node_modules/typebox/build/format/idna/idn-hostname.d.mts +1 -0
  135. package/node_modules/typebox/build/format/idna/idn-hostname.mjs +23 -0
  136. package/node_modules/typebox/build/format/idna/index.d.mts +2 -0
  137. package/node_modules/typebox/build/format/idna/index.mjs +2 -0
  138. package/node_modules/typebox/build/format/idna/label/ascii.d.mts +1 -0
  139. package/node_modules/typebox/build/format/idna/label/ascii.mjs +9 -0
  140. package/node_modules/typebox/build/format/idna/label/puny.d.mts +1 -0
  141. package/node_modules/typebox/build/format/idna/label/puny.mjs +28 -0
  142. package/node_modules/typebox/build/format/idna/label/unicode.d.mts +1 -0
  143. package/node_modules/typebox/build/format/idna/label/unicode.mjs +106 -0
  144. package/node_modules/typebox/build/format/idna/pattern/pattern.d.mts +30 -0
  145. package/node_modules/typebox/build/format/idna/pattern/pattern.mjs +70 -0
  146. package/node_modules/typebox/build/format/ipv4.d.mts +0 -1
  147. package/node_modules/typebox/build/format/ipv4.mjs +2 -32
  148. package/node_modules/typebox/build/format/ipv6.mjs +2 -61
  149. package/node_modules/typebox/build/format/iri.d.mts +2 -2
  150. package/node_modules/typebox/build/format/iri.mjs +26 -8
  151. package/node_modules/typebox/build/format/iri_reference.d.mts +2 -2
  152. package/node_modules/typebox/build/format/iri_reference.mjs +9 -55
  153. package/node_modules/typebox/build/format/regex.d.mts +1 -2
  154. package/node_modules/typebox/build/format/regex.mjs +2 -6
  155. package/node_modules/typebox/build/format/time.d.mts +2 -2
  156. package/node_modules/typebox/build/format/time.mjs +19 -14
  157. package/node_modules/typebox/build/format/uri.d.mts +1 -1
  158. package/node_modules/typebox/build/format/uri.mjs +3 -130
  159. package/node_modules/typebox/build/format/uri_reference.d.mts +1 -1
  160. package/node_modules/typebox/build/format/uri_reference.mjs +2 -3
  161. package/node_modules/typebox/build/format/uri_template.d.mts +2 -3
  162. package/node_modules/typebox/build/format/uri_template.mjs +4 -5
  163. package/node_modules/typebox/build/format/url.d.mts +3 -3
  164. package/node_modules/typebox/build/format/url.mjs +4 -5
  165. package/node_modules/typebox/build/guard/emit.d.mts +3 -1
  166. package/node_modules/typebox/build/guard/emit.mjs +12 -5
  167. package/node_modules/typebox/build/guard/guard.d.mts +8 -2
  168. package/node_modules/typebox/build/guard/guard.mjs +25 -4
  169. package/node_modules/typebox/build/guard/string.d.mts +2 -2
  170. package/node_modules/typebox/build/guard/string.mjs +7 -7
  171. package/node_modules/typebox/build/schema/engine/_context.mjs +3 -3
  172. package/node_modules/typebox/build/schema/engine/_functions.mjs +1 -2
  173. package/node_modules/typebox/build/schema/engine/_regexp.d.mts +2 -0
  174. package/node_modules/typebox/build/schema/engine/_regexp.mjs +4 -0
  175. package/node_modules/typebox/build/schema/engine/_stack.mjs +12 -13
  176. package/node_modules/typebox/build/schema/engine/additionalItems.mjs +17 -7
  177. package/node_modules/typebox/build/schema/engine/additionalProperties.mjs +4 -3
  178. package/node_modules/typebox/build/schema/engine/contains.mjs +18 -6
  179. package/node_modules/typebox/build/schema/engine/enum.mjs +1 -1
  180. package/node_modules/typebox/build/schema/engine/items.mjs +26 -6
  181. package/node_modules/typebox/build/schema/engine/maxContains.mjs +3 -3
  182. package/node_modules/typebox/build/schema/engine/minContains.mjs +14 -4
  183. package/node_modules/typebox/build/schema/engine/not.mjs +4 -2
  184. package/node_modules/typebox/build/schema/engine/oneOf.mjs +7 -6
  185. package/node_modules/typebox/build/schema/engine/pattern.mjs +3 -2
  186. package/node_modules/typebox/build/schema/engine/patternProperties.mjs +4 -3
  187. package/node_modules/typebox/build/schema/engine/ref.mjs +1 -7
  188. package/node_modules/typebox/build/schema/engine/schema.mjs +13 -4
  189. package/node_modules/typebox/build/schema/engine/type.mjs +1 -1
  190. package/node_modules/typebox/build/schema/resolve/resolve.d.mts +4 -1
  191. package/node_modules/typebox/build/schema/resolve/resolve.mjs +202 -1
  192. package/node_modules/typebox/build/schema/static/propertyNames.d.mts +5 -0
  193. package/node_modules/typebox/build/schema/static/propertyNames.mjs +3 -0
  194. package/node_modules/typebox/build/schema/static/schema.d.mts +3 -0
  195. package/node_modules/typebox/build/schema/types/index.d.mts +0 -2
  196. package/node_modules/typebox/build/schema/types/index.mjs +0 -2
  197. package/node_modules/typebox/build/system/memory/clone.mjs +14 -11
  198. package/node_modules/typebox/build/system/memory/discard.mjs +6 -5
  199. package/node_modules/typebox/build/system/settings/settings.d.mts +9 -0
  200. package/node_modules/typebox/build/system/settings/settings.mjs +2 -0
  201. package/node_modules/typebox/build/type/engine/call/distribute_arguments.d.mts +6 -1
  202. package/node_modules/typebox/build/type/engine/call/distribute_arguments.mjs +16 -3
  203. package/node_modules/typebox/build/type/engine/call/instantiate.mjs +34 -4
  204. package/node_modules/typebox/build/type/engine/evaluate/broaden.d.mts +5 -5
  205. package/node_modules/typebox/build/type/engine/evaluate/broaden.mjs +20 -26
  206. package/node_modules/typebox/build/type/engine/evaluate/compare.d.mts +6 -10
  207. package/node_modules/typebox/build/type/engine/evaluate/compare.mjs +9 -13
  208. package/node_modules/typebox/build/type/engine/evaluate/composite.d.mts +7 -4
  209. package/node_modules/typebox/build/type/engine/evaluate/composite.mjs +12 -19
  210. package/node_modules/typebox/build/type/engine/evaluate/distribute.d.mts +4 -20
  211. package/node_modules/typebox/build/type/engine/evaluate/distribute.mjs +8 -20
  212. package/node_modules/typebox/build/type/engine/evaluate/evaluate.d.mts +4 -4
  213. package/node_modules/typebox/build/type/engine/evaluate/evaluate.mjs +11 -8
  214. package/node_modules/typebox/build/type/engine/evaluate/flatten.d.mts +1 -1
  215. package/node_modules/typebox/build/type/engine/evaluate/flatten.mjs +3 -4
  216. package/node_modules/typebox/build/type/engine/evaluate/narrow.d.mts +17 -2
  217. package/node_modules/typebox/build/type/engine/evaluate/narrow.mjs +26 -6
  218. package/node_modules/typebox/build/type/engine/exclude/operation.mjs +3 -4
  219. package/node_modules/typebox/build/type/engine/extract/operation.d.mts +1 -1
  220. package/node_modules/typebox/build/type/engine/extract/operation.mjs +3 -4
  221. package/node_modules/typebox/build/type/engine/priority/priority.d.mts +2 -2
  222. package/node_modules/typebox/build/type/engine/priority/priority.mjs +3 -4
  223. package/node_modules/typebox/build/type/script/mapping.d.mts +32 -29
  224. package/node_modules/typebox/build/type/script/mapping.mjs +18 -25
  225. package/node_modules/typebox/build/type/script/parser.d.mts +19 -25
  226. package/node_modules/typebox/build/type/script/parser.mjs +27 -23
  227. package/node_modules/typebox/build/value/errors/errors.d.mts +2 -2
  228. package/node_modules/typebox/build/value/errors/errors.mjs +1 -1
  229. package/node_modules/typebox/package.json +27 -27
  230. package/node_modules/typebox/readme.md +79 -82
  231. package/node_modules/undici/docs/docs/api/Client.md +21 -8
  232. package/node_modules/undici/lib/api/readable.js +33 -43
  233. package/node_modules/undici/lib/core/connect.js +16 -2
  234. package/node_modules/undici/lib/core/symbols.js +1 -0
  235. package/node_modules/undici/lib/dispatcher/client-h1.js +3 -3
  236. package/node_modules/undici/lib/dispatcher/client-h2.js +179 -10
  237. package/node_modules/undici/lib/dispatcher/client.js +74 -29
  238. package/node_modules/undici/lib/dispatcher/env-http-proxy-agent.js +28 -6
  239. package/node_modules/undici/lib/dispatcher/socks5-proxy-agent.js +15 -1
  240. package/node_modules/undici/lib/handler/retry-handler.js +7 -2
  241. package/node_modules/undici/lib/interceptor/cache.js +5 -2
  242. package/node_modules/undici/lib/interceptor/deduplicate.js +1 -1
  243. package/node_modules/undici/lib/mock/mock-utils.js +213 -24
  244. package/node_modules/undici/lib/util/cache.js +2 -4
  245. package/node_modules/undici/lib/web/websocket/websocket.js +22 -0
  246. package/node_modules/undici/package.json +1 -1
  247. package/node_modules/undici/types/client.d.ts +40 -0
  248. package/node_modules/ws/lib/permessage-deflate.js +3 -1
  249. package/node_modules/ws/package.json +1 -1
  250. package/openclaw.plugin.json +12 -6
  251. package/package.json +8 -10
  252. package/dist/approval-message-safety-AcIxvrf3.js +0 -140
  253. package/dist/audit-core-xwjIczO0.js +0 -105
  254. package/dist/channel-actions-5s_hjYKd.js +0 -208
  255. package/dist/channel-api-CAJ0wMoV.js +0 -21
  256. package/dist/inbound-event-delivery-De2qxTrP.js +0 -39
  257. package/dist/provider.runtime-C9PnJZbZ.js +0 -2
  258. package/dist/runtime-api.actions.js +0 -3
  259. package/dist/runtime-api.lookup.js +0 -7
  260. package/dist/runtime-api.monitor-CHxrFPnW.js +0 -5
  261. package/dist/runtime-api.monitor.js +0 -8
  262. package/dist/runtime-api.send.js +0 -7
  263. package/dist/runtime-api.threads.js +0 -5
  264. package/dist/send.reactions-BAn0iiVQ.js +0 -78
  265. package/dist/send.receipt-IPI1p-SP.js +0 -66
  266. package/dist/subagent-hooks-CTt5KCJr.js +0 -120
  267. package/dist/subagent-progress-DhaE_h8a.js +0 -109
  268. package/dist/targets-yUFTHoAx.js +0 -3
  269. package/dist/transcripts-source-CfFMexGt.js +0 -123
  270. package/node_modules/p-map/index.d.ts +0 -155
  271. package/node_modules/p-map/index.js +0 -285
  272. package/node_modules/p-map/license +0 -9
  273. package/node_modules/p-map/package.json +0 -57
  274. package/node_modules/p-map/readme.md +0 -190
  275. package/node_modules/typebox/build/format/_idna.d.mts +0 -2
  276. package/node_modules/typebox/build/format/_idna.mjs +0 -246
  277. package/node_modules/typebox/build/format/_puny.d.mts +0 -1
  278. package/node_modules/typebox/build/format/_puny.mjs +0 -77
  279. package/node_modules/typebox/build/schema/resolve/ref.d.mts +0 -3
  280. package/node_modules/typebox/build/schema/resolve/ref.mjs +0 -146
  281. package/node_modules/typebox/build/schema/types/contentEncoding.d.mts +0 -9
  282. package/node_modules/typebox/build/schema/types/contentEncoding.mjs +0 -13
  283. package/node_modules/typebox/build/schema/types/contentMediaType.d.mts +0 -9
  284. package/node_modules/typebox/build/schema/types/contentMediaType.mjs +0 -13
  285. package/dist/{allow-list-DnxIlPP2.js → allow-list-BDMimASD.js} +1 -1
  286. package/dist/{doctor-contract-DLa-BTiU.js → doctor-contract-DsWvKIXF.js} +1 -1
  287. package/dist/{security-audit-jGnJF__m.js → security-audit-BfJhAXZp.js} +1 -1
@@ -2,22 +2,24 @@ import { t as parseDiscordRetryAfterBodySeconds } from "./retry-after-DdLPmPoa.j
2
2
  import "node:module";
3
3
  import { redactIdentifier, redactSensitiveFieldValue } from "openclaw/plugin-sdk/logging-core";
4
4
  import { ApplicationCommandOptionType, ApplicationCommandType, ButtonStyle, ComponentType, GatewayDispatchEvents, InteractionContextType, InteractionResponseType, InteractionType, MessageFlags, Routes, TextInputStyle } from "discord-api-types/v10";
5
+ import { Type } from "typebox";
6
+ import { Check } from "typebox/value";
5
7
  import { createHash } from "node:crypto";
6
8
  import { asDateTimestampMs, clampTimerTimeoutMs, parseStrictNonNegativeInteger, resolveExpiresAtMsFromDurationMs, resolveIntegerOption, resolveTimerTimeoutMs } from "openclaw/plugin-sdk/number-runtime";
7
9
  import { expectDefined } from "openclaw/plugin-sdk/expect-runtime";
8
- import { Type } from "typebox";
9
- import { Check } from "typebox/value";
10
10
  import { inspect } from "node:util";
11
11
  import { gunzipSync } from "node:zlib";
12
12
  import { readResponseWithLimit } from "openclaw/plugin-sdk/response-limit-runtime";
13
13
  import { collectErrorGraphCandidates, extractErrorCode, formatErrorMessage, readErrorName } from "openclaw/plugin-sdk/error-runtime";
14
14
  import { classifyTransientNetworkErrorCode, createChannelApiRetryRunner, parseRetryAfterHeaderSeconds, resolveRetryConfig, retryAsync } from "openclaw/plugin-sdk/retry-runtime";
15
- import { sleepWithAbort } from "openclaw/plugin-sdk/runtime-env";
16
15
  import { buildMessagingTarget, parseMentionPrefixOrAtUserTarget, requireTargetKind } from "openclaw/plugin-sdk/channel-targets";
16
+ import { sleepWithAbort } from "openclaw/plugin-sdk/runtime-env";
17
17
  import { resolveAllowlistMatchByCandidates } from "openclaw/plugin-sdk/allow-from";
18
18
  import { chunkMarkdownTextWithMode } from "openclaw/plugin-sdk/reply-chunking";
19
19
  import { chunkTextForOutbound } from "openclaw/plugin-sdk/text-chunking";
20
20
  import { isSingleUseReplyToMode } from "openclaw/plugin-sdk/reply-reference";
21
+ import { createMessageReceiptFromOutboundResults } from "openclaw/plugin-sdk/channel-outbound";
22
+ import { attachChannelToResults } from "openclaw/plugin-sdk/channel-send-result";
21
23
  //#region \0rolldown/runtime.js
22
24
  var __defProp = Object.defineProperty;
23
25
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -65,6 +67,11 @@ async function overwriteGuildApplicationCommands(rest, clientId, guildId, body)
65
67
  }
66
68
  //#endregion
67
69
  //#region extensions/discord/src/internal/api.guild.ts
70
+ const discordGuildEmojiListSchema = Type.Array(Type.Object({
71
+ id: Type.Union([Type.String(), Type.Null()]),
72
+ name: Type.Union([Type.String(), Type.Null()]),
73
+ animated: Type.Optional(Type.Boolean())
74
+ }, { additionalProperties: true }));
68
75
  async function getGuild(rest, guildId) {
69
76
  return await rest.get(Routes.guild(guildId));
70
77
  }
@@ -117,7 +124,9 @@ async function createGuildBan(rest, guildId, userId, data) {
117
124
  await rest.put(Routes.guildBan(guildId, userId), data);
118
125
  }
119
126
  async function listGuildEmojis(rest, guildId) {
120
- return await rest.get(Routes.guildEmojis(guildId));
127
+ const emojis = await rest.get(Routes.guildEmojis(guildId));
128
+ if (!Check(discordGuildEmojiListSchema, emojis)) throw new Error("Invalid Discord guild emoji response.");
129
+ return emojis;
121
130
  }
122
131
  async function createGuildEmoji(rest, guildId, data) {
123
132
  return await rest.post(Routes.guildEmojis(guildId), data);
@@ -810,15 +819,12 @@ var Embed = class {
810
819
  };
811
820
  //#endregion
812
821
  //#region extensions/discord/src/internal/payload.ts
813
- function serializeAnyComponent(component) {
814
- return component.serialize();
815
- }
816
- function payloadHasV2Components(payload) {
817
- return Boolean(payload.components?.some((component) => component.isV2));
822
+ function hasDiscordV2Components(components) {
823
+ return Boolean(components?.some((component) => "isV2" in component && component.isV2 || "type" in component && component.type !== ComponentType.ActionRow));
818
824
  }
819
825
  function normalizePayloadFlags(payload) {
820
826
  const flags = payload.ephemeral ? (payload.flags ?? 0) | MessageFlags.Ephemeral : payload.flags;
821
- if (!payloadHasV2Components(payload)) return flags;
827
+ if (!hasDiscordV2Components(payload.components)) return flags;
822
828
  if (payload.content || payload.embeds?.length) throw new Error("Discord Components V2 payloads cannot include content or embeds");
823
829
  return (flags ?? 0) | MessageFlags.IsComponentsV2;
824
830
  }
@@ -828,7 +834,7 @@ function serializePayload(payload) {
828
834
  return stripUndefinedFields({
829
835
  content: payload.content,
830
836
  embeds: payload.embeds?.map((entry) => "serialize" in entry ? entry.serialize() : entry),
831
- components: payload.components?.map((entry) => serializeAnyComponent(entry)),
837
+ components: payload.components?.map((entry) => "serialize" in entry ? entry.serialize() : entry),
832
838
  allowed_mentions: payload.allowed_mentions ?? payload.allowedMentions,
833
839
  flags,
834
840
  tts: payload.tts,
@@ -993,6 +999,12 @@ var Guild = class extends Base {
993
999
  get name() {
994
1000
  return this.rawDataValue?.name ?? "";
995
1001
  }
1002
+ get icon() {
1003
+ return this.rawDataValue?.icon;
1004
+ }
1005
+ get iconUrl() {
1006
+ return this.icon ? `https://cdn.discordapp.com/icons/${this.id}/${this.icon}.png` : null;
1007
+ }
996
1008
  };
997
1009
  var GuildMember = class extends Base {
998
1010
  constructor(client, rawData) {
@@ -1163,6 +1175,9 @@ var DiscordEntityCache = class {
1163
1175
  return new GuildMember(this.params.client, raw);
1164
1176
  });
1165
1177
  }
1178
+ async fetchGuildEmojis(guildId, fetcher) {
1179
+ return await this.fetchCached(`guild-emojis:${guildId}`, fetcher);
1180
+ }
1166
1181
  invalidateForGatewayEvent(type, data) {
1167
1182
  const raw = data && typeof data === "object" ? data : {};
1168
1183
  const channelUpdate = GatewayDispatchEvents.ChannelUpdate;
@@ -1170,11 +1185,13 @@ var DiscordEntityCache = class {
1170
1185
  const threadUpdate = GatewayDispatchEvents.ThreadUpdate;
1171
1186
  const threadDelete = GatewayDispatchEvents.ThreadDelete;
1172
1187
  const guildUpdate = GatewayDispatchEvents.GuildUpdate;
1188
+ const guildEmojisUpdate = GatewayDispatchEvents.GuildEmojisUpdate;
1173
1189
  const guildMemberAdd = GatewayDispatchEvents.GuildMemberAdd;
1174
1190
  const guildMemberRemove = GatewayDispatchEvents.GuildMemberRemove;
1175
1191
  const guildMemberUpdate = GatewayDispatchEvents.GuildMemberUpdate;
1176
1192
  if (type === channelUpdate || type === channelDelete || type === threadUpdate || type === threadDelete) this.deleteId("channel", raw.id);
1177
1193
  if (type === guildUpdate) this.deleteId("guild", raw.id);
1194
+ if (type === guildEmojisUpdate) this.deleteId("guild-emojis", raw.guild_id);
1178
1195
  if (type === guildMemberAdd || type === guildMemberRemove || type === guildMemberUpdate) {
1179
1196
  const guildId = raw.guild_id;
1180
1197
  const user = raw.user && typeof raw.user === "object" ? raw.user : {};
@@ -1381,12 +1398,9 @@ function findCommandOption(options, name) {
1381
1398
  if (!name) return;
1382
1399
  return options?.find((option) => option.name === name);
1383
1400
  }
1384
- function hasCommandOptions(command) {
1385
- return "options" in command;
1386
- }
1387
1401
  function resolveFocusedCommandOptionAutocompleteHandler(command, interaction) {
1388
1402
  const focusedName = interaction.options.getFocused()?.name;
1389
- const autocomplete = findCommandOption("subcommands" in command && Array.isArray(command.subcommands) ? findSelectedSubcommand(command.subcommands, interaction)?.options : hasCommandOptions(command) ? command.options : void 0, focusedName)?.autocomplete;
1403
+ const autocomplete = findCommandOption(command.commandKind === "group" ? findSelectedSubcommand(command.subcommands, interaction)?.options : command.options, focusedName)?.autocomplete;
1390
1404
  return typeof autocomplete === "function" ? autocomplete : void 0;
1391
1405
  }
1392
1406
  var BaseCommand = class {
@@ -1417,6 +1431,7 @@ var BaseCommand = class {
1417
1431
  var Command = class extends BaseCommand {
1418
1432
  constructor(..._args) {
1419
1433
  super(..._args);
1434
+ this.commandKind = "leaf";
1420
1435
  this.type = ApplicationCommandType.ChatInput;
1421
1436
  }
1422
1437
  async autocomplete(interaction) {
@@ -1438,6 +1453,7 @@ var Command = class extends BaseCommand {
1438
1453
  var CommandWithSubcommands = class extends BaseCommand {
1439
1454
  constructor(..._args2) {
1440
1455
  super(..._args2);
1456
+ this.commandKind = "group";
1441
1457
  this.type = ApplicationCommandType.ChatInput;
1442
1458
  }
1443
1459
  async run(interaction) {
@@ -1825,12 +1841,12 @@ async function dispatchInteraction(client, rawData) {
1825
1841
  await optionAutocomplete(autocompleteInteraction);
1826
1842
  return;
1827
1843
  }
1828
- if ("autocomplete" in command) await command.autocomplete(autocompleteInteraction);
1844
+ if (command.commandKind === "leaf") await command.autocomplete(autocompleteInteraction);
1829
1845
  return;
1830
1846
  }
1831
1847
  if (rawData.type === InteractionType.ApplicationCommand) {
1832
1848
  const command = client.commands.find((entry) => entry.name === readInteractionName(rawData));
1833
- if (command && "run" in command) {
1849
+ if (command) {
1834
1850
  await deferCommandInteractionIfNeeded(command, interaction);
1835
1851
  await command.run(interaction);
1836
1852
  }
@@ -2772,6 +2788,9 @@ var Client = class {
2772
2788
  async fetchMember(guildId, userId) {
2773
2789
  return await this.entityCache.fetchMember(guildId, userId);
2774
2790
  }
2791
+ async fetchGuildEmojis(guildId, fetcher) {
2792
+ return await this.entityCache.fetchGuildEmojis(guildId, fetcher);
2793
+ }
2775
2794
  async deployCommands(options = {}) {
2776
2795
  return await this.commandDeployer.deploy(options);
2777
2796
  }
@@ -2965,6 +2984,7 @@ var discord_exports = /* @__PURE__ */ __exportAll({
2965
2984
  getThreadMember: () => getThreadMember,
2966
2985
  getUser: () => getUser,
2967
2986
  getWebhookMessage: () => getWebhookMessage,
2987
+ hasDiscordV2Components: () => hasDiscordV2Components,
2968
2988
  isUnknownDiscordVoiceStateError: () => isUnknownDiscordVoiceStateError,
2969
2989
  listApplicationCommands: () => listApplicationCommands,
2970
2990
  listChannelArchivedThreads: () => listChannelArchivedThreads,
@@ -3125,6 +3145,79 @@ function resolveDiscordReplyMessageId(reply, isFirst) {
3125
3145
  return reply && (isFirst || reply.scope === "all") ? reply.messageId : void 0;
3126
3146
  }
3127
3147
  //#endregion
3148
+ //#region extensions/discord/src/send.receipt.ts
3149
+ function toDiscordOutboundDeliveryResult(result) {
3150
+ const { channelId, ...delivery } = result;
3151
+ return {
3152
+ ...delivery,
3153
+ target: {
3154
+ kind: "channel",
3155
+ id: channelId
3156
+ }
3157
+ };
3158
+ }
3159
+ function createDiscordSendReceiptFromResults(params) {
3160
+ const receipt = createMessageReceiptFromOutboundResults({
3161
+ results: attachChannelToResults("discord", params.results),
3162
+ threadId: params.threadId
3163
+ });
3164
+ return {
3165
+ ...receipt,
3166
+ parts: receipt.parts.map(({ platformMessageId, kind, threadId, replyToId, raw }, index) => ({
3167
+ platformMessageId,
3168
+ kind,
3169
+ index,
3170
+ threadId,
3171
+ replyToId,
3172
+ raw
3173
+ }))
3174
+ };
3175
+ }
3176
+ function createDiscordSendReceipt(params) {
3177
+ return createMessageReceiptFromOutboundResults({
3178
+ results: params.platformMessageIds.map((messageId) => messageId.trim()).filter((messageId) => messageId && messageId !== "unknown").map((messageId, index) => {
3179
+ const result = {
3180
+ channel: "discord",
3181
+ messageId
3182
+ };
3183
+ if (params.channelId) result.channelId = params.channelId;
3184
+ if (params.reply?.scope === "first" && index === 0) {
3185
+ const rawResult = {
3186
+ channel: "discord",
3187
+ messageId
3188
+ };
3189
+ if (params.channelId) rawResult.channelId = params.channelId;
3190
+ result.receipt = createMessageReceiptFromOutboundResults({
3191
+ results: [rawResult],
3192
+ kind: params.kind,
3193
+ threadId: params.threadId,
3194
+ replyToId: params.reply.messageId
3195
+ });
3196
+ }
3197
+ return result;
3198
+ }),
3199
+ kind: params.kind,
3200
+ threadId: params.threadId,
3201
+ replyToId: params.reply?.scope === "all" ? params.reply.messageId : void 0
3202
+ });
3203
+ }
3204
+ function createDiscordSendResult(params) {
3205
+ const messageId = params.result.id || "unknown";
3206
+ const channelId = params.result.channel_id ?? params.fallbackChannelId;
3207
+ const receiptParams = {
3208
+ platformMessageIds: params.result.platformMessageIds?.length ? params.result.platformMessageIds : [messageId],
3209
+ channelId,
3210
+ kind: params.kind
3211
+ };
3212
+ if (params.threadId != null) receiptParams.threadId = String(params.threadId);
3213
+ if (params.reply) receiptParams.reply = params.reply;
3214
+ return {
3215
+ messageId,
3216
+ channelId,
3217
+ receipt: createDiscordSendReceipt(receiptParams)
3218
+ };
3219
+ }
3220
+ //#endregion
3128
3221
  //#region extensions/discord/src/chunk.ts
3129
3222
  const DEFAULT_MAX_CHARS = 2e3;
3130
3223
  const DEFAULT_MAX_LINES = 17;
@@ -3447,4 +3540,4 @@ function createDiscordRetryRunner(params) {
3447
3540
  };
3448
3541
  }
3449
3542
  //#endregion
3450
- export { LinkButton as $, removeGuildMemberRole as $t, RequestClient as A, listChannelPins as At, Message as B, createGuildSticker as Bt, ReadyListener as C, editChannel as Ct, VoiceStateUpdateListener as D, getThreadMember as Dt, ThreadUpdateListener as E, getChannelMessage as Et, readDiscordMessage as F, addGuildMemberRole as Ft, Label as G, listGuildActiveThreads as Gt, serializePayload as H, getGuild as Ht, readRetryAfter as I, createGuildBan as It, TextInput as J, listGuildRoles as Jt, Modal as K, listGuildChannels as Kt, Command as L, createGuildChannel as Lt, RateLimitError as M, searchGuildMessages as Mt, isUnknownDiscordVoiceStateError as N, sendChannelTyping as Nt, Client as O, listChannelArchivedThreads as Ot, readDiscordCode as P, unpinChannelMessage as Pt, File as Q, removeGuildMember as Qt, CommandWithSubcommands as R, createGuildEmoji as Rt, PresenceUpdateListener as S, deleteChannelMessage as St, ThreadDeleteListener as T, getChannel as Tt, Embed as U, getGuildMember as Ut, User as V, deleteChannelPermission as Vt, CheckboxGroup as W, getGuildVoiceState as Wt, ChannelSelectMenu as X, moveGuildChannels as Xt, Button as Y, listGuildScheduledEvents as Yt, Container as Z, putChannelPermission as Zt, GuildDeleteListener as _, deleteOwnMessageReaction as _t, chunkDiscordTextWithMode as a, Separator as at, MessageReactionAddListener as b, createThread as bt, resolveDiscordReplyReference as c, Thumbnail as ct, normalizeDiscordMessagingTarget as d, parseCustomId as dt, timeoutGuildMember as en, MediaGallery as et, normalizeDiscordOutboundTarget as f, stripUndefinedFields as ft, GuildCreateListener as g, createOwnMessageReaction as gt, discord_exports as h, getCurrentUser as ht, recordDiscordMessageCreateAmbiguity as i, Section as it, DiscordError as j, pinChannelMessage as jt, Plugin as k, listChannelMessages as kt, allowFromContainsDiscordUserId as l, UserSelectMenu as lt, resolveDiscordChannelId as m, createUserDmChannel as mt, createDiscordRetryRunner as n, RoleSelectMenu as nt, createReusableDiscordReplyReference as o, StringSelectMenu as ot, parseDiscordTarget as p, createChannelWebhook as pt, RadioGroup as q, listGuildEmojis as qt, hasDiscordMessageCreateAmbiguity as r, Row as rt, resolveDiscordReplyMessageId as s, TextDisplay as st, classifyDiscordDeliveryFailure as t, __exportAll as tn, MentionableSelectMenu as tt, looksLikeDiscordTargetId as u, BaseMessageInteractiveComponent as ut, InteractionCreateListener as v, listMessageReactionUsers as vt, ResumedListener as w, editChannelMessage as wt, MessageReactionRemoveListener as x, deleteChannel as xt, MessageCreateListener as y, createChannelMessage as yt, Guild as z, createGuildScheduledEvent as zt };
3543
+ export { TextInput as $, listGuildRoles as $t, ThreadUpdateListener as A, getChannel as At, readRetryAfter as B, addGuildMemberRole as Bt, MessageCreateListener as C, listMessageReactionUsers as Ct, ReadyListener as D, deleteChannelMessage as Dt, PresenceUpdateListener as E, deleteChannel as Et, DiscordError as F, listChannelPins as Ft, User as G, createGuildSticker as Gt, CommandWithSubcommands as H, createGuildChannel as Ht, RateLimitError as I, pinChannelMessage as It, Embed as J, getGuildMember as Jt, hasDiscordV2Components as K, deleteChannelPermission as Kt, isUnknownDiscordVoiceStateError as L, searchGuildMessages as Lt, Client as M, getThreadMember as Mt, Plugin as N, listChannelArchivedThreads as Nt, ResumedListener as O, editChannel as Ot, RequestClient as P, listChannelMessages as Pt, RadioGroup as Q, listGuildEmojis as Qt, readDiscordCode as R, sendChannelTyping as Rt, InteractionCreateListener as S, deleteOwnMessageReaction as St, MessageReactionRemoveListener as T, createThread as Tt, Guild as U, createGuildEmoji as Ut, Command as V, createGuildBan as Vt, Message as W, createGuildScheduledEvent as Wt, Label as X, listGuildActiveThreads as Xt, CheckboxGroup as Y, getGuildVoiceState as Yt, Modal as Z, listGuildChannels as Zt, parseDiscordTarget as _, stripUndefinedFields as _t, chunkDiscordTextWithMode as a, timeoutGuildMember as an, MediaGallery as at, GuildCreateListener as b, getCurrentUser as bt, createDiscordSendResult as c, Row as ct, resolveDiscordReplyMessageId as d, StringSelectMenu as dt, listGuildScheduledEvents as en, Button as et, resolveDiscordReplyReference as f, TextDisplay as ft, normalizeDiscordOutboundTarget as g, parseCustomId as gt, normalizeDiscordMessagingTarget as h, BaseMessageInteractiveComponent as ht, recordDiscordMessageCreateAmbiguity as i, removeGuildMemberRole as in, LinkButton as it, VoiceStateUpdateListener as j, getChannelMessage as jt, ThreadDeleteListener as k, editChannelMessage as kt, toDiscordOutboundDeliveryResult as l, Section as lt, looksLikeDiscordTargetId as m, UserSelectMenu as mt, createDiscordRetryRunner as n, putChannelPermission as nn, Container as nt, createDiscordSendReceipt as o, __exportAll as on, MentionableSelectMenu as ot, allowFromContainsDiscordUserId as p, Thumbnail as pt, serializePayload as q, getGuild as qt, hasDiscordMessageCreateAmbiguity as r, removeGuildMember as rn, File as rt, createDiscordSendReceiptFromResults as s, RoleSelectMenu as st, classifyDiscordDeliveryFailure as t, moveGuildChannels as tn, ChannelSelectMenu as tt, createReusableDiscordReplyReference as u, Separator as ut, resolveDiscordChannelId as v, createChannelWebhook as vt, MessageReactionAddListener as w, createChannelMessage as wt, GuildDeleteListener as x, createOwnMessageReaction as xt, discord_exports as y, createUserDmChannel as yt, readDiscordMessage as z, unpinChannelMessage as zt };
@@ -1,19 +1,21 @@
1
- import { m as resolveDiscordChannelId, o as createReusableDiscordReplyReference } from "./retry-CLpJcXXf.js";
2
- import { a as mergeDiscordAccountConfig, o as resolveDefaultDiscordAccountId, t as createDiscordActionGate } from "./accounts-DJTf1LtA.js";
3
- import { h as readDiscordComponentSpec } from "./outbound-session-route-DxLkrgKQ.js";
4
- import { E as canManageGuildRoleDiscord, I as createDiscordRuntimeAccountContext, M as hasAnyGuildPermissionDiscord, N as isThreadChannelType$1, O as fetchChannelPermissionsDiscord, T as canManageGuildMemberRoleDiscord, V as getGateway, d as resolveDiscordTargetChannelId, j as hasAnyChannelPermissionDiscord } from "./send.shared-BmwFjW6T.js";
5
- import { a as assertMediaNotDataUrl, c as readBooleanParam, d as readReactionParams, f as readStringArrayParam, h as withNormalizedTimestamp, l as readNonNegativeIntegerParam, m as resolvePollMaxSelections, o as jsonResult, p as readStringParam, r as sendDiscordComponentMessage, s as parseAvailableTags, u as readPositiveIntegerParam } from "./send.components-iJyFXw9L.js";
6
- import { a as normalizeDiscordSlug, c as resolveDiscordChannelConfigWithFallback, n as isDiscordGroupAllowedByPolicy, v as resolveGroupDmAllow } from "./allow-list-DnxIlPP2.js";
7
- import { n as sendPollDiscord, r as sendStickerDiscord, t as sendMessageDiscord } from "./send.outbound-DS5tHwfR.js";
1
+ import { f as resolveDiscordReplyReference, u as createReusableDiscordReplyReference, v as resolveDiscordChannelId } from "./retry-Cv4jCU5Z.js";
2
+ import { m as readDiscordComponentSpec } from "./components-B9V5o361.js";
3
+ import { o as mergeDiscordAccountConfig, s as resolveDefaultDiscordAccountId, t as createDiscordActionGate } from "./accounts-CfQ-vSyf.js";
4
+ import { r as sendDiscordComponentMessage } from "./send.components-DKKAw5VX.js";
5
+ import { a as normalizeDiscordSlug, c as resolveDiscordChannelConfigWithFallback, n as isDiscordGroupAllowedByPolicy, v as resolveGroupDmAllow } from "./allow-list-BDMimASD.js";
6
+ import { F as createDiscordRuntimeAccountContext, T as hasAnyGuildPermissionDiscord, U as getGateway, d as resolveDiscordTargetChannelId, v as canManageGuildMemberRoleDiscord, w as hasAnyChannelPermissionDiscord, x as fetchChannelPermissionsDiscord, y as canManageGuildRoleDiscord } from "./send.shared-JjljcV4O.js";
7
+ import { r as sendStickerDiscord, t as sendMessageDiscord } from "./send.outbound-zam0TrZx.js";
8
+ import { t as isDiscordThreadChannelType } from "./channel-type-CVLZyGYS.js";
8
9
  import { n as getPresence } from "./presence-cache-z1N8MbJ3.js";
9
- import { A as listGuildEmojisDiscord, C as fetchVoiceStatusDiscord, D as removeRoleDiscord, E as listScheduledEventsDiscord, F as editChannelDiscord, I as moveChannelDiscord, L as removeChannelPermissionDiscord, M as uploadStickerDiscord, N as createChannelDiscord, O as resolveEventCoverImage, P as deleteChannelDiscord, R as setChannelPermissionDiscord, S as fetchRoleInfoDiscord, T as listGuildChannelsDiscord, _ as banMemberDiscord, a as DiscordThreadInitialMessageError, b as fetchGuildInfoDiscord, c as editMessageDiscord, d as listThreadsDiscord, f as pinMessageDiscord, g as addRoleDiscord, h as unpinMessageDiscord, j as uploadEmojiDiscord, k as timeoutMemberDiscord, l as fetchMessageDiscord, m as searchMessagesDiscord, o as createThreadDiscord, p as readMessagesDiscord, r as sendVoiceMessageDiscord, s as deleteMessageDiscord, u as listPinsDiscord, v as createScheduledEventDiscord, w as kickMemberDiscord, x as fetchMemberInfoDiscord, y as fetchChannelInfoDiscord } from "./send-B7Q6Oc1I.js";
10
- import { i as removeReactionDiscord, n as reactMessageDiscord, r as removeOwnReactionsDiscord, t as fetchReactionsDiscord } from "./send.reactions-BAn0iiVQ.js";
11
- import "./targets-yUFTHoAx.js";
12
- import { asBoolean, normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/string-coerce-runtime";
10
+ import { A as listScheduledEventsDiscord, B as moveChannelDiscord, C as fetchChannelInfoDiscord, D as fetchVoiceStatusDiscord, E as fetchRoleInfoDiscord, F as uploadEmojiDiscord, H as setChannelPermissionDiscord, I as uploadStickerDiscord, L as createChannelDiscord, M as resolveEventCoverImage, N as timeoutMemberDiscord, O as kickMemberDiscord, P as listGuildEmojisDiscord, R as deleteChannelDiscord, S as createScheduledEventDiscord, T as fetchMemberInfoDiscord, V as removeChannelPermissionDiscord, _ as readMessagesDiscord, a as removeReactionDiscord, b as addRoleDiscord, d as deleteMessageDiscord, f as editMessageDiscord, g as pinMessageDiscord, h as listThreadsDiscord, i as removeOwnReactionsDiscord, j as removeRoleDiscord, k as listGuildChannelsDiscord, l as DiscordThreadInitialMessageError, m as listPinsDiscord, n as fetchReactionsDiscord, p as fetchMessageDiscord, r as reactMessageDiscord, s as sendVoiceMessageDiscord, u as createThreadDiscord, v as searchMessagesDiscord, w as fetchGuildInfoDiscord, x as banMemberDiscord, y as unpinMessageDiscord, z as editChannelDiscord } from "./send-C49MFF9j.js";
11
+ import "./targets-CtTKvntJ.js";
13
12
  import { ChannelType, PermissionFlagsBits } from "discord-api-types/v10";
14
13
  import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
15
- import { normalizeAccountId } from "openclaw/plugin-sdk/account-resolution";
14
+ import { asBoolean, isRecord, normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/string-coerce-runtime";
16
15
  import { resolveOpenProviderRuntimeGroupPolicy } from "openclaw/plugin-sdk/runtime-group-policy";
16
+ import { assertMediaNotDataUrl, jsonResult, parseAvailableTags, readNonNegativeIntegerParam, readPositiveIntegerParam, readReactionParams, readStringArrayParam, readStringParam, withNormalizedTimestamp } from "openclaw/plugin-sdk/channel-actions";
17
+ import { normalizeAccountId } from "openclaw/plugin-sdk/account-resolution";
18
+ import { readBooleanParam } from "openclaw/plugin-sdk/boolean-param";
17
19
  //#region extensions/discord/src/actions/runtime-deps.ts
18
20
  const discordGuildActionRuntime = {
19
21
  addRoleDiscord,
@@ -71,7 +73,6 @@ const discordMessagingActionRuntime = {
71
73
  searchMessagesDiscord,
72
74
  sendDiscordComponentMessage,
73
75
  sendMessageDiscord,
74
- sendPollDiscord,
75
76
  sendStickerDiscord,
76
77
  sendVoiceMessageDiscord,
77
78
  unpinMessageDiscord
@@ -242,8 +243,7 @@ function readDiscordChannelType(value) {
242
243
  return typeof type === "number" ? type : void 0;
243
244
  }
244
245
  function isDiscordThreadChannel(value) {
245
- const type = readDiscordChannelType(value);
246
- return type === 10 || type === 11 || type === 12;
246
+ return isDiscordThreadChannelType(readDiscordChannelType(value));
247
247
  }
248
248
  function isDiscordReadAncestryAllowed(params) {
249
249
  for (const ancestor of params.target.ancestors) {
@@ -624,9 +624,6 @@ const guildAdminActionGuards = {
624
624
  channelPermissionSet: channelPermissionGuard,
625
625
  channelPermissionRemove: channelPermissionGuard
626
626
  };
627
- function isThreadChannelType(channelType) {
628
- return channelType === ChannelType.GuildNewsThread || channelType === ChannelType.GuildPublicThread || channelType === ChannelType.GuildPrivateThread;
629
- }
630
627
  function isLockedThreadChannel(channel) {
631
628
  if (!channel || typeof channel !== "object") return false;
632
629
  return channel.thread_metadata?.locked === true;
@@ -659,7 +656,7 @@ async function resolveGuildAdminActionPermissions(params) {
659
656
  cfg: params.cfg,
660
657
  accountId: params.accountId
661
658
  }));
662
- if (!isThreadChannelType("type" in channel ? channel.type : void 0)) return params.guard.permissions;
659
+ if (!isDiscordThreadChannelType("type" in channel ? channel.type : void 0)) return params.guard.permissions;
663
660
  return params.values.archived === false && !("name" in params.values) && !("topic" in params.values) && !("position" in params.values) && !("parentId" in params.values) && !("clearParent" in params.values) && !("nsfw" in params.values) && !("rateLimitPerUser" in params.values) && !("locked" in params.values) && !("autoArchiveDuration" in params.values) && !isLockedThreadChannel(channel) ? [PermissionFlagsBits.ManageThreads, PermissionFlagsBits.SendMessagesInThreads] : [PermissionFlagsBits.ManageThreads];
664
661
  }
665
662
  async function verifySenderGuildAdminPermission(params) {
@@ -773,11 +770,23 @@ async function handleDiscordGuildAction(action, params, isActionEnabled, cfg, op
773
770
  }
774
771
  case "emojiList": {
775
772
  if (!isActionEnabled("reactions")) throw new Error("Discord reactions are disabled.");
776
- const guildId = readStringParam(params, "guildId", { required: true });
773
+ const guildId = await resolveGuildIdForGuildAdminAction({
774
+ values: params,
775
+ accountId,
776
+ cfg
777
+ });
778
+ if (!guildId) throw new Error("Discord emoji listing requires guildId or a server channel.");
777
779
  await assertGuildMetadataReadAllowed(guildId);
780
+ const limit = Math.min(readPositiveIntegerParam(params, "limit") ?? 100, 100);
781
+ const fetchEmojis = async () => (await discordGuildActionRuntime.listGuildEmojisDiscord(guildId, withOpts())).flatMap(({ name, id, animated }) => name && id ? [{
782
+ name,
783
+ identifier: `${name}:${id}`,
784
+ ...animated ? { animated } : {}
785
+ }] : []).toSorted((left, right) => left.name.localeCompare(right.name) || left.identifier.localeCompare(right.identifier));
786
+ const gateway = getGateway(accountId ?? resolveDefaultDiscordAccountId(cfg));
778
787
  return jsonResult({
779
788
  ok: true,
780
- emojis: await discordGuildActionRuntime.listGuildEmojisDiscord(guildId, withOpts())
789
+ emojis: (gateway ? await gateway.fetchGuildEmojis(guildId, fetchEmojis) : await fetchEmojis()).slice(0, limit)
781
790
  });
782
791
  }
783
792
  case "emojiUpload": {
@@ -1114,9 +1123,8 @@ async function handleDiscordMessageManagementAction(ctx) {
1114
1123
  if (rawInferChannelId) try {
1115
1124
  const inferChannelId = discordMessagingActionRuntime.resolveDiscordChannelId(rawInferChannelId);
1116
1125
  const channelInfo = await discordMessagingActionRuntime.fetchChannelInfoDiscord(inferChannelId, ctx.withOpts());
1117
- if (channelInfo && typeof channelInfo === "object") {
1118
- const record = channelInfo;
1119
- const resolved = record.guild_id ?? record.guildId;
1126
+ if (isRecord(channelInfo)) {
1127
+ const resolved = channelInfo.guild_id ?? channelInfo.guildId;
1120
1128
  if (typeof resolved === "string" && resolved.trim()) guildId = resolved.trim();
1121
1129
  }
1122
1130
  } catch {}
@@ -1206,6 +1214,14 @@ async function handleDiscordReactionMessagingAction(ctx) {
1206
1214
  function hasDiscordComponentObjectKeys(value) {
1207
1215
  return Boolean(value && typeof value === "object" && !Array.isArray(value) && Object.keys(value).length > 0);
1208
1216
  }
1217
+ function resolveActionReplyReference(ctx, replyToId) {
1218
+ const reply = ctx.options?.reply;
1219
+ return reply ? resolveDiscordReplyReference({
1220
+ replyToId: reply.replyToId,
1221
+ replyToIdSource: reply.source,
1222
+ replyToMode: reply.source === "implicit" ? reply.mode : void 0
1223
+ }) : createReusableDiscordReplyReference(replyToId);
1224
+ }
1209
1225
  function readDiscordThreadArchiveTimestamp(thread) {
1210
1226
  if (!thread || typeof thread !== "object" || Array.isArray(thread)) return;
1211
1227
  const metadata = thread.thread_metadata;
@@ -1253,7 +1269,7 @@ async function appendDiscordThreadRenameResult(ctx, params) {
1253
1269
  };
1254
1270
  }
1255
1271
  try {
1256
- if (!isThreadChannelType$1((await discordMessagingActionRuntime.fetchChannelInfoDiscord(channelId, ctx.withOpts())).type)) return {
1272
+ if (!isDiscordThreadChannelType((await discordMessagingActionRuntime.fetchChannelInfoDiscord(channelId, ctx.withOpts())).type)) return {
1257
1273
  ...params.payload,
1258
1274
  warning: "Discord threadName was ignored because the send target is not a thread."
1259
1275
  };
@@ -1286,28 +1302,13 @@ async function handleDiscordMessageSendAction(ctx) {
1286
1302
  required: true,
1287
1303
  label: "stickerIds"
1288
1304
  });
1289
- await discordMessagingActionRuntime.sendStickerDiscord(to, stickerIds, ctx.withOpts({ content }));
1290
- return jsonResult({ ok: true });
1291
- }
1292
- case "poll": {
1293
- if (!ctx.isActionEnabled("polls")) throw new Error("Discord polls are disabled.");
1294
- const to = readStringParam(ctx.params, "to", { required: true });
1295
- const content = readStringParam(ctx.params, "content");
1296
- const question = readStringParam(ctx.params, "question", { required: true });
1297
- const answers = readStringArrayParam(ctx.params, "answers", {
1298
- required: true,
1299
- label: "answers"
1305
+ return jsonResult({
1306
+ ok: true,
1307
+ result: await discordMessagingActionRuntime.sendStickerDiscord(to, stickerIds, ctx.withOpts({
1308
+ content,
1309
+ ...ctx.params.silent === true ? { silent: true } : {}
1310
+ }))
1300
1311
  });
1301
- const allowMultiselect = readBooleanParam(ctx.params, "allowMultiselect");
1302
- const durationHours = readPositiveIntegerParam(ctx.params, "durationHours");
1303
- const maxSelections = resolvePollMaxSelections(answers.length, allowMultiselect);
1304
- await discordMessagingActionRuntime.sendPollDiscord(to, {
1305
- question,
1306
- options: answers,
1307
- maxSelections,
1308
- durationHours
1309
- }, ctx.withOpts({ content }));
1310
- return jsonResult({ ok: true });
1311
1312
  }
1312
1313
  case "sendMessage": {
1313
1314
  if (!ctx.isActionEnabled("messages")) throw new Error("Discord message sends are disabled.");
@@ -1319,15 +1320,15 @@ async function handleDiscordMessageSendAction(ctx) {
1319
1320
  const componentSpec = hasDiscordComponentObjectKeys(rawComponents) ? discordMessagingActionRuntime.readDiscordComponentSpec(rawComponents) : null;
1320
1321
  const components = Array.isArray(rawComponents) || typeof rawComponents === "function" ? rawComponents : void 0;
1321
1322
  const mediaUrl = readStringParam(ctx.params, "mediaUrl", { trim: false }) ?? readStringParam(ctx.params, "path", { trim: false }) ?? readStringParam(ctx.params, "filePath", { trim: false });
1323
+ const rawEmbeds = ctx.params.embeds;
1324
+ const embeds = Array.isArray(rawEmbeds) ? rawEmbeds : void 0;
1322
1325
  const content = readStringParam(ctx.params, "content", {
1323
- required: !asVoice && !componentSpec && !components && !mediaUrl,
1326
+ required: !asVoice && !componentSpec && !components && !embeds?.length && !mediaUrl,
1324
1327
  allowEmpty: true
1325
1328
  });
1326
1329
  const filename = readStringParam(ctx.params, "filename");
1327
1330
  const replyTo = readStringParam(ctx.params, "replyTo");
1328
1331
  const threadName = readStringParam(ctx.params, "threadName");
1329
- const rawEmbeds = ctx.params.embeds;
1330
- const embeds = Array.isArray(rawEmbeds) ? rawEmbeds : void 0;
1331
1332
  const sessionKey = readStringParam(ctx.params, "__sessionKey");
1332
1333
  const agentId = readStringParam(ctx.params, "__agentId");
1333
1334
  if (componentSpec) {
@@ -1338,25 +1339,26 @@ async function handleDiscordMessageSendAction(ctx) {
1338
1339
  ...componentSpec,
1339
1340
  text: normalizedContent
1340
1341
  };
1342
+ const result = await discordMessagingActionRuntime.sendDiscordComponentMessage(to, payload, {
1343
+ ...ctx.withOpts(),
1344
+ silent,
1345
+ reply: resolveActionReplyReference(ctx, replyTo),
1346
+ sessionKey: sessionKey ?? void 0,
1347
+ agentId: agentId ?? void 0,
1348
+ mediaUrl: mediaUrl ?? void 0,
1349
+ filename: filename ?? void 0,
1350
+ mediaAccess: ctx.options?.mediaAccess,
1351
+ mediaLocalRoots: ctx.options?.mediaLocalRoots,
1352
+ mediaReadFile: ctx.options?.mediaReadFile,
1353
+ ...suppressEmbeds === void 0 ? {} : { suppressEmbeds }
1354
+ });
1341
1355
  return jsonResult(await appendDiscordThreadRenameResult(ctx, {
1342
1356
  payload: {
1343
1357
  ok: true,
1344
- result: await discordMessagingActionRuntime.sendDiscordComponentMessage(to, payload, {
1345
- ...ctx.withOpts(),
1346
- silent,
1347
- reply: createReusableDiscordReplyReference(replyTo),
1348
- sessionKey: sessionKey ?? void 0,
1349
- agentId: agentId ?? void 0,
1350
- mediaUrl: mediaUrl ?? void 0,
1351
- filename: filename ?? void 0,
1352
- mediaAccess: ctx.options?.mediaAccess,
1353
- mediaLocalRoots: ctx.options?.mediaLocalRoots,
1354
- mediaReadFile: ctx.options?.mediaReadFile,
1355
- ...suppressEmbeds === void 0 ? {} : { suppressEmbeds }
1356
- }),
1358
+ result,
1357
1359
  components: true
1358
1360
  },
1359
- target: to,
1361
+ target: result.receipt?.threadId ?? to,
1360
1362
  threadName
1361
1363
  }));
1362
1364
  }
@@ -1369,7 +1371,7 @@ async function handleDiscordMessageSendAction(ctx) {
1369
1371
  ok: true,
1370
1372
  result: await discordMessagingActionRuntime.sendVoiceMessageDiscord(to, mediaUrl, {
1371
1373
  ...ctx.withOpts(),
1372
- reply: createReusableDiscordReplyReference(replyTo),
1374
+ reply: resolveActionReplyReference(ctx, replyTo),
1373
1375
  silent,
1374
1376
  mediaAccess: ctx.options?.mediaAccess,
1375
1377
  mediaLocalRoots: ctx.options?.mediaLocalRoots,
@@ -1381,24 +1383,25 @@ async function handleDiscordMessageSendAction(ctx) {
1381
1383
  threadName
1382
1384
  }));
1383
1385
  }
1386
+ const result = await discordMessagingActionRuntime.sendMessageDiscord(to, content ?? "", {
1387
+ ...ctx.withOpts(),
1388
+ mediaAccess: ctx.options?.mediaAccess,
1389
+ mediaUrl,
1390
+ filename: filename ?? void 0,
1391
+ mediaLocalRoots: ctx.options?.mediaLocalRoots,
1392
+ mediaReadFile: ctx.options?.mediaReadFile,
1393
+ reply: resolveActionReplyReference(ctx, replyTo),
1394
+ components,
1395
+ embeds,
1396
+ silent,
1397
+ ...suppressEmbeds === void 0 ? {} : { suppressEmbeds }
1398
+ });
1384
1399
  return jsonResult(await appendDiscordThreadRenameResult(ctx, {
1385
1400
  payload: {
1386
1401
  ok: true,
1387
- result: await discordMessagingActionRuntime.sendMessageDiscord(to, content ?? "", {
1388
- ...ctx.withOpts(),
1389
- mediaAccess: ctx.options?.mediaAccess,
1390
- mediaUrl,
1391
- filename: filename ?? void 0,
1392
- mediaLocalRoots: ctx.options?.mediaLocalRoots,
1393
- mediaReadFile: ctx.options?.mediaReadFile,
1394
- reply: createReusableDiscordReplyReference(replyTo),
1395
- components,
1396
- embeds,
1397
- silent,
1398
- ...suppressEmbeds === void 0 ? {} : { suppressEmbeds }
1399
- })
1402
+ result
1400
1403
  },
1401
- target: to,
1404
+ target: result.receipt?.threadId ?? to,
1402
1405
  threadName
1403
1406
  }));
1404
1407
  }
@@ -1479,7 +1482,8 @@ async function handleDiscordMessageSendAction(ctx) {
1479
1482
  mediaAccess: ctx.options?.mediaAccess,
1480
1483
  mediaLocalRoots: ctx.options?.mediaLocalRoots,
1481
1484
  mediaReadFile: ctx.options?.mediaReadFile,
1482
- reply: createReusableDiscordReplyReference(replyTo)
1485
+ reply: resolveActionReplyReference(ctx, replyTo),
1486
+ ...ctx.params.silent === true ? { silent: true } : {}
1483
1487
  })
1484
1488
  });
1485
1489
  }
@@ -1601,13 +1605,13 @@ const VALID_STATUSES = /* @__PURE__ */ new Set([
1601
1605
  "idle",
1602
1606
  "invisible"
1603
1607
  ]);
1604
- async function handleDiscordPresenceAction(action, params, isActionEnabled) {
1608
+ async function handleDiscordPresenceAction(action, params, isActionEnabled, cfg) {
1605
1609
  if (action !== "setPresence") throw new Error(`Unknown presence action: ${action}`);
1606
1610
  if (!isActionEnabled("presence", false)) throw new Error("Discord presence changes are disabled.");
1607
- const accountId = readStringParam(params, "accountId");
1611
+ const accountId = readStringParam(params, "accountId") ?? resolveDefaultDiscordAccountId(cfg);
1608
1612
  const gateway = getGateway(accountId);
1609
- if (!gateway) throw new Error(`Discord gateway not available${accountId ? ` for account "${accountId}"` : ""}. The bot may not be connected.`);
1610
- if (!gateway.isConnected) throw new Error(`Discord gateway is not connected${accountId ? ` for account "${accountId}"` : ""}.`);
1613
+ if (!gateway) throw new Error(`Discord gateway not available for account "${accountId}". The bot may not be connected.`);
1614
+ if (!gateway.isConnected) throw new Error(`Discord gateway is not connected for account "${accountId}".`);
1611
1615
  const statusRaw = readStringParam(params, "status") ?? "online";
1612
1616
  if (!VALID_STATUSES.has(statusRaw)) throw new Error(`Invalid status "${statusRaw}". Must be one of: ${[...VALID_STATUSES].join(", ")}`);
1613
1617
  const status = statusRaw;
@@ -1695,7 +1699,6 @@ const moderationActions = /* @__PURE__ */ new Set([
1695
1699
  "kick",
1696
1700
  "ban"
1697
1701
  ]);
1698
- const presenceActions = /* @__PURE__ */ new Set(["setPresence"]);
1699
1702
  async function handleDiscordAction(params, cfg, options) {
1700
1703
  const action = readStringParam(params, "action", { required: true });
1701
1704
  const isActionEnabled = createDiscordActionGate({
@@ -1705,7 +1708,7 @@ async function handleDiscordAction(params, cfg, options) {
1705
1708
  if (messagingActions.has(action)) return await handleDiscordMessagingAction(action, params, isActionEnabled, cfg, options);
1706
1709
  if (guildActions.has(action)) return await handleDiscordGuildAction(action, params, isActionEnabled, cfg, options);
1707
1710
  if (moderationActions.has(action)) return await handleDiscordModerationAction(action, params, isActionEnabled, cfg);
1708
- if (presenceActions.has(action)) return await handleDiscordPresenceAction(action, params, isActionEnabled);
1711
+ if (action === "setPresence") return await handleDiscordPresenceAction(action, params, isActionEnabled, cfg);
1709
1712
  throw new Error(`Unknown action: ${action}`);
1710
1713
  }
1711
1714
  //#endregion
@@ -1,5 +1,5 @@
1
- import { n as isDiscordAccountEnabledForRuntime, r as listDiscordAccountIds, s as resolveDiscordAccount } from "./accounts-DJTf1LtA.js";
2
- import { G as resolveDiscordProxyFetchForAccount } from "./send.shared-BmwFjW6T.js";
1
+ import { c as resolveDiscordAccount, g as selectDiscordActivitiesRuntimeConfig, n as isDiscordAccountEnabledForRuntime, r as listDiscordAccountIds } from "./accounts-CfQ-vSyf.js";
2
+ import { z as resolveDiscordProxyFetchForAccount } from "./send.shared-JjljcV4O.js";
3
3
  import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
4
4
  //#region extensions/discord/src/activities/config.ts
5
5
  function resolveDiscordActivitiesConfig(account, env = process.env) {
@@ -30,7 +30,7 @@ var DiscordActivitiesRuntime = class {
30
30
  this.learnedApplicationIds = /* @__PURE__ */ new Map();
31
31
  }
32
32
  currentConfig() {
33
- return this.getCurrentConfig?.() ?? this.startupConfig;
33
+ return selectDiscordActivitiesRuntimeConfig(this.getCurrentConfig?.() ?? this.startupConfig);
34
34
  }
35
35
  registerApplicationId(accountId, applicationId) {
36
36
  const trimmed = applicationId.trim();
@@ -41,7 +41,7 @@ var DiscordActivitiesRuntime = class {
41
41
  cfg,
42
42
  accountId
43
43
  });
44
- if (!isDiscordAccountEnabledForRuntime(account, cfg)) return null;
44
+ if (!listDiscordAccountIds(cfg).includes(account.accountId) || !isDiscordAccountEnabledForRuntime(account, cfg) || account.tokenStatus !== "available") return null;
45
45
  const activities = resolveDiscordActivitiesConfig(account.config, this.env);
46
46
  if (!activities.enabled) return null;
47
47
  const applicationId = activities.applicationId ?? this.learnedApplicationIds.get(account.accountId) ?? account.config.applicationId?.trim();
@@ -62,12 +62,11 @@ var DiscordActivitiesRuntime = class {
62
62
  if (applicationId) return accounts.find((account) => account.applicationId === applicationId) ?? null;
63
63
  return accounts.length === 1 ? accounts[0] ?? null : null;
64
64
  }
65
+ hasEnabledAccounts(cfg = this.currentConfig()) {
66
+ return listDiscordAccountIds(cfg).some((accountId) => this.resolveAccount(accountId, cfg) !== null);
67
+ }
65
68
  isAccountEnabled(accountId, cfg = this.currentConfig()) {
66
- const account = resolveDiscordAccount({
67
- cfg,
68
- accountId
69
- });
70
- return isDiscordAccountEnabledForRuntime(account, cfg) && resolveDiscordActivitiesConfig(account.config, this.env).enabled;
69
+ return this.resolveAccount(accountId, cfg) !== null;
71
70
  }
72
71
  };
73
72
  let activeRuntime;
@@ -78,4 +77,4 @@ function getDiscordActivitiesRuntime() {
78
77
  return activeRuntime;
79
78
  }
80
79
  //#endregion
81
- export { resolveDiscordActivitiesConfig as i, getDiscordActivitiesRuntime as n, setDiscordActivitiesRuntime as r, DiscordActivitiesRuntime as t };
80
+ export { getDiscordActivitiesRuntime as n, setDiscordActivitiesRuntime as r, DiscordActivitiesRuntime as t };