@neontechspace/fluxerly 1000.0.0-nightly.12
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/CHANGELOG.md +833 -0
- package/LICENSE +201 -0
- package/README.md +129 -0
- package/agents/AGENTS.md +195 -0
- package/dist/api/default/application.d.ts +34 -0
- package/dist/api/default/application.d.ts.map +1 -0
- package/dist/api/default/application.js +2 -0
- package/dist/api/default/application.js.map +1 -0
- package/dist/api/default/attachments.d.ts +89 -0
- package/dist/api/default/attachments.d.ts.map +1 -0
- package/dist/api/default/attachments.js +2 -0
- package/dist/api/default/attachments.js.map +1 -0
- package/dist/api/default/audit-logs.d.ts +48 -0
- package/dist/api/default/audit-logs.d.ts.map +1 -0
- package/dist/api/default/audit-logs.js +2 -0
- package/dist/api/default/audit-logs.js.map +1 -0
- package/dist/api/default/bot.d.ts +200 -0
- package/dist/api/default/bot.d.ts.map +1 -0
- package/dist/api/default/bot.js +309 -0
- package/dist/api/default/bot.js.map +1 -0
- package/dist/api/default/cache.d.ts +105 -0
- package/dist/api/default/cache.d.ts.map +1 -0
- package/dist/api/default/cache.js +2 -0
- package/dist/api/default/cache.js.map +1 -0
- package/dist/api/default/channels.d.ts +249 -0
- package/dist/api/default/channels.d.ts.map +1 -0
- package/dist/api/default/channels.js +2 -0
- package/dist/api/default/channels.js.map +1 -0
- package/dist/api/default/client.d.ts +528 -0
- package/dist/api/default/client.d.ts.map +1 -0
- package/dist/api/default/client.js +301 -0
- package/dist/api/default/client.js.map +1 -0
- package/dist/api/default/collectors.d.ts +76 -0
- package/dist/api/default/collectors.d.ts.map +1 -0
- package/dist/api/default/collectors.js +2 -0
- package/dist/api/default/collectors.js.map +1 -0
- package/dist/api/default/commands.d.ts +91 -0
- package/dist/api/default/commands.d.ts.map +1 -0
- package/dist/api/default/commands.js +92 -0
- package/dist/api/default/commands.js.map +1 -0
- package/dist/api/default/direct-messages.d.ts +111 -0
- package/dist/api/default/direct-messages.d.ts.map +1 -0
- package/dist/api/default/direct-messages.js +2 -0
- package/dist/api/default/direct-messages.js.map +1 -0
- package/dist/api/default/discovery.d.ts +76 -0
- package/dist/api/default/discovery.d.ts.map +1 -0
- package/dist/api/default/discovery.js +2 -0
- package/dist/api/default/discovery.js.map +1 -0
- package/dist/api/default/emojis.d.ts +88 -0
- package/dist/api/default/emojis.d.ts.map +1 -0
- package/dist/api/default/emojis.js +2 -0
- package/dist/api/default/emojis.js.map +1 -0
- package/dist/api/default/events.d.ts +127 -0
- package/dist/api/default/events.d.ts.map +1 -0
- package/dist/api/default/events.js +2 -0
- package/dist/api/default/events.js.map +1 -0
- package/dist/api/default/gateway.d.ts +62 -0
- package/dist/api/default/gateway.d.ts.map +1 -0
- package/dist/api/default/gateway.js +2 -0
- package/dist/api/default/gateway.js.map +1 -0
- package/dist/api/default/guards.d.ts +87 -0
- package/dist/api/default/guards.d.ts.map +1 -0
- package/dist/api/default/guards.js +78 -0
- package/dist/api/default/guards.js.map +1 -0
- package/dist/api/default/guilds.d.ts +230 -0
- package/dist/api/default/guilds.d.ts.map +1 -0
- package/dist/api/default/guilds.js +2 -0
- package/dist/api/default/guilds.js.map +1 -0
- package/dist/api/default/helpers.d.ts +79 -0
- package/dist/api/default/helpers.d.ts.map +1 -0
- package/dist/api/default/helpers.js +79 -0
- package/dist/api/default/helpers.js.map +1 -0
- package/dist/api/default/instance.d.ts +47 -0
- package/dist/api/default/instance.d.ts.map +1 -0
- package/dist/api/default/instance.js +2 -0
- package/dist/api/default/instance.js.map +1 -0
- package/dist/api/default/invites.d.ts +57 -0
- package/dist/api/default/invites.d.ts.map +1 -0
- package/dist/api/default/invites.js +2 -0
- package/dist/api/default/invites.js.map +1 -0
- package/dist/api/default/logging.d.ts +37 -0
- package/dist/api/default/logging.d.ts.map +1 -0
- package/dist/api/default/logging.js +2 -0
- package/dist/api/default/logging.js.map +1 -0
- package/dist/api/default/members.d.ts +442 -0
- package/dist/api/default/members.d.ts.map +1 -0
- package/dist/api/default/members.js +2 -0
- package/dist/api/default/members.js.map +1 -0
- package/dist/api/default/messages.d.ts +898 -0
- package/dist/api/default/messages.d.ts.map +1 -0
- package/dist/api/default/messages.js +2 -0
- package/dist/api/default/messages.js.map +1 -0
- package/dist/api/default/oauth.d.ts +168 -0
- package/dist/api/default/oauth.d.ts.map +1 -0
- package/dist/api/default/oauth.js +84 -0
- package/dist/api/default/oauth.js.map +1 -0
- package/dist/api/default/permissions.d.ts +44 -0
- package/dist/api/default/permissions.d.ts.map +1 -0
- package/dist/api/default/permissions.js +2 -0
- package/dist/api/default/permissions.js.map +1 -0
- package/dist/api/default/presence.d.ts +88 -0
- package/dist/api/default/presence.d.ts.map +1 -0
- package/dist/api/default/presence.js +2 -0
- package/dist/api/default/presence.js.map +1 -0
- package/dist/api/default/rest.d.ts +28 -0
- package/dist/api/default/rest.d.ts.map +1 -0
- package/dist/api/default/rest.js +2 -0
- package/dist/api/default/rest.js.map +1 -0
- package/dist/api/default/results.d.ts +31 -0
- package/dist/api/default/results.d.ts.map +1 -0
- package/dist/api/default/results.js +14 -0
- package/dist/api/default/results.js.map +1 -0
- package/dist/api/default/roles.d.ts +119 -0
- package/dist/api/default/roles.d.ts.map +1 -0
- package/dist/api/default/roles.js +2 -0
- package/dist/api/default/roles.js.map +1 -0
- package/dist/api/default/stickers.d.ts +92 -0
- package/dist/api/default/stickers.d.ts.map +1 -0
- package/dist/api/default/stickers.js +2 -0
- package/dist/api/default/stickers.js.map +1 -0
- package/dist/api/default/supervisor.d.ts +51 -0
- package/dist/api/default/supervisor.d.ts.map +1 -0
- package/dist/api/default/supervisor.js +53 -0
- package/dist/api/default/supervisor.js.map +1 -0
- package/dist/api/default/threads.d.ts +158 -0
- package/dist/api/default/threads.d.ts.map +1 -0
- package/dist/api/default/threads.js +2 -0
- package/dist/api/default/threads.js.map +1 -0
- package/dist/api/default/users.d.ts +73 -0
- package/dist/api/default/users.d.ts.map +1 -0
- package/dist/api/default/users.js +2 -0
- package/dist/api/default/users.js.map +1 -0
- package/dist/api/default/webhook-client.d.ts +149 -0
- package/dist/api/default/webhook-client.d.ts.map +1 -0
- package/dist/api/default/webhook-client.js +69 -0
- package/dist/api/default/webhook-client.js.map +1 -0
- package/dist/api/default/webhooks.d.ts +62 -0
- package/dist/api/default/webhooks.d.ts.map +1 -0
- package/dist/api/default/webhooks.js +2 -0
- package/dist/api/default/webhooks.js.map +1 -0
- package/dist/api/effect/application.d.ts +29 -0
- package/dist/api/effect/application.d.ts.map +1 -0
- package/dist/api/effect/application.js +2 -0
- package/dist/api/effect/application.js.map +1 -0
- package/dist/api/effect/attachments.d.ts +84 -0
- package/dist/api/effect/attachments.d.ts.map +1 -0
- package/dist/api/effect/attachments.js +2 -0
- package/dist/api/effect/attachments.js.map +1 -0
- package/dist/api/effect/audit-logs.d.ts +42 -0
- package/dist/api/effect/audit-logs.d.ts.map +1 -0
- package/dist/api/effect/audit-logs.js +2 -0
- package/dist/api/effect/audit-logs.js.map +1 -0
- package/dist/api/effect/bot.d.ts +233 -0
- package/dist/api/effect/bot.d.ts.map +1 -0
- package/dist/api/effect/bot.js +230 -0
- package/dist/api/effect/bot.js.map +1 -0
- package/dist/api/effect/cache.d.ts +103 -0
- package/dist/api/effect/cache.d.ts.map +1 -0
- package/dist/api/effect/cache.js +2 -0
- package/dist/api/effect/cache.js.map +1 -0
- package/dist/api/effect/channels.d.ts +231 -0
- package/dist/api/effect/channels.d.ts.map +1 -0
- package/dist/api/effect/channels.js +2 -0
- package/dist/api/effect/channels.js.map +1 -0
- package/dist/api/effect/client.d.ts +622 -0
- package/dist/api/effect/client.d.ts.map +1 -0
- package/dist/api/effect/client.js +191 -0
- package/dist/api/effect/client.js.map +1 -0
- package/dist/api/effect/collectors.d.ts +90 -0
- package/dist/api/effect/collectors.d.ts.map +1 -0
- package/dist/api/effect/collectors.js +2 -0
- package/dist/api/effect/collectors.js.map +1 -0
- package/dist/api/effect/commands.d.ts +86 -0
- package/dist/api/effect/commands.d.ts.map +1 -0
- package/dist/api/effect/commands.js +87 -0
- package/dist/api/effect/commands.js.map +1 -0
- package/dist/api/effect/direct-messages.d.ts +102 -0
- package/dist/api/effect/direct-messages.d.ts.map +1 -0
- package/dist/api/effect/direct-messages.js +2 -0
- package/dist/api/effect/direct-messages.js.map +1 -0
- package/dist/api/effect/discovery.d.ts +68 -0
- package/dist/api/effect/discovery.d.ts.map +1 -0
- package/dist/api/effect/discovery.js +2 -0
- package/dist/api/effect/discovery.js.map +1 -0
- package/dist/api/effect/emojis.d.ts +77 -0
- package/dist/api/effect/emojis.d.ts.map +1 -0
- package/dist/api/effect/emojis.js +2 -0
- package/dist/api/effect/emojis.js.map +1 -0
- package/dist/api/effect/events.d.ts +78 -0
- package/dist/api/effect/events.d.ts.map +1 -0
- package/dist/api/effect/events.js +12 -0
- package/dist/api/effect/events.js.map +1 -0
- package/dist/api/effect/failures.d.ts +14 -0
- package/dist/api/effect/failures.d.ts.map +1 -0
- package/dist/api/effect/failures.js +2 -0
- package/dist/api/effect/failures.js.map +1 -0
- package/dist/api/effect/gateway.d.ts +63 -0
- package/dist/api/effect/gateway.d.ts.map +1 -0
- package/dist/api/effect/gateway.js +2 -0
- package/dist/api/effect/gateway.js.map +1 -0
- package/dist/api/effect/guards.d.ts +91 -0
- package/dist/api/effect/guards.d.ts.map +1 -0
- package/dist/api/effect/guards.js +94 -0
- package/dist/api/effect/guards.js.map +1 -0
- package/dist/api/effect/guilds.d.ts +221 -0
- package/dist/api/effect/guilds.d.ts.map +1 -0
- package/dist/api/effect/guilds.js +2 -0
- package/dist/api/effect/guilds.js.map +1 -0
- package/dist/api/effect/helpers.d.ts +300 -0
- package/dist/api/effect/helpers.d.ts.map +1 -0
- package/dist/api/effect/helpers.js +156 -0
- package/dist/api/effect/helpers.js.map +1 -0
- package/dist/api/effect/hierarchy.d.ts +26 -0
- package/dist/api/effect/hierarchy.d.ts.map +1 -0
- package/dist/api/effect/hierarchy.js +26 -0
- package/dist/api/effect/hierarchy.js.map +1 -0
- package/dist/api/effect/instance.d.ts +46 -0
- package/dist/api/effect/instance.d.ts.map +1 -0
- package/dist/api/effect/instance.js +8 -0
- package/dist/api/effect/instance.js.map +1 -0
- package/dist/api/effect/invites.d.ts +49 -0
- package/dist/api/effect/invites.d.ts.map +1 -0
- package/dist/api/effect/invites.js +2 -0
- package/dist/api/effect/invites.js.map +1 -0
- package/dist/api/effect/logging.d.ts +37 -0
- package/dist/api/effect/logging.d.ts.map +1 -0
- package/dist/api/effect/logging.js +2 -0
- package/dist/api/effect/logging.js.map +1 -0
- package/dist/api/effect/members.d.ts +433 -0
- package/dist/api/effect/members.d.ts.map +1 -0
- package/dist/api/effect/members.js +2 -0
- package/dist/api/effect/members.js.map +1 -0
- package/dist/api/effect/messages.d.ts +877 -0
- package/dist/api/effect/messages.d.ts.map +1 -0
- package/dist/api/effect/messages.js +2 -0
- package/dist/api/effect/messages.js.map +1 -0
- package/dist/api/effect/oauth.d.ts +148 -0
- package/dist/api/effect/oauth.d.ts.map +1 -0
- package/dist/api/effect/oauth.js +51 -0
- package/dist/api/effect/oauth.js.map +1 -0
- package/dist/api/effect/permissions.d.ts +41 -0
- package/dist/api/effect/permissions.d.ts.map +1 -0
- package/dist/api/effect/permissions.js +2 -0
- package/dist/api/effect/permissions.js.map +1 -0
- package/dist/api/effect/presence.d.ts +83 -0
- package/dist/api/effect/presence.d.ts.map +1 -0
- package/dist/api/effect/presence.js +2 -0
- package/dist/api/effect/presence.js.map +1 -0
- package/dist/api/effect/rest.d.ts +27 -0
- package/dist/api/effect/rest.d.ts.map +1 -0
- package/dist/api/effect/rest.js +2 -0
- package/dist/api/effect/rest.js.map +1 -0
- package/dist/api/effect/roles.d.ts +104 -0
- package/dist/api/effect/roles.d.ts.map +1 -0
- package/dist/api/effect/roles.js +2 -0
- package/dist/api/effect/roles.js.map +1 -0
- package/dist/api/effect/service.d.ts +76 -0
- package/dist/api/effect/service.d.ts.map +1 -0
- package/dist/api/effect/service.js +79 -0
- package/dist/api/effect/service.js.map +1 -0
- package/dist/api/effect/stickers.d.ts +81 -0
- package/dist/api/effect/stickers.d.ts.map +1 -0
- package/dist/api/effect/stickers.js +2 -0
- package/dist/api/effect/stickers.js.map +1 -0
- package/dist/api/effect/supervisor.d.ts +56 -0
- package/dist/api/effect/supervisor.d.ts.map +1 -0
- package/dist/api/effect/supervisor.js +58 -0
- package/dist/api/effect/supervisor.js.map +1 -0
- package/dist/api/effect/threads.d.ts +154 -0
- package/dist/api/effect/threads.d.ts.map +1 -0
- package/dist/api/effect/threads.js +2 -0
- package/dist/api/effect/threads.js.map +1 -0
- package/dist/api/effect/users.d.ts +62 -0
- package/dist/api/effect/users.d.ts.map +1 -0
- package/dist/api/effect/users.js +2 -0
- package/dist/api/effect/users.js.map +1 -0
- package/dist/api/effect/webhook-client.d.ts +140 -0
- package/dist/api/effect/webhook-client.d.ts.map +1 -0
- package/dist/api/effect/webhook-client.js +50 -0
- package/dist/api/effect/webhook-client.js.map +1 -0
- package/dist/api/effect/webhooks.d.ts +54 -0
- package/dist/api/effect/webhooks.d.ts.map +1 -0
- package/dist/api/effect/webhooks.js +2 -0
- package/dist/api/effect/webhooks.js.map +1 -0
- package/dist/api-errors.d.ts +609 -0
- package/dist/api-errors.d.ts.map +1 -0
- package/dist/api-errors.js +589 -0
- package/dist/api-errors.js.map +1 -0
- package/dist/application.d.ts +85 -0
- package/dist/application.d.ts.map +1 -0
- package/dist/application.js +44 -0
- package/dist/application.js.map +1 -0
- package/dist/assets.d.ts +197 -0
- package/dist/assets.d.ts.map +1 -0
- package/dist/assets.js +419 -0
- package/dist/assets.js.map +1 -0
- package/dist/attachments.d.ts +400 -0
- package/dist/attachments.d.ts.map +1 -0
- package/dist/attachments.js +88 -0
- package/dist/attachments.js.map +1 -0
- package/dist/audit-logs.d.ts +292 -0
- package/dist/audit-logs.d.ts.map +1 -0
- package/dist/audit-logs.js +46 -0
- package/dist/audit-logs.js.map +1 -0
- package/dist/bot-runner.d.ts +69 -0
- package/dist/bot-runner.d.ts.map +1 -0
- package/dist/bot-runner.js +41 -0
- package/dist/bot-runner.js.map +1 -0
- package/dist/builders.d.ts +153 -0
- package/dist/builders.d.ts.map +1 -0
- package/dist/builders.js +326 -0
- package/dist/builders.js.map +1 -0
- package/dist/cache.d.ts +187 -0
- package/dist/cache.d.ts.map +1 -0
- package/dist/cache.js +2 -0
- package/dist/cache.js.map +1 -0
- package/dist/channels.d.ts +903 -0
- package/dist/channels.d.ts.map +1 -0
- package/dist/channels.js +125 -0
- package/dist/channels.js.map +1 -0
- package/dist/cli.d.ts +9 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +65 -0
- package/dist/cli.js.map +1 -0
- package/dist/client.d.ts +645 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +2 -0
- package/dist/client.js.map +1 -0
- package/dist/collectors.d.ts +205 -0
- package/dist/collectors.d.ts.map +1 -0
- package/dist/collectors.js +71 -0
- package/dist/collectors.js.map +1 -0
- package/dist/colors.d.ts +55 -0
- package/dist/colors.d.ts.map +1 -0
- package/dist/colors.js +40 -0
- package/dist/colors.js.map +1 -0
- package/dist/command-arguments.d.ts +353 -0
- package/dist/command-arguments.d.ts.map +1 -0
- package/dist/command-arguments.js +2 -0
- package/dist/command-arguments.js.map +1 -0
- package/dist/command-help.d.ts +54 -0
- package/dist/command-help.d.ts.map +1 -0
- package/dist/command-help.js +2 -0
- package/dist/command-help.js.map +1 -0
- package/dist/commands.d.ts +328 -0
- package/dist/commands.d.ts.map +1 -0
- package/dist/commands.js +62 -0
- package/dist/commands.js.map +1 -0
- package/dist/counts.d.ts +124 -0
- package/dist/counts.d.ts.map +1 -0
- package/dist/counts.js +52 -0
- package/dist/counts.js.map +1 -0
- package/dist/default-commands.d.ts +400 -0
- package/dist/default-commands.d.ts.map +1 -0
- package/dist/default-commands.js +488 -0
- package/dist/default-commands.js.map +1 -0
- package/dist/default-supervisor.d.ts +111 -0
- package/dist/default-supervisor.d.ts.map +1 -0
- package/dist/default-supervisor.js +277 -0
- package/dist/default-supervisor.js.map +1 -0
- package/dist/discovery.d.ts +223 -0
- package/dist/discovery.d.ts.map +1 -0
- package/dist/discovery.js +18 -0
- package/dist/discovery.js.map +1 -0
- package/dist/effect-testing.d.ts +388 -0
- package/dist/effect-testing.d.ts.map +1 -0
- package/dist/effect-testing.js +261 -0
- package/dist/effect-testing.js.map +1 -0
- package/dist/effect.d.ts +220 -0
- package/dist/effect.d.ts.map +1 -0
- package/dist/effect.js +101 -0
- package/dist/effect.js.map +1 -0
- package/dist/embeds.d.ts +243 -0
- package/dist/embeds.d.ts.map +1 -0
- package/dist/embeds.js +2 -0
- package/dist/embeds.js.map +1 -0
- package/dist/error-tools.d.ts +101 -0
- package/dist/error-tools.d.ts.map +1 -0
- package/dist/error-tools.js +125 -0
- package/dist/error-tools.js.map +1 -0
- package/dist/errors.d.ts +386 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +440 -0
- package/dist/errors.js.map +1 -0
- package/dist/events.d.ts +798 -0
- package/dist/events.d.ts.map +1 -0
- package/dist/events.js +2 -0
- package/dist/events.js.map +1 -0
- package/dist/expressions.d.ts +188 -0
- package/dist/expressions.d.ts.map +1 -0
- package/dist/expressions.js +2 -0
- package/dist/expressions.js.map +1 -0
- package/dist/failures.d.ts +53 -0
- package/dist/failures.d.ts.map +1 -0
- package/dist/failures.js +2 -0
- package/dist/failures.js.map +1 -0
- package/dist/gateway.d.ts +48 -0
- package/dist/gateway.d.ts.map +1 -0
- package/dist/gateway.js +60 -0
- package/dist/gateway.js.map +1 -0
- package/dist/guilds.d.ts +923 -0
- package/dist/guilds.d.ts.map +1 -0
- package/dist/guilds.js +204 -0
- package/dist/guilds.js.map +1 -0
- package/dist/helpers.d.ts +423 -0
- package/dist/helpers.d.ts.map +1 -0
- package/dist/helpers.js +434 -0
- package/dist/helpers.js.map +1 -0
- package/dist/index.d.ts +228 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +109 -0
- package/dist/index.js.map +1 -0
- package/dist/input-validation.d.ts +51 -0
- package/dist/input-validation.d.ts.map +1 -0
- package/dist/input-validation.js +34 -0
- package/dist/input-validation.js.map +1 -0
- package/dist/instance.d.ts +101 -0
- package/dist/instance.d.ts.map +1 -0
- package/dist/instance.js +2 -0
- package/dist/instance.js.map +1 -0
- package/dist/internal/agents-section.d.ts +22 -0
- package/dist/internal/agents-section.d.ts.map +1 -0
- package/dist/internal/agents-section.js +101 -0
- package/dist/internal/agents-section.js.map +1 -0
- package/dist/internal/application.d.ts +16 -0
- package/dist/internal/application.d.ts.map +1 -0
- package/dist/internal/application.js +33 -0
- package/dist/internal/application.js.map +1 -0
- package/dist/internal/attachment-refresh.d.ts +18 -0
- package/dist/internal/attachment-refresh.d.ts.map +1 -0
- package/dist/internal/attachment-refresh.js +39 -0
- package/dist/internal/attachment-refresh.js.map +1 -0
- package/dist/internal/attachments.d.ts +45 -0
- package/dist/internal/attachments.d.ts.map +1 -0
- package/dist/internal/attachments.js +230 -0
- package/dist/internal/attachments.js.map +1 -0
- package/dist/internal/audit-logs.d.ts +13 -0
- package/dist/internal/audit-logs.d.ts.map +1 -0
- package/dist/internal/audit-logs.js +295 -0
- package/dist/internal/audit-logs.js.map +1 -0
- package/dist/internal/audit.d.ts +12 -0
- package/dist/internal/audit.d.ts.map +1 -0
- package/dist/internal/audit.js +22 -0
- package/dist/internal/audit.js.map +1 -0
- package/dist/internal/binding/default-adapters.d.ts +22 -0
- package/dist/internal/binding/default-adapters.d.ts.map +1 -0
- package/dist/internal/binding/default-adapters.js +304 -0
- package/dist/internal/binding/default-adapters.js.map +1 -0
- package/dist/internal/binding/default.d.ts +45 -0
- package/dist/internal/binding/default.d.ts.map +1 -0
- package/dist/internal/binding/default.js +86 -0
- package/dist/internal/binding/default.js.map +1 -0
- package/dist/internal/binding/execute.d.ts +51 -0
- package/dist/internal/binding/execute.d.ts.map +1 -0
- package/dist/internal/binding/execute.js +123 -0
- package/dist/internal/binding/execute.js.map +1 -0
- package/dist/internal/binding/native-adapters.d.ts +23 -0
- package/dist/internal/binding/native-adapters.d.ts.map +1 -0
- package/dist/internal/binding/native-adapters.js +90 -0
- package/dist/internal/binding/native-adapters.js.map +1 -0
- package/dist/internal/binding/native.d.ts +41 -0
- package/dist/internal/binding/native.d.ts.map +1 -0
- package/dist/internal/binding/native.js +34 -0
- package/dist/internal/binding/native.js.map +1 -0
- package/dist/internal/binding/operations.d.ts +361 -0
- package/dist/internal/binding/operations.d.ts.map +1 -0
- package/dist/internal/binding/operations.js +272 -0
- package/dist/internal/binding/operations.js.map +1 -0
- package/dist/internal/bot-runner.d.ts +65 -0
- package/dist/internal/bot-runner.d.ts.map +1 -0
- package/dist/internal/bot-runner.js +363 -0
- package/dist/internal/bot-runner.js.map +1 -0
- package/dist/internal/cache-changes.d.ts +43 -0
- package/dist/internal/cache-changes.d.ts.map +1 -0
- package/dist/internal/cache-changes.js +320 -0
- package/dist/internal/cache-changes.js.map +1 -0
- package/dist/internal/cache.d.ts +57 -0
- package/dist/internal/cache.d.ts.map +1 -0
- package/dist/internal/cache.js +318 -0
- package/dist/internal/cache.js.map +1 -0
- package/dist/internal/calls.d.ts +16 -0
- package/dist/internal/calls.d.ts.map +1 -0
- package/dist/internal/calls.js +108 -0
- package/dist/internal/calls.js.map +1 -0
- package/dist/internal/channel-cache.d.ts +69 -0
- package/dist/internal/channel-cache.d.ts.map +1 -0
- package/dist/internal/channel-cache.js +413 -0
- package/dist/internal/channel-cache.js.map +1 -0
- package/dist/internal/channel-decode.d.ts +44 -0
- package/dist/internal/channel-decode.d.ts.map +1 -0
- package/dist/internal/channel-decode.js +377 -0
- package/dist/internal/channel-decode.js.map +1 -0
- package/dist/internal/channels.d.ts +60 -0
- package/dist/internal/channels.d.ts.map +1 -0
- package/dist/internal/channels.js +605 -0
- package/dist/internal/channels.js.map +1 -0
- package/dist/internal/client/backoff.d.ts +42 -0
- package/dist/internal/client/backoff.d.ts.map +1 -0
- package/dist/internal/client/backoff.js +36 -0
- package/dist/internal/client/backoff.js.map +1 -0
- package/dist/internal/client/configuration-fields.d.ts +14 -0
- package/dist/internal/client/configuration-fields.d.ts.map +1 -0
- package/dist/internal/client/configuration-fields.js +11 -0
- package/dist/internal/client/configuration-fields.js.map +1 -0
- package/dist/internal/client/drain.d.ts +33 -0
- package/dist/internal/client/drain.d.ts.map +1 -0
- package/dist/internal/client/drain.js +109 -0
- package/dist/internal/client/drain.js.map +1 -0
- package/dist/internal/client/intake.d.ts +27 -0
- package/dist/internal/client/intake.d.ts.map +1 -0
- package/dist/internal/client/intake.js +198 -0
- package/dist/internal/client/intake.js.map +1 -0
- package/dist/internal/client/lifetime.d.ts +35 -0
- package/dist/internal/client/lifetime.d.ts.map +1 -0
- package/dist/internal/client/lifetime.js +109 -0
- package/dist/internal/client/lifetime.js.map +1 -0
- package/dist/internal/client/shard-loop.d.ts +93 -0
- package/dist/internal/client/shard-loop.d.ts.map +1 -0
- package/dist/internal/client/shard-loop.js +452 -0
- package/dist/internal/client/shard-loop.js.map +1 -0
- package/dist/internal/client-registry.d.ts +26 -0
- package/dist/internal/client-registry.d.ts.map +1 -0
- package/dist/internal/client-registry.js +11 -0
- package/dist/internal/client-registry.js.map +1 -0
- package/dist/internal/client.d.ts +189 -0
- package/dist/internal/client.d.ts.map +1 -0
- package/dist/internal/client.js +1935 -0
- package/dist/internal/client.js.map +1 -0
- package/dist/internal/clock.d.ts +9 -0
- package/dist/internal/clock.d.ts.map +1 -0
- package/dist/internal/clock.js +5 -0
- package/dist/internal/clock.js.map +1 -0
- package/dist/internal/code-catalogue.d.ts +712 -0
- package/dist/internal/code-catalogue.d.ts.map +1 -0
- package/dist/internal/code-catalogue.js +655 -0
- package/dist/internal/code-catalogue.js.map +1 -0
- package/dist/internal/collector.d.ts +34 -0
- package/dist/internal/collector.d.ts.map +1 -0
- package/dist/internal/collector.js +400 -0
- package/dist/internal/collector.js.map +1 -0
- package/dist/internal/command-arguments.d.ts +29 -0
- package/dist/internal/command-arguments.d.ts.map +1 -0
- package/dist/internal/command-arguments.js +484 -0
- package/dist/internal/command-arguments.js.map +1 -0
- package/dist/internal/command-guards.d.ts +57 -0
- package/dist/internal/command-guards.d.ts.map +1 -0
- package/dist/internal/command-guards.js +81 -0
- package/dist/internal/command-guards.js.map +1 -0
- package/dist/internal/command-help.d.ts +15 -0
- package/dist/internal/command-help.d.ts.map +1 -0
- package/dist/internal/command-help.js +121 -0
- package/dist/internal/command-help.js.map +1 -0
- package/dist/internal/commands.d.ts +212 -0
- package/dist/internal/commands.d.ts.map +1 -0
- package/dist/internal/commands.js +1004 -0
- package/dist/internal/commands.js.map +1 -0
- package/dist/internal/configuration.d.ts +86 -0
- package/dist/internal/configuration.d.ts.map +1 -0
- package/dist/internal/configuration.js +401 -0
- package/dist/internal/configuration.js.map +1 -0
- package/dist/internal/counts.d.ts +33 -0
- package/dist/internal/counts.d.ts.map +1 -0
- package/dist/internal/counts.js +348 -0
- package/dist/internal/counts.js.map +1 -0
- package/dist/internal/decode/primitives.d.ts +30 -0
- package/dist/internal/decode/primitives.d.ts.map +1 -0
- package/dist/internal/decode/primitives.js +56 -0
- package/dist/internal/decode/primitives.js.map +1 -0
- package/dist/internal/decode/timestamp.d.ts +13 -0
- package/dist/internal/decode/timestamp.d.ts.map +1 -0
- package/dist/internal/decode/timestamp.js +27 -0
- package/dist/internal/decode/timestamp.js.map +1 -0
- package/dist/internal/decode/trace.d.ts +11 -0
- package/dist/internal/decode/trace.d.ts.map +1 -0
- package/dist/internal/decode/trace.js +69 -0
- package/dist/internal/decode/trace.js.map +1 -0
- package/dist/internal/defects.d.ts +48 -0
- package/dist/internal/defects.d.ts.map +1 -0
- package/dist/internal/defects.js +100 -0
- package/dist/internal/defects.js.map +1 -0
- package/dist/internal/effect-failures.d.ts +12 -0
- package/dist/internal/effect-failures.d.ts.map +1 -0
- package/dist/internal/effect-failures.js +45 -0
- package/dist/internal/effect-failures.js.map +1 -0
- package/dist/internal/embeds.d.ts +12 -0
- package/dist/internal/embeds.d.ts.map +1 -0
- package/dist/internal/embeds.js +308 -0
- package/dist/internal/embeds.js.map +1 -0
- package/dist/internal/events.d.ts +156 -0
- package/dist/internal/events.d.ts.map +1 -0
- package/dist/internal/events.js +1071 -0
- package/dist/internal/events.js.map +1 -0
- package/dist/internal/expiry-queue.d.ts +42 -0
- package/dist/internal/expiry-queue.d.ts.map +1 -0
- package/dist/internal/expiry-queue.js +138 -0
- package/dist/internal/expiry-queue.js.map +1 -0
- package/dist/internal/expressions.d.ts +35 -0
- package/dist/internal/expressions.d.ts.map +1 -0
- package/dist/internal/expressions.js +311 -0
- package/dist/internal/expressions.js.map +1 -0
- package/dist/internal/failures.d.ts +107 -0
- package/dist/internal/failures.d.ts.map +1 -0
- package/dist/internal/failures.js +416 -0
- package/dist/internal/failures.js.map +1 -0
- package/dist/internal/field-text.d.ts +10 -0
- package/dist/internal/field-text.d.ts.map +1 -0
- package/dist/internal/field-text.js +37 -0
- package/dist/internal/field-text.js.map +1 -0
- package/dist/internal/gateway/commands.d.ts +92 -0
- package/dist/internal/gateway/commands.d.ts.map +1 -0
- package/dist/internal/gateway/commands.js +223 -0
- package/dist/internal/gateway/commands.js.map +1 -0
- package/dist/internal/gateway/dispatch-table.d.ts +42 -0
- package/dist/internal/gateway/dispatch-table.d.ts.map +1 -0
- package/dist/internal/gateway/dispatch-table.js +288 -0
- package/dist/internal/gateway/dispatch-table.js.map +1 -0
- package/dist/internal/gateway/event-dispatches.d.ts +97 -0
- package/dist/internal/gateway/event-dispatches.d.ts.map +1 -0
- package/dist/internal/gateway/event-dispatches.js +172 -0
- package/dist/internal/gateway/event-dispatches.js.map +1 -0
- package/dist/internal/gateway/frames.d.ts +45 -0
- package/dist/internal/gateway/frames.d.ts.map +1 -0
- package/dist/internal/gateway/frames.js +121 -0
- package/dist/internal/gateway/frames.js.map +1 -0
- package/dist/internal/gateway/options.d.ts +24 -0
- package/dist/internal/gateway/options.d.ts.map +1 -0
- package/dist/internal/gateway/options.js +103 -0
- package/dist/internal/gateway/options.js.map +1 -0
- package/dist/internal/gateway/session.d.ts +104 -0
- package/dist/internal/gateway/session.d.ts.map +1 -0
- package/dist/internal/gateway/session.js +420 -0
- package/dist/internal/gateway/session.js.map +1 -0
- package/dist/internal/gateway-requests.d.ts +10 -0
- package/dist/internal/gateway-requests.d.ts.map +1 -0
- package/dist/internal/gateway-requests.js +26 -0
- package/dist/internal/gateway-requests.js.map +1 -0
- package/dist/internal/gateway.d.ts +19 -0
- package/dist/internal/gateway.d.ts.map +1 -0
- package/dist/internal/gateway.js +11 -0
- package/dist/internal/gateway.js.map +1 -0
- package/dist/internal/guild-cache.d.ts +69 -0
- package/dist/internal/guild-cache.d.ts.map +1 -0
- package/dist/internal/guild-cache.js +402 -0
- package/dist/internal/guild-cache.js.map +1 -0
- package/dist/internal/guild-discovery.d.ts +15 -0
- package/dist/internal/guild-discovery.d.ts.map +1 -0
- package/dist/internal/guild-discovery.js +258 -0
- package/dist/internal/guild-discovery.js.map +1 -0
- package/dist/internal/guild-lifecycle.d.ts +18 -0
- package/dist/internal/guild-lifecycle.d.ts.map +1 -0
- package/dist/internal/guild-lifecycle.js +119 -0
- package/dist/internal/guild-lifecycle.js.map +1 -0
- package/dist/internal/guild-settings.d.ts +11 -0
- package/dist/internal/guild-settings.d.ts.map +1 -0
- package/dist/internal/guild-settings.js +150 -0
- package/dist/internal/guild-settings.js.map +1 -0
- package/dist/internal/guilds.d.ts +94 -0
- package/dist/internal/guilds.d.ts.map +1 -0
- package/dist/internal/guilds.js +785 -0
- package/dist/internal/guilds.js.map +1 -0
- package/dist/internal/init-command.d.ts +54 -0
- package/dist/internal/init-command.d.ts.map +1 -0
- package/dist/internal/init-command.js +248 -0
- package/dist/internal/init-command.js.map +1 -0
- package/dist/internal/instance.d.ts +69 -0
- package/dist/internal/instance.d.ts.map +1 -0
- package/dist/internal/instance.js +455 -0
- package/dist/internal/instance.js.map +1 -0
- package/dist/internal/invalid-callback-return.d.ts +3 -0
- package/dist/internal/invalid-callback-return.d.ts.map +1 -0
- package/dist/internal/invalid-callback-return.js +26 -0
- package/dist/internal/invalid-callback-return.js.map +1 -0
- package/dist/internal/invites.d.ts +19 -0
- package/dist/internal/invites.d.ts.map +1 -0
- package/dist/internal/invites.js +182 -0
- package/dist/internal/invites.js.map +1 -0
- package/dist/internal/logging.d.ts +129 -0
- package/dist/internal/logging.d.ts.map +1 -0
- package/dist/internal/logging.js +868 -0
- package/dist/internal/logging.js.map +1 -0
- package/dist/internal/logical-scheduler.d.ts +27 -0
- package/dist/internal/logical-scheduler.d.ts.map +1 -0
- package/dist/internal/logical-scheduler.js +102 -0
- package/dist/internal/logical-scheduler.js.map +1 -0
- package/dist/internal/masking.d.ts +13 -0
- package/dist/internal/masking.d.ts.map +1 -0
- package/dist/internal/masking.js +235 -0
- package/dist/internal/masking.js.map +1 -0
- package/dist/internal/member-chunks.d.ts +96 -0
- package/dist/internal/member-chunks.d.ts.map +1 -0
- package/dist/internal/member-chunks.js +557 -0
- package/dist/internal/member-chunks.js.map +1 -0
- package/dist/internal/member-search-workflow.d.ts +19 -0
- package/dist/internal/member-search-workflow.d.ts.map +1 -0
- package/dist/internal/member-search-workflow.js +143 -0
- package/dist/internal/member-search-workflow.js.map +1 -0
- package/dist/internal/member-search.d.ts +20 -0
- package/dist/internal/member-search.d.ts.map +1 -0
- package/dist/internal/member-search.js +201 -0
- package/dist/internal/member-search.js.map +1 -0
- package/dist/internal/message-cleanup.d.ts +9 -0
- package/dist/internal/message-cleanup.d.ts.map +1 -0
- package/dist/internal/message-cleanup.js +368 -0
- package/dist/internal/message-cleanup.js.map +1 -0
- package/dist/internal/message-fields.d.ts +9 -0
- package/dist/internal/message-fields.d.ts.map +1 -0
- package/dist/internal/message-fields.js +55 -0
- package/dist/internal/message-fields.js.map +1 -0
- package/dist/internal/message-search-workflow.d.ts +14 -0
- package/dist/internal/message-search-workflow.d.ts.map +1 -0
- package/dist/internal/message-search-workflow.js +101 -0
- package/dist/internal/message-search-workflow.js.map +1 -0
- package/dist/internal/message-search.d.ts +19 -0
- package/dist/internal/message-search.d.ts.map +1 -0
- package/dist/internal/message-search.js +317 -0
- package/dist/internal/message-search.js.map +1 -0
- package/dist/internal/message.d.ts +34 -0
- package/dist/internal/message.d.ts.map +1 -0
- package/dist/internal/message.js +723 -0
- package/dist/internal/message.js.map +1 -0
- package/dist/internal/metrics.d.ts +16 -0
- package/dist/internal/metrics.d.ts.map +1 -0
- package/dist/internal/metrics.js +49 -0
- package/dist/internal/metrics.js.map +1 -0
- package/dist/internal/moderation.d.ts +20 -0
- package/dist/internal/moderation.d.ts.map +1 -0
- package/dist/internal/moderation.js +219 -0
- package/dist/internal/moderation.js.map +1 -0
- package/dist/internal/multipart.d.ts +10 -0
- package/dist/internal/multipart.d.ts.map +1 -0
- package/dist/internal/multipart.js +156 -0
- package/dist/internal/multipart.js.map +1 -0
- package/dist/internal/node-version.d.ts +10 -0
- package/dist/internal/node-version.d.ts.map +1 -0
- package/dist/internal/node-version.js +21 -0
- package/dist/internal/node-version.js.map +1 -0
- package/dist/internal/oauth.d.ts +29 -0
- package/dist/internal/oauth.d.ts.map +1 -0
- package/dist/internal/oauth.js +721 -0
- package/dist/internal/oauth.js.map +1 -0
- package/dist/internal/observer.d.ts +21 -0
- package/dist/internal/observer.d.ts.map +1 -0
- package/dist/internal/observer.js +48 -0
- package/dist/internal/observer.js.map +1 -0
- package/dist/internal/operation-signal.d.ts +9 -0
- package/dist/internal/operation-signal.d.ts.map +1 -0
- package/dist/internal/operation-signal.js +19 -0
- package/dist/internal/operation-signal.js.map +1 -0
- package/dist/internal/pagination.d.ts +67 -0
- package/dist/internal/pagination.d.ts.map +1 -0
- package/dist/internal/pagination.js +306 -0
- package/dist/internal/pagination.js.map +1 -0
- package/dist/internal/permission-requirements.d.ts +34 -0
- package/dist/internal/permission-requirements.d.ts.map +1 -0
- package/dist/internal/permission-requirements.js +204 -0
- package/dist/internal/permission-requirements.js.map +1 -0
- package/dist/internal/permissions.d.ts +28 -0
- package/dist/internal/permissions.d.ts.map +1 -0
- package/dist/internal/permissions.js +314 -0
- package/dist/internal/permissions.js.map +1 -0
- package/dist/internal/pins.d.ts +24 -0
- package/dist/internal/pins.d.ts.map +1 -0
- package/dist/internal/pins.js +83 -0
- package/dist/internal/pins.js.map +1 -0
- package/dist/internal/presence.d.ts +101 -0
- package/dist/internal/presence.d.ts.map +1 -0
- package/dist/internal/presence.js +581 -0
- package/dist/internal/presence.js.map +1 -0
- package/dist/internal/protocol/gateway.d.ts +116 -0
- package/dist/internal/protocol/gateway.d.ts.map +1 -0
- package/dist/internal/protocol/gateway.js +258 -0
- package/dist/internal/protocol/gateway.js.map +1 -0
- package/dist/internal/rate-limit-templates.d.ts +2 -0
- package/dist/internal/rate-limit-templates.d.ts.map +1 -0
- package/dist/internal/rate-limit-templates.js +132 -0
- package/dist/internal/rate-limit-templates.js.map +1 -0
- package/dist/internal/rate-limits.d.ts +32 -0
- package/dist/internal/rate-limits.d.ts.map +1 -0
- package/dist/internal/rate-limits.js +306 -0
- package/dist/internal/rate-limits.js.map +1 -0
- package/dist/internal/reaction-collector.d.ts +39 -0
- package/dist/internal/reaction-collector.d.ts.map +1 -0
- package/dist/internal/reaction-collector.js +441 -0
- package/dist/internal/reaction-collector.js.map +1 -0
- package/dist/internal/reaction-pages.d.ts +18 -0
- package/dist/internal/reaction-pages.d.ts.map +1 -0
- package/dist/internal/reaction-pages.js +213 -0
- package/dist/internal/reaction-pages.js.map +1 -0
- package/dist/internal/reactions.d.ts +30 -0
- package/dist/internal/reactions.d.ts.map +1 -0
- package/dist/internal/reactions.js +160 -0
- package/dist/internal/reactions.js.map +1 -0
- package/dist/internal/rejection-scope.d.ts +25 -0
- package/dist/internal/rejection-scope.d.ts.map +1 -0
- package/dist/internal/rejection-scope.js +103 -0
- package/dist/internal/rejection-scope.js.map +1 -0
- package/dist/internal/response-json.d.ts +12 -0
- package/dist/internal/response-json.d.ts.map +1 -0
- package/dist/internal/response-json.js +74 -0
- package/dist/internal/response-json.js.map +1 -0
- package/dist/internal/rest/admission.d.ts +77 -0
- package/dist/internal/rest/admission.d.ts.map +1 -0
- package/dist/internal/rest/admission.js +178 -0
- package/dist/internal/rest/admission.js.map +1 -0
- package/dist/internal/rest/attempt.d.ts +124 -0
- package/dist/internal/rest/attempt.d.ts.map +1 -0
- package/dist/internal/rest/attempt.js +410 -0
- package/dist/internal/rest/attempt.js.map +1 -0
- package/dist/internal/rest/classify.d.ts +93 -0
- package/dist/internal/rest/classify.d.ts.map +1 -0
- package/dist/internal/rest/classify.js +304 -0
- package/dist/internal/rest/classify.js.map +1 -0
- package/dist/internal/rest/download.d.ts +66 -0
- package/dist/internal/rest/download.d.ts.map +1 -0
- package/dist/internal/rest/download.js +552 -0
- package/dist/internal/rest/download.js.map +1 -0
- package/dist/internal/rest/options.d.ts +42 -0
- package/dist/internal/rest/options.d.ts.map +1 -0
- package/dist/internal/rest/options.js +99 -0
- package/dist/internal/rest/options.js.map +1 -0
- package/dist/internal/rest/owner.d.ts +154 -0
- package/dist/internal/rest/owner.d.ts.map +1 -0
- package/dist/internal/rest/owner.js +1292 -0
- package/dist/internal/rest/owner.js.map +1 -0
- package/dist/internal/rest/request.d.ts +31 -0
- package/dist/internal/rest/request.d.ts.map +1 -0
- package/dist/internal/rest/request.js +227 -0
- package/dist/internal/rest/request.js.map +1 -0
- package/dist/internal/rest.d.ts +10 -0
- package/dist/internal/rest.d.ts.map +1 -0
- package/dist/internal/rest.js +9 -0
- package/dist/internal/rest.js.map +1 -0
- package/dist/internal/retention-age.d.ts +11 -0
- package/dist/internal/retention-age.d.ts.map +1 -0
- package/dist/internal/retention-age.js +29 -0
- package/dist/internal/retention-age.js.map +1 -0
- package/dist/internal/role-hierarchy-workflow.d.ts +15 -0
- package/dist/internal/role-hierarchy-workflow.d.ts.map +1 -0
- package/dist/internal/role-hierarchy-workflow.js +122 -0
- package/dist/internal/role-hierarchy-workflow.js.map +1 -0
- package/dist/internal/role-hierarchy.d.ts +11 -0
- package/dist/internal/role-hierarchy.d.ts.map +1 -0
- package/dist/internal/role-hierarchy.js +87 -0
- package/dist/internal/role-hierarchy.js.map +1 -0
- package/dist/internal/scheduled-tasks.d.ts +46 -0
- package/dist/internal/scheduled-tasks.d.ts.map +1 -0
- package/dist/internal/scheduled-tasks.js +190 -0
- package/dist/internal/scheduled-tasks.js.map +1 -0
- package/dist/internal/sharding.d.ts +62 -0
- package/dist/internal/sharding.d.ts.map +1 -0
- package/dist/internal/sharding.js +205 -0
- package/dist/internal/sharding.js.map +1 -0
- package/dist/internal/starter-project.d.ts +27 -0
- package/dist/internal/starter-project.d.ts.map +1 -0
- package/dist/internal/starter-project.js +224 -0
- package/dist/internal/starter-project.js.map +1 -0
- package/dist/internal/suggest.d.ts +12 -0
- package/dist/internal/suggest.d.ts.map +1 -0
- package/dist/internal/suggest.js +51 -0
- package/dist/internal/suggest.js.map +1 -0
- package/dist/internal/supervisor.d.ts +95 -0
- package/dist/internal/supervisor.d.ts.map +1 -0
- package/dist/internal/supervisor.js +1829 -0
- package/dist/internal/supervisor.js.map +1 -0
- package/dist/internal/testing/discovery.d.ts +24 -0
- package/dist/internal/testing/discovery.d.ts.map +1 -0
- package/dist/internal/testing/discovery.js +22 -0
- package/dist/internal/testing/discovery.js.map +1 -0
- package/dist/internal/testing/errors.d.ts +43 -0
- package/dist/internal/testing/errors.d.ts.map +1 -0
- package/dist/internal/testing/errors.js +63 -0
- package/dist/internal/testing/errors.js.map +1 -0
- package/dist/internal/testing/fixtures.d.ts +477 -0
- package/dist/internal/testing/fixtures.d.ts.map +1 -0
- package/dist/internal/testing/fixtures.js +233 -0
- package/dist/internal/testing/fixtures.js.map +1 -0
- package/dist/internal/testing/gateway.d.ts +51 -0
- package/dist/internal/testing/gateway.d.ts.map +1 -0
- package/dist/internal/testing/gateway.js +265 -0
- package/dist/internal/testing/gateway.js.map +1 -0
- package/dist/internal/testing/harness.d.ts +60 -0
- package/dist/internal/testing/harness.d.ts.map +1 -0
- package/dist/internal/testing/harness.js +280 -0
- package/dist/internal/testing/harness.js.map +1 -0
- package/dist/internal/testing/http.d.ts +31 -0
- package/dist/internal/testing/http.d.ts.map +1 -0
- package/dist/internal/testing/http.js +347 -0
- package/dist/internal/testing/http.js.map +1 -0
- package/dist/internal/testing/types.d.ts +222 -0
- package/dist/internal/testing/types.d.ts.map +1 -0
- package/dist/internal/testing/types.js +2 -0
- package/dist/internal/testing/types.js.map +1 -0
- package/dist/internal/testing/wait.d.ts +16 -0
- package/dist/internal/testing/wait.d.ts.map +1 -0
- package/dist/internal/testing/wait.js +55 -0
- package/dist/internal/testing/wait.js.map +1 -0
- package/dist/internal/thread-events.d.ts +40 -0
- package/dist/internal/thread-events.d.ts.map +1 -0
- package/dist/internal/thread-events.js +121 -0
- package/dist/internal/thread-events.js.map +1 -0
- package/dist/internal/threads.d.ts +47 -0
- package/dist/internal/threads.d.ts.map +1 -0
- package/dist/internal/threads.js +587 -0
- package/dist/internal/threads.js.map +1 -0
- package/dist/internal/transfer-source.d.ts +29 -0
- package/dist/internal/transfer-source.d.ts.map +1 -0
- package/dist/internal/transfer-source.js +347 -0
- package/dist/internal/transfer-source.js.map +1 -0
- package/dist/internal/transport/http.d.ts +12 -0
- package/dist/internal/transport/http.d.ts.map +1 -0
- package/dist/internal/transport/http.js +44 -0
- package/dist/internal/transport/http.js.map +1 -0
- package/dist/internal/transport/index.d.ts +21 -0
- package/dist/internal/transport/index.d.ts.map +1 -0
- package/dist/internal/transport/index.js +15 -0
- package/dist/internal/transport/index.js.map +1 -0
- package/dist/internal/transport/socket.d.ts +51 -0
- package/dist/internal/transport/socket.d.ts.map +1 -0
- package/dist/internal/transport/socket.js +27 -0
- package/dist/internal/transport/socket.js.map +1 -0
- package/dist/internal/transport/user-agent.d.ts +7 -0
- package/dist/internal/transport/user-agent.d.ts.map +1 -0
- package/dist/internal/transport/user-agent.js +42 -0
- package/dist/internal/transport/user-agent.js.map +1 -0
- package/dist/internal/uploads.d.ts +23 -0
- package/dist/internal/uploads.d.ts.map +1 -0
- package/dist/internal/uploads.js +89 -0
- package/dist/internal/uploads.js.map +1 -0
- package/dist/internal/user-cache.d.ts +50 -0
- package/dist/internal/user-cache.d.ts.map +1 -0
- package/dist/internal/user-cache.js +273 -0
- package/dist/internal/user-cache.js.map +1 -0
- package/dist/internal/users.d.ts +41 -0
- package/dist/internal/users.d.ts.map +1 -0
- package/dist/internal/users.js +333 -0
- package/dist/internal/users.js.map +1 -0
- package/dist/internal/vanity-url.d.ts +11 -0
- package/dist/internal/vanity-url.d.ts.map +1 -0
- package/dist/internal/vanity-url.js +58 -0
- package/dist/internal/vanity-url.js.map +1 -0
- package/dist/internal/webhooks.d.ts +58 -0
- package/dist/internal/webhooks.d.ts.map +1 -0
- package/dist/internal/webhooks.js +490 -0
- package/dist/internal/webhooks.js.map +1 -0
- package/dist/invites.d.ts +86 -0
- package/dist/invites.d.ts.map +1 -0
- package/dist/invites.js +2 -0
- package/dist/invites.js.map +1 -0
- package/dist/logging.d.ts +228 -0
- package/dist/logging.d.ts.map +1 -0
- package/dist/logging.js +2 -0
- package/dist/logging.js.map +1 -0
- package/dist/member-chunks.d.ts +145 -0
- package/dist/member-chunks.d.ts.map +1 -0
- package/dist/member-chunks.js +68 -0
- package/dist/member-chunks.js.map +1 -0
- package/dist/member-search.d.ts +140 -0
- package/dist/member-search.d.ts.map +1 -0
- package/dist/member-search.js +14 -0
- package/dist/member-search.js.map +1 -0
- package/dist/message-cleanup.d.ts +227 -0
- package/dist/message-cleanup.d.ts.map +1 -0
- package/dist/message-cleanup.js +101 -0
- package/dist/message-cleanup.js.map +1 -0
- package/dist/message-errors.d.ts +172 -0
- package/dist/message-errors.d.ts.map +1 -0
- package/dist/message-errors.js +173 -0
- package/dist/message-errors.js.map +1 -0
- package/dist/message-search.d.ts +201 -0
- package/dist/message-search.d.ts.map +1 -0
- package/dist/message-search.js +2 -0
- package/dist/message-search.js.map +1 -0
- package/dist/messages.d.ts +694 -0
- package/dist/messages.d.ts.map +1 -0
- package/dist/messages.js +37 -0
- package/dist/messages.js.map +1 -0
- package/dist/native-commands.d.ts +451 -0
- package/dist/native-commands.d.ts.map +1 -0
- package/dist/native-commands.js +432 -0
- package/dist/native-commands.js.map +1 -0
- package/dist/native-supervisor.d.ts +125 -0
- package/dist/native-supervisor.d.ts.map +1 -0
- package/dist/native-supervisor.js +126 -0
- package/dist/native-supervisor.js.map +1 -0
- package/dist/oauth.d.ts +298 -0
- package/dist/oauth.d.ts.map +1 -0
- package/dist/oauth.js +128 -0
- package/dist/oauth.js.map +1 -0
- package/dist/observer.d.ts +111 -0
- package/dist/observer.d.ts.map +1 -0
- package/dist/observer.js +2 -0
- package/dist/observer.js.map +1 -0
- package/dist/pagination.d.ts +117 -0
- package/dist/pagination.d.ts.map +1 -0
- package/dist/pagination.js +61 -0
- package/dist/pagination.js.map +1 -0
- package/dist/permissions.d.ts +73 -0
- package/dist/permissions.d.ts.map +1 -0
- package/dist/permissions.js +2 -0
- package/dist/permissions.js.map +1 -0
- package/dist/pins.d.ts +62 -0
- package/dist/pins.d.ts.map +1 -0
- package/dist/pins.js +2 -0
- package/dist/pins.js.map +1 -0
- package/dist/presence.d.ts +84 -0
- package/dist/presence.d.ts.map +1 -0
- package/dist/presence.js +46 -0
- package/dist/presence.js.map +1 -0
- package/dist/reaction-pages.d.ts +99 -0
- package/dist/reaction-pages.d.ts.map +1 -0
- package/dist/reaction-pages.js +2 -0
- package/dist/reaction-pages.js.map +1 -0
- package/dist/reactions.d.ts +118 -0
- package/dist/reactions.d.ts.map +1 -0
- package/dist/reactions.js +2 -0
- package/dist/reactions.js.map +1 -0
- package/dist/rest.d.ts +260 -0
- package/dist/rest.d.ts.map +1 -0
- package/dist/rest.js +46 -0
- package/dist/rest.js.map +1 -0
- package/dist/role-hierarchy.d.ts +81 -0
- package/dist/role-hierarchy.d.ts.map +1 -0
- package/dist/role-hierarchy.js +53 -0
- package/dist/role-hierarchy.js.map +1 -0
- package/dist/sharding.d.ts +219 -0
- package/dist/sharding.d.ts.map +1 -0
- package/dist/sharding.js +86 -0
- package/dist/sharding.js.map +1 -0
- package/dist/supervisor.d.ts +392 -0
- package/dist/supervisor.d.ts.map +1 -0
- package/dist/supervisor.js +101 -0
- package/dist/supervisor.js.map +1 -0
- package/dist/testing.d.ts +258 -0
- package/dist/testing.d.ts.map +1 -0
- package/dist/testing.js +202 -0
- package/dist/testing.js.map +1 -0
- package/dist/text.d.ts +38 -0
- package/dist/text.d.ts.map +1 -0
- package/dist/text.js +46 -0
- package/dist/text.js.map +1 -0
- package/dist/threads.d.ts +258 -0
- package/dist/threads.d.ts.map +1 -0
- package/dist/threads.js +2 -0
- package/dist/threads.js.map +1 -0
- package/dist/users.d.ts +204 -0
- package/dist/users.d.ts.map +1 -0
- package/dist/users.js +44 -0
- package/dist/users.js.map +1 -0
- package/dist/webhooks.d.ts +423 -0
- package/dist/webhooks.d.ts.map +1 -0
- package/dist/webhooks.js +68 -0
- package/dist/webhooks.js.map +1 -0
- package/esm-only.cjs +3 -0
- package/examples/starter/bot-effect.ts +17 -0
- package/examples/starter/bot.js +13 -0
- package/examples/starter/bot.ts +13 -0
- package/package.json +82 -0
- package/src/api/default/application.ts +40 -0
- package/src/api/default/attachments.ts +106 -0
- package/src/api/default/audit-logs.ts +58 -0
- package/src/api/default/bot.ts +586 -0
- package/src/api/default/cache.ts +106 -0
- package/src/api/default/channels.ts +317 -0
- package/src/api/default/client.ts +829 -0
- package/src/api/default/collectors.ts +81 -0
- package/src/api/default/commands.ts +92 -0
- package/src/api/default/direct-messages.ts +143 -0
- package/src/api/default/discovery.ts +103 -0
- package/src/api/default/emojis.ts +125 -0
- package/src/api/default/events.ts +144 -0
- package/src/api/default/gateway.ts +67 -0
- package/src/api/default/guards.ts +173 -0
- package/src/api/default/guilds.ts +271 -0
- package/src/api/default/helpers.ts +97 -0
- package/src/api/default/instance.ts +49 -0
- package/src/api/default/invites.ts +73 -0
- package/src/api/default/logging.ts +37 -0
- package/src/api/default/members.ts +550 -0
- package/src/api/default/messages.ts +1053 -0
- package/src/api/default/oauth.ts +293 -0
- package/src/api/default/permissions.ts +47 -0
- package/src/api/default/presence.ts +88 -0
- package/src/api/default/rest.ts +30 -0
- package/src/api/default/results.ts +44 -0
- package/src/api/default/roles.ts +154 -0
- package/src/api/default/stickers.ts +129 -0
- package/src/api/default/supervisor.ts +53 -0
- package/src/api/default/threads.ts +233 -0
- package/src/api/default/users.ts +82 -0
- package/src/api/default/webhook-client.ts +266 -0
- package/src/api/default/webhooks.ts +89 -0
- package/src/api/effect/application.ts +29 -0
- package/src/api/effect/attachments.ts +100 -0
- package/src/api/effect/audit-logs.ts +50 -0
- package/src/api/effect/bot.ts +546 -0
- package/src/api/effect/cache.ts +110 -0
- package/src/api/effect/channels.ts +293 -0
- package/src/api/effect/client.ts +792 -0
- package/src/api/effect/collectors.ts +103 -0
- package/src/api/effect/commands.ts +87 -0
- package/src/api/effect/direct-messages.ts +119 -0
- package/src/api/effect/discovery.ts +87 -0
- package/src/api/effect/emojis.ts +108 -0
- package/src/api/effect/events.ts +92 -0
- package/src/api/effect/failures.ts +14 -0
- package/src/api/effect/gateway.ts +63 -0
- package/src/api/effect/guards.ts +194 -0
- package/src/api/effect/guilds.ts +247 -0
- package/src/api/effect/helpers.ts +359 -0
- package/src/api/effect/hierarchy.ts +26 -0
- package/src/api/effect/instance.ts +50 -0
- package/src/api/effect/invites.ts +59 -0
- package/src/api/effect/logging.ts +37 -0
- package/src/api/effect/members.ts +521 -0
- package/src/api/effect/messages.ts +1003 -0
- package/src/api/effect/oauth.ts +208 -0
- package/src/api/effect/permissions.ts +44 -0
- package/src/api/effect/presence.ts +83 -0
- package/src/api/effect/rest.ts +27 -0
- package/src/api/effect/roles.ts +136 -0
- package/src/api/effect/service.ts +104 -0
- package/src/api/effect/stickers.ts +112 -0
- package/src/api/effect/supervisor.ts +58 -0
- package/src/api/effect/threads.ts +221 -0
- package/src/api/effect/users.ts +66 -0
- package/src/api/effect/webhook-client.ts +206 -0
- package/src/api/effect/webhooks.ts +75 -0
- package/src/api-errors.ts +985 -0
- package/src/application.ts +103 -0
- package/src/assets.ts +731 -0
- package/src/attachments.ts +469 -0
- package/src/audit-logs.ts +355 -0
- package/src/bot-runner.ts +91 -0
- package/src/builders.ts +390 -0
- package/src/cache.ts +190 -0
- package/src/channels.ts +1051 -0
- package/src/cli.ts +60 -0
- package/src/client.ts +663 -0
- package/src/collectors.ts +248 -0
- package/src/colors.ts +91 -0
- package/src/command-arguments.ts +432 -0
- package/src/command-help.ts +55 -0
- package/src/commands.ts +403 -0
- package/src/counts.ts +160 -0
- package/src/default-commands.ts +1147 -0
- package/src/default-supervisor.ts +484 -0
- package/src/discovery.ts +241 -0
- package/src/effect-testing.ts +603 -0
- package/src/effect.ts +751 -0
- package/src/embeds.ts +253 -0
- package/src/error-tools.ts +191 -0
- package/src/errors.ts +849 -0
- package/src/events.ts +830 -0
- package/src/expressions.ts +198 -0
- package/src/failures.ts +55 -0
- package/src/gateway.ts +86 -0
- package/src/guilds.ts +1108 -0
- package/src/helpers.ts +836 -0
- package/src/index.ts +796 -0
- package/src/input-validation.ts +94 -0
- package/src/instance.ts +111 -0
- package/src/internal/agents-section.ts +114 -0
- package/src/internal/application.ts +51 -0
- package/src/internal/attachment-refresh.ts +57 -0
- package/src/internal/attachments.ts +313 -0
- package/src/internal/audit-logs.ts +336 -0
- package/src/internal/audit.ts +33 -0
- package/src/internal/binding/default-adapters.ts +482 -0
- package/src/internal/binding/default.ts +155 -0
- package/src/internal/binding/execute.ts +221 -0
- package/src/internal/binding/native-adapters.ts +199 -0
- package/src/internal/binding/native.ts +72 -0
- package/src/internal/binding/operations.ts +1171 -0
- package/src/internal/bot-runner.ts +480 -0
- package/src/internal/cache-changes.ts +363 -0
- package/src/internal/cache.ts +323 -0
- package/src/internal/calls.ts +119 -0
- package/src/internal/channel-cache.ts +435 -0
- package/src/internal/channel-decode.ts +399 -0
- package/src/internal/channels.ts +874 -0
- package/src/internal/client/backoff.ts +69 -0
- package/src/internal/client/configuration-fields.ts +18 -0
- package/src/internal/client/drain.ts +150 -0
- package/src/internal/client/intake.ts +228 -0
- package/src/internal/client/lifetime.ts +165 -0
- package/src/internal/client/shard-loop.ts +586 -0
- package/src/internal/client-registry.ts +35 -0
- package/src/internal/client.ts +2448 -0
- package/src/internal/clock.ts +11 -0
- package/src/internal/code-catalogue.ts +739 -0
- package/src/internal/collector.ts +452 -0
- package/src/internal/command-arguments.ts +585 -0
- package/src/internal/command-guards.ts +96 -0
- package/src/internal/command-help.ts +156 -0
- package/src/internal/commands.ts +1319 -0
- package/src/internal/configuration.ts +529 -0
- package/src/internal/counts.ts +471 -0
- package/src/internal/decode/primitives.ts +67 -0
- package/src/internal/decode/timestamp.ts +29 -0
- package/src/internal/decode/trace.ts +65 -0
- package/src/internal/defects.ts +115 -0
- package/src/internal/effect-failures.ts +65 -0
- package/src/internal/embeds.ts +355 -0
- package/src/internal/events.ts +1345 -0
- package/src/internal/expiry-queue.ts +148 -0
- package/src/internal/expressions.ts +415 -0
- package/src/internal/failures.ts +492 -0
- package/src/internal/field-text.ts +40 -0
- package/src/internal/gateway/commands.ts +328 -0
- package/src/internal/gateway/dispatch-table.ts +383 -0
- package/src/internal/gateway/event-dispatches.ts +201 -0
- package/src/internal/gateway/frames.ts +176 -0
- package/src/internal/gateway/options.ts +144 -0
- package/src/internal/gateway/session.ts +625 -0
- package/src/internal/gateway-requests.ts +26 -0
- package/src/internal/gateway.ts +22 -0
- package/src/internal/guild-cache.ts +424 -0
- package/src/internal/guild-discovery.ts +332 -0
- package/src/internal/guild-lifecycle.ts +128 -0
- package/src/internal/guild-settings.ts +209 -0
- package/src/internal/guilds.ts +949 -0
- package/src/internal/init-command.ts +305 -0
- package/src/internal/instance.ts +645 -0
- package/src/internal/invalid-callback-return.ts +28 -0
- package/src/internal/invites.ts +234 -0
- package/src/internal/logging.ts +1007 -0
- package/src/internal/logical-scheduler.ts +139 -0
- package/src/internal/masking.ts +224 -0
- package/src/internal/member-chunks.ts +649 -0
- package/src/internal/member-search-workflow.ts +237 -0
- package/src/internal/member-search.ts +272 -0
- package/src/internal/message-cleanup.ts +515 -0
- package/src/internal/message-fields.ts +71 -0
- package/src/internal/message-search-workflow.ts +166 -0
- package/src/internal/message-search.ts +476 -0
- package/src/internal/message.ts +879 -0
- package/src/internal/metrics.ts +55 -0
- package/src/internal/moderation.ts +288 -0
- package/src/internal/multipart.ts +171 -0
- package/src/internal/node-version.ts +22 -0
- package/src/internal/oauth.ts +1146 -0
- package/src/internal/observer.ts +62 -0
- package/src/internal/operation-signal.ts +26 -0
- package/src/internal/pagination.ts +494 -0
- package/src/internal/permission-requirements.ts +359 -0
- package/src/internal/permissions.ts +417 -0
- package/src/internal/pins.ts +115 -0
- package/src/internal/presence.ts +745 -0
- package/src/internal/protocol/gateway.ts +299 -0
- package/src/internal/rate-limit-templates.ts +138 -0
- package/src/internal/rate-limits.ts +346 -0
- package/src/internal/reaction-collector.ts +499 -0
- package/src/internal/reaction-pages.ts +260 -0
- package/src/internal/reactions.ts +174 -0
- package/src/internal/rejection-scope.ts +119 -0
- package/src/internal/response-json.ts +76 -0
- package/src/internal/rest/admission.ts +210 -0
- package/src/internal/rest/attempt.ts +617 -0
- package/src/internal/rest/classify.ts +391 -0
- package/src/internal/rest/download.ts +658 -0
- package/src/internal/rest/options.ts +145 -0
- package/src/internal/rest/owner.ts +1828 -0
- package/src/internal/rest/request.ts +289 -0
- package/src/internal/rest.ts +9 -0
- package/src/internal/retention-age.ts +33 -0
- package/src/internal/role-hierarchy-workflow.ts +150 -0
- package/src/internal/role-hierarchy.ts +93 -0
- package/src/internal/scheduled-tasks.ts +217 -0
- package/src/internal/sharding.ts +270 -0
- package/src/internal/starter-project.ts +251 -0
- package/src/internal/suggest.ts +50 -0
- package/src/internal/supervisor.ts +2253 -0
- package/src/internal/testing/discovery.ts +23 -0
- package/src/internal/testing/errors.ts +67 -0
- package/src/internal/testing/fixtures.ts +714 -0
- package/src/internal/testing/gateway.ts +305 -0
- package/src/internal/testing/harness.ts +328 -0
- package/src/internal/testing/http.ts +395 -0
- package/src/internal/testing/types.ts +240 -0
- package/src/internal/testing/wait.ts +63 -0
- package/src/internal/thread-events.ts +128 -0
- package/src/internal/threads.ts +718 -0
- package/src/internal/transfer-source.ts +359 -0
- package/src/internal/transport/http.ts +46 -0
- package/src/internal/transport/index.ts +23 -0
- package/src/internal/transport/socket.ts +71 -0
- package/src/internal/transport/user-agent.ts +46 -0
- package/src/internal/uploads.ts +111 -0
- package/src/internal/user-cache.ts +294 -0
- package/src/internal/users.ts +402 -0
- package/src/internal/vanity-url.ts +80 -0
- package/src/internal/webhooks.ts +690 -0
- package/src/invites.ts +87 -0
- package/src/logging.ts +247 -0
- package/src/member-chunks.ts +195 -0
- package/src/member-search.ts +152 -0
- package/src/message-cleanup.ts +308 -0
- package/src/message-errors.ts +245 -0
- package/src/message-search.ts +213 -0
- package/src/messages.ts +768 -0
- package/src/native-commands.ts +1249 -0
- package/src/native-supervisor.ts +345 -0
- package/src/oauth.ts +413 -0
- package/src/observer.ts +118 -0
- package/src/pagination.ts +172 -0
- package/src/permissions.ts +74 -0
- package/src/pins.ts +65 -0
- package/src/presence.ts +124 -0
- package/src/reaction-pages.ts +106 -0
- package/src/reactions.ts +126 -0
- package/src/rest.ts +282 -0
- package/src/role-hierarchy.ts +127 -0
- package/src/sharding.ts +272 -0
- package/src/supervisor.ts +460 -0
- package/src/testing.ts +424 -0
- package/src/text.ts +76 -0
- package/src/threads.ts +274 -0
- package/src/users.ts +237 -0
- package/src/webhooks.ts +512 -0
package/src/errors.ts
ADDED
|
@@ -0,0 +1,849 @@
|
|
|
1
|
+
import type { ApiErrorDetail } from "./api-errors.js"
|
|
2
|
+
import type { InputValidationDetail } from "./input-validation.js"
|
|
3
|
+
import { CloseCode, closeCodeInfo } from "#sdk/internal/protocol/gateway"
|
|
4
|
+
import { describeValue, errorSummary, maskText } from "#sdk/internal/masking"
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Settings shared by SDK error constructors
|
|
8
|
+
*
|
|
9
|
+
* @category Errors
|
|
10
|
+
*/
|
|
11
|
+
export interface FluxerlyErrorOptions {
|
|
12
|
+
/** Stable dotted identifier for this failure, such as configuration.invalid or guild.rateLimit */
|
|
13
|
+
readonly code: string
|
|
14
|
+
/** Actionable next step for a person reading the error, when the SDK can suggest one */
|
|
15
|
+
readonly hint?: string | undefined
|
|
16
|
+
/** Underlying failure, exposed as the standard ES2022 cause property */
|
|
17
|
+
readonly cause?: unknown
|
|
18
|
+
/** Safe structured facts about the failure, without credentials or private payloads */
|
|
19
|
+
readonly details?: Readonly<Record<string, unknown>> | undefined
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* The JSON form of an SDK error, produced by toJSON. Credential patterns are masked in error names and messages,
|
|
24
|
+
* including summarized causes. SDK codes remain fixed identifiers
|
|
25
|
+
*
|
|
26
|
+
* @category Errors
|
|
27
|
+
*/
|
|
28
|
+
export interface FluxerlyErrorJson {
|
|
29
|
+
/** Error class discriminator, such as GuildOperationError */
|
|
30
|
+
readonly _tag: string
|
|
31
|
+
/** Error name, normally equal to _tag */
|
|
32
|
+
readonly name: string
|
|
33
|
+
/** Stable dotted failure code */
|
|
34
|
+
readonly code: string
|
|
35
|
+
/** Human-readable message */
|
|
36
|
+
readonly message: string
|
|
37
|
+
/** Actionable next step, when available */
|
|
38
|
+
readonly hint?: string
|
|
39
|
+
/** Safe structured facts about the failure */
|
|
40
|
+
readonly details: Readonly<Record<string, unknown>>
|
|
41
|
+
/** Summary of the underlying cause, when one was retained */
|
|
42
|
+
readonly cause?:
|
|
43
|
+
| FluxerlyErrorJson
|
|
44
|
+
| {
|
|
45
|
+
/** Name of a non-SDK cause, or Non-Error value (string) and similar for a cause that is not an Error */
|
|
46
|
+
readonly name: string
|
|
47
|
+
/** Message of a non-SDK cause, or its text form when it is not an Error */
|
|
48
|
+
readonly message: string
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
function causeJson(cause: unknown, depth: number): NonNullable<FluxerlyErrorJson["cause"]> {
|
|
53
|
+
try {
|
|
54
|
+
if (cause instanceof FluxerlyError && depth < 5) return errorJson(cause, depth + 1)
|
|
55
|
+
if (cause instanceof Error)
|
|
56
|
+
return { name: maskText(String(cause.name)), message: maskText(String(cause.message)) }
|
|
57
|
+
} catch {
|
|
58
|
+
// allow-silent: an Error whose name or message getters throw is summarized by the guarded fallback below
|
|
59
|
+
}
|
|
60
|
+
return {
|
|
61
|
+
name: `Non-Error value (${cause === null ? "null" : typeof cause})`,
|
|
62
|
+
message: maskText(describeValue(cause)),
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
function errorJson(error: FluxerlyError, depth: number): FluxerlyErrorJson {
|
|
67
|
+
return {
|
|
68
|
+
_tag: error._tag,
|
|
69
|
+
name: maskText(error.name),
|
|
70
|
+
code: error.code,
|
|
71
|
+
message: maskText(error.message),
|
|
72
|
+
...(error.hint === undefined ? {} : { hint: error.hint }),
|
|
73
|
+
details: error.details,
|
|
74
|
+
...(error.cause === undefined ? {} : { cause: causeJson(error.cause, depth) }),
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Base class for every error the SDK returns, throws or reports, in both entry points.
|
|
80
|
+
* Narrow a specific failure with its readonly _tag, read code for a stable identifier and hint for a suggested fix.
|
|
81
|
+
* The standard cause property keeps the underlying failure when the SDK retained one, and details holds safe structured facts.
|
|
82
|
+
* Messages the SDK writes and details never include tokens or other credentials.
|
|
83
|
+
* ApplicationError and SdkDefect messages quote application-supplied error text with credential patterns masked, while
|
|
84
|
+
* the cause property keeps the original value unchanged.
|
|
85
|
+
* Use describeError for a readable multi-line summary, and toJSON for a structured summary whose names and messages,
|
|
86
|
+
* including those in the cause chain, have credential patterns masked. Built-in JSON log output uses the LogRecord shape instead
|
|
87
|
+
*
|
|
88
|
+
* @category Errors
|
|
89
|
+
*/
|
|
90
|
+
export abstract class FluxerlyError extends Error {
|
|
91
|
+
/** Discriminator that identifies the concrete error class */
|
|
92
|
+
abstract readonly _tag: string
|
|
93
|
+
/** Stable dotted identifier for this failure, suitable for alerts and metrics */
|
|
94
|
+
readonly code: string
|
|
95
|
+
/** Actionable next step for a person reading the error, or undefined when the SDK has no suggestion */
|
|
96
|
+
readonly hint: string | undefined
|
|
97
|
+
/** Frozen safe structured facts about the failure, without credentials or private payloads */
|
|
98
|
+
readonly details: Readonly<Record<string, unknown>>
|
|
99
|
+
|
|
100
|
+
constructor(message: string, options: FluxerlyErrorOptions) {
|
|
101
|
+
super(message, options.cause === undefined ? undefined : { cause: options.cause })
|
|
102
|
+
this.code = options.code
|
|
103
|
+
this.hint = options.hint
|
|
104
|
+
this.details = Object.freeze({ ...options.details })
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/** Return a plain JSON-safe summary with tag, code, message, hint, details and a summarized cause chain.
|
|
108
|
+
* Credential patterns in names and messages are masked, while the original cause remains unchanged
|
|
109
|
+
*/
|
|
110
|
+
toJSON(): FluxerlyErrorJson {
|
|
111
|
+
return errorJson(this, 0)
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* Whether a request may have reached Fluxer.
|
|
117
|
+
* The outcome notDispatched means it was not sent, rejected means Fluxer refused it, and unknown means the result is uncertain.
|
|
118
|
+
* A write with an unknown outcome may already have applied, so reconcile remote state before repeating it.
|
|
119
|
+
* A read with an unknown outcome cannot have changed remote state and is safe to repeat.
|
|
120
|
+
* A rejection does not prove rollback
|
|
121
|
+
*
|
|
122
|
+
* @category Errors
|
|
123
|
+
*/
|
|
124
|
+
export type OperationOutcome = "notDispatched" | "rejected" | "unknown"
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* Why a remote operation failed.
|
|
128
|
+
* The reason input means local validation failed, busy means local request capacity was full, and notFound means HTTP 404.
|
|
129
|
+
* A 404 does not prove that an earlier deletion succeeded.
|
|
130
|
+
* The reason rejected is another API rejection, network is a transport failure, response means unusable success data,
|
|
131
|
+
* timeout means the deadline expired, and rateLimit means the wait Fluxer required could not be completed.
|
|
132
|
+
* A connection lost while a response body arrives is a network failure.
|
|
133
|
+
* HTTP failures keep their status, never their response bodies
|
|
134
|
+
*
|
|
135
|
+
* @category Errors
|
|
136
|
+
*/
|
|
137
|
+
export type OperationReason =
|
|
138
|
+
"input" | "busy" | "notFound" | "rejected" | "network" | "response" | "timeout" | "rateLimit"
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* Constructor settings shared by resource operation errors, such as GuildOperationError and MessageOperationError
|
|
142
|
+
*
|
|
143
|
+
* @category Errors
|
|
144
|
+
*/
|
|
145
|
+
export interface OperationErrorOptions<Operation extends string, Reason extends string = OperationReason> {
|
|
146
|
+
/** The failed step */
|
|
147
|
+
readonly operation: Operation
|
|
148
|
+
/** Failure category */
|
|
149
|
+
readonly reason: Reason
|
|
150
|
+
/** Whether the request may have reached Fluxer */
|
|
151
|
+
readonly outcome: OperationOutcome
|
|
152
|
+
/** HTTP status when available. Defaults to null */
|
|
153
|
+
readonly status?: number | null | undefined
|
|
154
|
+
/** Usable server-required retry wait in milliseconds. Defaults to null */
|
|
155
|
+
readonly retryAfterMs?: number | null | undefined
|
|
156
|
+
/** Safe classification of a Fluxer rejection. Defaults to null */
|
|
157
|
+
readonly apiError?: ApiErrorDetail | null | undefined
|
|
158
|
+
/** Safe explanation of locally invalid input. Defaults to null */
|
|
159
|
+
readonly inputValidation?: InputValidationDetail | null | undefined
|
|
160
|
+
/**
|
|
161
|
+
* Fluxer error code that this SDK version does not recognize, recorded as details.providerCode and named in the
|
|
162
|
+
* message. Kept only when apiError is null and the code is an uppercase code of at most 64 characters. Defaults to null
|
|
163
|
+
*/
|
|
164
|
+
readonly providerCode?: string | null | undefined
|
|
165
|
+
/**
|
|
166
|
+
* For reason response, the response field path or named check that failed, such as type or channelMismatch.
|
|
167
|
+
* Recorded as details.responseField and named in the message. Defaults to null
|
|
168
|
+
*/
|
|
169
|
+
readonly responseField?: string | null | undefined
|
|
170
|
+
/** Whether the failed request only read data, so even an unknown outcome cannot have changed remote state.
|
|
171
|
+
* A read is recorded as details.read and keeps network and timeout failures retryable. Defaults to false
|
|
172
|
+
*/
|
|
173
|
+
readonly read?: boolean | undefined
|
|
174
|
+
/** Underlying failure retained as the error's cause */
|
|
175
|
+
readonly cause?: unknown
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* @internal Suggest the next step for an operation failure from its reason, outcome and retry wait.
|
|
180
|
+
* Rejections are left to apiErrorHint, which knows Fluxer's code and the HTTP status
|
|
181
|
+
*/
|
|
182
|
+
export function operationHint(
|
|
183
|
+
reason: string,
|
|
184
|
+
outcome: string,
|
|
185
|
+
retryAfterMs: number | null,
|
|
186
|
+
read = false,
|
|
187
|
+
): string | undefined {
|
|
188
|
+
if (reason === "rateLimit")
|
|
189
|
+
return retryAfterMs === null
|
|
190
|
+
? "Fluxer rate-limited this request. Wait before retrying"
|
|
191
|
+
: `Fluxer rate-limited this request. Wait at least ${retryAfterMs} ms before retrying`
|
|
192
|
+
if (outcome === "unknown" && !read) return "Check whether Fluxer applied the change before repeating it"
|
|
193
|
+
return reasonHints[reason]
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
/** Next steps for failure reasons that need no knowledge of Fluxer's answer */
|
|
197
|
+
const reasonHints: Readonly<Record<string, string | undefined>> = {
|
|
198
|
+
busy: "Wait for pending requests to finish, then retry",
|
|
199
|
+
input: "Correct the input named by inputValidation.path. Nothing was sent to Fluxer",
|
|
200
|
+
network: "Check network access to Fluxer, then retry",
|
|
201
|
+
timeout: "Retry, or pass a larger timeoutMs",
|
|
202
|
+
notConnected: "Connect the client and wait until it is ready before calling this",
|
|
203
|
+
connectionLost: "Retry after the shard reconnects",
|
|
204
|
+
response:
|
|
205
|
+
"Fluxer's answer changed shape, or a test fixture is wrong. Check the fixture, or report the field named in details.responseField",
|
|
206
|
+
tooLarge: "Raise maxBytes if the attachment is expected to be this large",
|
|
207
|
+
untrustedUrl: "Pass an attachment URL received from this client's Fluxer instance",
|
|
208
|
+
overflow: "Read the batches faster, or raise maxPendingBytes",
|
|
209
|
+
filter: "Make the filter return true or false without throwing",
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
/** @internal Build the frozen details shared by resource operation errors */
|
|
213
|
+
export function operationDetails(fields: Record<string, unknown>): Record<string, unknown> {
|
|
214
|
+
const details: Record<string, unknown> = {}
|
|
215
|
+
for (const [key, value] of Object.entries(fields)) if (value !== null && value !== undefined) details[key] = value
|
|
216
|
+
return details
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
/** A client setting or operation option is invalid before the requested work starts.
|
|
220
|
+
* Use field to identify the setting without exposing its rejected value
|
|
221
|
+
*
|
|
222
|
+
* @category Errors
|
|
223
|
+
*/
|
|
224
|
+
export class ConfigurationError extends FluxerlyError {
|
|
225
|
+
/** Discriminator for narrowing a local configuration failure */
|
|
226
|
+
readonly _tag = "ConfigurationError"
|
|
227
|
+
|
|
228
|
+
constructor(
|
|
229
|
+
/** The invalid option or containing object, including unsupported cache keys, without its rejected value */
|
|
230
|
+
readonly field:
|
|
231
|
+
| "configuration"
|
|
232
|
+
| "instance"
|
|
233
|
+
| "logging"
|
|
234
|
+
| "level"
|
|
235
|
+
| "categories"
|
|
236
|
+
| "debug"
|
|
237
|
+
| "format"
|
|
238
|
+
| "sink"
|
|
239
|
+
| "dedupe"
|
|
240
|
+
| "unsafe"
|
|
241
|
+
| "gateway"
|
|
242
|
+
| "onMalformedDispatch"
|
|
243
|
+
| "overflow"
|
|
244
|
+
| "childOutput"
|
|
245
|
+
| "token"
|
|
246
|
+
| "connection"
|
|
247
|
+
| "sharding"
|
|
248
|
+
| "totalShards"
|
|
249
|
+
| "shardIds"
|
|
250
|
+
| "startupTimeoutMs"
|
|
251
|
+
| "maxStartupAttempts"
|
|
252
|
+
| "event"
|
|
253
|
+
| "handler"
|
|
254
|
+
| "eventOptions"
|
|
255
|
+
| "concurrency"
|
|
256
|
+
| "partition"
|
|
257
|
+
| "maxPendingMessages"
|
|
258
|
+
| "maxPendingBytes"
|
|
259
|
+
| "maxPendingChanges"
|
|
260
|
+
| "cacheObserverOptions"
|
|
261
|
+
| "onError"
|
|
262
|
+
| "observe"
|
|
263
|
+
| "cache"
|
|
264
|
+
| "uploads"
|
|
265
|
+
| "messages"
|
|
266
|
+
| "guilds"
|
|
267
|
+
| "members"
|
|
268
|
+
| "roles"
|
|
269
|
+
| "emojis"
|
|
270
|
+
| "stickers"
|
|
271
|
+
| "channels"
|
|
272
|
+
| "users"
|
|
273
|
+
| "directMessages"
|
|
274
|
+
| "maxEntries"
|
|
275
|
+
| "maxBytes"
|
|
276
|
+
| "maxAgeMs"
|
|
277
|
+
| "kind"
|
|
278
|
+
| "limit"
|
|
279
|
+
| "key"
|
|
280
|
+
| "collectorOptions"
|
|
281
|
+
| "channelId"
|
|
282
|
+
| "guildId"
|
|
283
|
+
| "filter"
|
|
284
|
+
| "onReaction"
|
|
285
|
+
| "onMessage"
|
|
286
|
+
| "pages"
|
|
287
|
+
| "paginateOptions"
|
|
288
|
+
| "removeClicks"
|
|
289
|
+
| "emoji"
|
|
290
|
+
| "signal"
|
|
291
|
+
| "maxMessages"
|
|
292
|
+
| "maxReactions"
|
|
293
|
+
| "message"
|
|
294
|
+
| "timeoutMs"
|
|
295
|
+
| "idleMs"
|
|
296
|
+
| "messageFields"
|
|
297
|
+
| "commands"
|
|
298
|
+
| "help"
|
|
299
|
+
| "prefix"
|
|
300
|
+
| "parser"
|
|
301
|
+
| "command"
|
|
302
|
+
| "aliases"
|
|
303
|
+
| "cooldown"
|
|
304
|
+
| "supervisor"
|
|
305
|
+
| "assignments"
|
|
306
|
+
| "childId"
|
|
307
|
+
| "entry"
|
|
308
|
+
| "restart"
|
|
309
|
+
| "maxAttempts"
|
|
310
|
+
| "minDelayMs"
|
|
311
|
+
| "maxDelayMs"
|
|
312
|
+
| "identify"
|
|
313
|
+
| "minimumSpacingMs"
|
|
314
|
+
| "processes"
|
|
315
|
+
| "shardsPerProcess"
|
|
316
|
+
| "diagnosticsIntervalMs"
|
|
317
|
+
| "shutdownTimeoutMs"
|
|
318
|
+
| "drainMs"
|
|
319
|
+
| "childEnvironment"
|
|
320
|
+
| "args"
|
|
321
|
+
| "execArgv"
|
|
322
|
+
| "ignoredEvents"
|
|
323
|
+
| "flags"
|
|
324
|
+
| "presence"
|
|
325
|
+
| "sessions"
|
|
326
|
+
| "recovery"
|
|
327
|
+
| "attemptTimeoutMs"
|
|
328
|
+
| "healthyResetMs"
|
|
329
|
+
| "schedule"
|
|
330
|
+
| "rest"
|
|
331
|
+
| "transport"
|
|
332
|
+
| "mediaConcurrency"
|
|
333
|
+
| "maxQueued"
|
|
334
|
+
| "queuedJsonMaxBytes"
|
|
335
|
+
| "defaultTimeoutMs"
|
|
336
|
+
| "fetch"
|
|
337
|
+
| "webSocket"
|
|
338
|
+
| "userAgent"
|
|
339
|
+
| "middleware"
|
|
340
|
+
| "listener"
|
|
341
|
+
| "next"
|
|
342
|
+
| "task"
|
|
343
|
+
| "delayMs"
|
|
344
|
+
| "intervalMs"
|
|
345
|
+
| "embedField",
|
|
346
|
+
/** Explanation of the accepted setting, without its rejected value */
|
|
347
|
+
message: string,
|
|
348
|
+
/** Optional suggested fix and underlying cause */
|
|
349
|
+
options?: { readonly hint?: string | undefined; readonly cause?: unknown },
|
|
350
|
+
) {
|
|
351
|
+
super(message, {
|
|
352
|
+
code: "configuration.invalid",
|
|
353
|
+
hint: options?.hint,
|
|
354
|
+
cause: options?.cause,
|
|
355
|
+
details: { field },
|
|
356
|
+
})
|
|
357
|
+
this.name = "ConfigurationError"
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
/** Identifies the default API call during which an SdkDefect was observed.
|
|
362
|
+
* This attribution does not establish whether a dispatched server mutation took effect or was rolled back
|
|
363
|
+
*
|
|
364
|
+
* @category Errors
|
|
365
|
+
*/
|
|
366
|
+
export type Operation =
|
|
367
|
+
| "attachments.download"
|
|
368
|
+
| "attachments.stream"
|
|
369
|
+
| import("./attachments.js").AttachmentRefreshOperation
|
|
370
|
+
| "instance.resolve"
|
|
371
|
+
| "presence.set"
|
|
372
|
+
| "presence.setMembers"
|
|
373
|
+
| "cache.entries"
|
|
374
|
+
| "users.getSelf"
|
|
375
|
+
| "directMessages.send"
|
|
376
|
+
| import("./application.js").BotApplicationOperation
|
|
377
|
+
| "oauth.create"
|
|
378
|
+
| import("./oauth.js").OAuthOperation
|
|
379
|
+
| import("./counts.js").CountOperation
|
|
380
|
+
| "members.iterateChunks"
|
|
381
|
+
| import("./users.js").UserOperation
|
|
382
|
+
| import("./webhooks.js").WebhookOperation
|
|
383
|
+
| "createWebhookClient"
|
|
384
|
+
| import("./channels.js").ChannelOperation
|
|
385
|
+
| import("./guilds.js").GuildOperation
|
|
386
|
+
| import("./rest.js").RestOperation
|
|
387
|
+
| "gateway.send"
|
|
388
|
+
| "logging.configure"
|
|
389
|
+
| "cache.onChange"
|
|
390
|
+
| import("./pagination.js").PaginationOperation
|
|
391
|
+
| "createClient"
|
|
392
|
+
| "supervisor.create"
|
|
393
|
+
| "supervisor.start"
|
|
394
|
+
| "supervisor.waitForClose"
|
|
395
|
+
| "supervisor.waitForReady"
|
|
396
|
+
| "supervisor.shutdown"
|
|
397
|
+
| "supervisor.child.run"
|
|
398
|
+
| "commands"
|
|
399
|
+
| "connect"
|
|
400
|
+
| "run"
|
|
401
|
+
| "runBot"
|
|
402
|
+
| "waitForClose"
|
|
403
|
+
| "waitFor"
|
|
404
|
+
| "shutdown"
|
|
405
|
+
| "on"
|
|
406
|
+
| "subscribe"
|
|
407
|
+
| "schedule"
|
|
408
|
+
| "next"
|
|
409
|
+
| "send"
|
|
410
|
+
| "forward"
|
|
411
|
+
| "reply"
|
|
412
|
+
| "typing"
|
|
413
|
+
| "keepTyping"
|
|
414
|
+
| "fetch"
|
|
415
|
+
| "publish"
|
|
416
|
+
| "fetchCrosspostSource"
|
|
417
|
+
| "messages.get"
|
|
418
|
+
| "fetchHistory"
|
|
419
|
+
| "previewCleanup"
|
|
420
|
+
| "search"
|
|
421
|
+
| "fetchReactionUsers"
|
|
422
|
+
| "pin"
|
|
423
|
+
| "unpin"
|
|
424
|
+
| "fetchPins"
|
|
425
|
+
| "addReaction"
|
|
426
|
+
| "removeReaction"
|
|
427
|
+
| "removeUserReaction"
|
|
428
|
+
| "clearReaction"
|
|
429
|
+
| "clearReactions"
|
|
430
|
+
| "edit"
|
|
431
|
+
| "delete"
|
|
432
|
+
| "deleteAttachment"
|
|
433
|
+
| "deleteMany"
|
|
434
|
+
| "deleteOwnMessages"
|
|
435
|
+
| "cleanup"
|
|
436
|
+
| "subscription.waitForClose"
|
|
437
|
+
| "collect"
|
|
438
|
+
| "collector.result"
|
|
439
|
+
| "collectReactions"
|
|
440
|
+
| "reactionCollector.result"
|
|
441
|
+
| "paginate"
|
|
442
|
+
|
|
443
|
+
/** Fluxer rejected the bot token during connection startup or recovery.
|
|
444
|
+
* Check the token and the application owner's account standing before connecting again.
|
|
445
|
+
* A closed or disabled owner account can cause rejection of a valid token, and a new token does not fix that account standing.
|
|
446
|
+
* The rejection alone does not identify the cause. The SDK does not retry this rejection unchanged
|
|
447
|
+
*
|
|
448
|
+
* @category Errors
|
|
449
|
+
*/
|
|
450
|
+
export class AuthenticationError extends FluxerlyError {
|
|
451
|
+
/** Discriminator for identifying a rejected bot credential */
|
|
452
|
+
readonly _tag = "AuthenticationError"
|
|
453
|
+
constructor() {
|
|
454
|
+
super("Fluxer rejected the bot token", {
|
|
455
|
+
code: "auth.rejected",
|
|
456
|
+
hint: "Check the whole bot token and the application owner's account standing. A valid token can be rejected if that account is closed or disabled, which a new token cannot fix. The rejection alone does not identify the cause. The SDK does not retry it",
|
|
457
|
+
})
|
|
458
|
+
this.name = this._tag
|
|
459
|
+
}
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
/** Instance discovery or the gateway connection failed.
|
|
463
|
+
* Inspect phase, reason and status to distinguish network failure, invalid protocol data and gateway closure.
|
|
464
|
+
* The message includes a reviewed Fluxer close-code explanation when available, but no Fluxer response body or close-reason text.
|
|
465
|
+
* An explanation does not establish whether the session can resume or whether the SDK will retry.
|
|
466
|
+
* Local gateway receive-limit and UTF-8 failures use reason protocol and status 1009 and 1007 respectively.
|
|
467
|
+
* These failures and binary frames do not retry automatically. No rejected payload is retained.
|
|
468
|
+
* Other invalid gateway data, such as a frame that is not JSON or a sequence that goes backwards, is retried with a new
|
|
469
|
+
* session. Three such failures in a row without a healthy connection between them end the shard with reason protocol.
|
|
470
|
+
* Protocol failures name the violated opcode, dispatch type or field path in details when the SDK identified one
|
|
471
|
+
*
|
|
472
|
+
* @category Errors
|
|
473
|
+
*/
|
|
474
|
+
export class ConnectionError extends FluxerlyError {
|
|
475
|
+
/** Discriminator for identifying an expected discovery or gateway connection failure */
|
|
476
|
+
readonly _tag = "ConnectionError"
|
|
477
|
+
constructor(
|
|
478
|
+
/** The transport stage that failed */
|
|
479
|
+
readonly phase: "discovery" | "gateway",
|
|
480
|
+
/** Network failure, invalid protocol data, or a closed gateway connection */
|
|
481
|
+
readonly reason: "network" | "protocol" | "closed",
|
|
482
|
+
/** HTTP status during discovery or WebSocket close code at the gateway, including local receive rejection, or null when unavailable */
|
|
483
|
+
readonly status: number | null = null,
|
|
484
|
+
/** Optional protocol facts and underlying transport cause */
|
|
485
|
+
options?: {
|
|
486
|
+
/** Safe protocol facts such as opcode, dispatch type, field path or transport error code */
|
|
487
|
+
readonly details?: Readonly<Record<string, string | number | boolean>> | undefined
|
|
488
|
+
readonly cause?: unknown
|
|
489
|
+
readonly hint?: string | undefined
|
|
490
|
+
},
|
|
491
|
+
) {
|
|
492
|
+
super(connectionErrorMessage(phase, reason, status, options?.details?.detail), {
|
|
493
|
+
code: `connection.${phase}.${reason}`,
|
|
494
|
+
hint:
|
|
495
|
+
options?.hint ??
|
|
496
|
+
(status === CloseCode.authenticationFailed
|
|
497
|
+
? "Check the whole bot token and the application owner's account standing. A valid token can be rejected if that account is closed or disabled, which a new token cannot fix. The rejection alone does not identify the cause. The SDK does not retry it"
|
|
498
|
+
: status === CloseCode.shardingRequired
|
|
499
|
+
? 'Set sharding to "auto", or configure sharding with a larger totalShards'
|
|
500
|
+
: status === CloseCode.invalidShard
|
|
501
|
+
? "Check the configured shard IDs and total shard count"
|
|
502
|
+
: reason === "network"
|
|
503
|
+
? "Check network access to the Fluxer instance"
|
|
504
|
+
: undefined),
|
|
505
|
+
cause: options?.cause,
|
|
506
|
+
details: { phase, reason, ...(status === null ? {} : { status }), ...options?.details },
|
|
507
|
+
})
|
|
508
|
+
this.name = this._tag
|
|
509
|
+
}
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
/** What went wrong, then the close code or HTTP status in parentheses */
|
|
513
|
+
function connectionErrorMessage(
|
|
514
|
+
phase: "discovery" | "gateway",
|
|
515
|
+
reason: "network" | "protocol" | "closed",
|
|
516
|
+
status: number | null,
|
|
517
|
+
detail: string | number | boolean | undefined,
|
|
518
|
+
): string {
|
|
519
|
+
const known = phase === "gateway" && status !== null ? closeCodeInfo(status) : undefined
|
|
520
|
+
const specific = detail === undefined ? undefined : String(detail)
|
|
521
|
+
const general =
|
|
522
|
+
phase === "discovery"
|
|
523
|
+
? {
|
|
524
|
+
network:
|
|
525
|
+
status === null
|
|
526
|
+
? "The instance could not be reached"
|
|
527
|
+
: "The instance answered with an error status",
|
|
528
|
+
protocol:
|
|
529
|
+
status !== null && status >= 300 && status < 400
|
|
530
|
+
? "The instance redirected too often or to an unusable location"
|
|
531
|
+
: "The instance returned an unusable discovery document",
|
|
532
|
+
closed: "The client shut down before discovery finished",
|
|
533
|
+
}[reason]
|
|
534
|
+
: {
|
|
535
|
+
network: "A network error interrupted the gateway connection",
|
|
536
|
+
protocol: "The gateway sent data that the SDK cannot use",
|
|
537
|
+
closed: "The gateway closed the connection",
|
|
538
|
+
}[reason]
|
|
539
|
+
const sentence = specific === undefined ? undefined : `${specific.charAt(0).toUpperCase()}${specific.slice(1)}`
|
|
540
|
+
const what = known ? `${known.meaning}${sentence === undefined ? "" : `. ${sentence}`}` : (sentence ?? general)
|
|
541
|
+
const code =
|
|
542
|
+
status === null
|
|
543
|
+
? ""
|
|
544
|
+
: phase === "gateway"
|
|
545
|
+
? ` (close code ${status}${known && known.name !== "UNKNOWN" ? ` ${known.name}` : ""})`
|
|
546
|
+
: ` (HTTP ${status})`
|
|
547
|
+
return `Fluxer ${phase === "gateway" ? "gateway connection" : "instance discovery"} failed: ${what}${code}`
|
|
548
|
+
}
|
|
549
|
+
|
|
550
|
+
/** Gateway startup or explicit instance discovery exceeded its time budget.
|
|
551
|
+
* Required cleanup is still awaited, so completion can occur after timeoutMs has elapsed
|
|
552
|
+
*
|
|
553
|
+
* @category Errors
|
|
554
|
+
*/
|
|
555
|
+
export class ConnectionTimeoutError extends FluxerlyError {
|
|
556
|
+
/** Discriminator for identifying an expired connection or discovery deadline */
|
|
557
|
+
readonly _tag = "ConnectionTimeoutError"
|
|
558
|
+
constructor(
|
|
559
|
+
/** Connection or discovery budget in milliseconds, not a guarantee of completion before cleanup finishes */
|
|
560
|
+
readonly timeoutMs: number,
|
|
561
|
+
) {
|
|
562
|
+
super(`The connection to Fluxer was not ready within ${timeoutMs} ms`, {
|
|
563
|
+
code: "connection.timeout",
|
|
564
|
+
hint: "Check network access to the Fluxer instance, or raise the timeout that expired, usually connection.startupTimeoutMs",
|
|
565
|
+
details: { timeoutMs },
|
|
566
|
+
})
|
|
567
|
+
this.name = this._tag
|
|
568
|
+
}
|
|
569
|
+
}
|
|
570
|
+
|
|
571
|
+
/** Discovery HTTP or the gateway imposed a connection rate limit.
|
|
572
|
+
* When retryAfterMs is available, wait at least that duration before another manual attempt
|
|
573
|
+
*
|
|
574
|
+
* @category Errors
|
|
575
|
+
*/
|
|
576
|
+
export class RateLimitError extends FluxerlyError {
|
|
577
|
+
/** Discriminator for identifying a connection rate limit */
|
|
578
|
+
readonly _tag = "RateLimitError"
|
|
579
|
+
constructor(
|
|
580
|
+
/** Whether discovery HTTP or the gateway imposed the limit */
|
|
581
|
+
readonly source: "http" | "gateway",
|
|
582
|
+
/** Server-required wait in milliseconds, or null when no usable duration was supplied */
|
|
583
|
+
readonly retryAfterMs: number | null,
|
|
584
|
+
) {
|
|
585
|
+
super(
|
|
586
|
+
`Fluxer rate-limited the ${source === "gateway" ? "gateway connection" : "connection setup request"}${retryAfterMs === null ? " without saying how long to wait" : ` (retry after ${retryAfterMs} ms)`}`,
|
|
587
|
+
{
|
|
588
|
+
code: "ratelimit.connection",
|
|
589
|
+
hint: operationHint("rateLimit", "notDispatched", retryAfterMs),
|
|
590
|
+
details: { source, ...(retryAfterMs === null ? {} : { retryAfterMs }) },
|
|
591
|
+
},
|
|
592
|
+
)
|
|
593
|
+
this.name = this._tag
|
|
594
|
+
}
|
|
595
|
+
}
|
|
596
|
+
|
|
597
|
+
/** A configured gateway shard failed startup or permanently lost its established connection.
|
|
598
|
+
* Use shardId to identify the local connection and failure to inspect its expected cause, which is also the error's cause.
|
|
599
|
+
* The client waits for its other shards to clean up before returning this failure.
|
|
600
|
+
* This does not undo delivered events or dispatched HTTP work
|
|
601
|
+
*
|
|
602
|
+
* @category Errors
|
|
603
|
+
*/
|
|
604
|
+
export class ShardConnectionError extends FluxerlyError {
|
|
605
|
+
/** Discriminator for narrowing a failure attributed to one local shard */
|
|
606
|
+
readonly _tag = "ShardConnectionError"
|
|
607
|
+
constructor(
|
|
608
|
+
/** The locally assigned shard whose connection failed */
|
|
609
|
+
readonly shardId: number,
|
|
610
|
+
/** Original SDK-owned expected failure, without private upstream payloads */
|
|
611
|
+
readonly failure: AuthenticationError | ConnectionError | ConnectionTimeoutError | RateLimitError,
|
|
612
|
+
) {
|
|
613
|
+
super(`Shard ${shardId} stopped: ${failure.message}`, {
|
|
614
|
+
code: "connection.shard",
|
|
615
|
+
hint: failure.hint,
|
|
616
|
+
cause: failure,
|
|
617
|
+
details: { shardId },
|
|
618
|
+
})
|
|
619
|
+
this.name = this._tag
|
|
620
|
+
}
|
|
621
|
+
}
|
|
622
|
+
|
|
623
|
+
/** A competing connection operation already owns the client, so this call did not take ownership.
|
|
624
|
+
* The rejected call does not cancel or close the existing connection work
|
|
625
|
+
*
|
|
626
|
+
* @category Errors
|
|
627
|
+
*/
|
|
628
|
+
export class ClientBusyError extends FluxerlyError {
|
|
629
|
+
/** Discriminator for identifying competing connection ownership */
|
|
630
|
+
readonly _tag = "ClientBusyError"
|
|
631
|
+
constructor() {
|
|
632
|
+
super("The client is already connecting or connected", {
|
|
633
|
+
code: "client.busy",
|
|
634
|
+
hint: "Call connect or run once per client, and await that call instead of starting another",
|
|
635
|
+
})
|
|
636
|
+
this.name = this._tag
|
|
637
|
+
}
|
|
638
|
+
}
|
|
639
|
+
|
|
640
|
+
/**
|
|
641
|
+
* The client is permanently closing or closed, so reconnecting requires a new client
|
|
642
|
+
*
|
|
643
|
+
* @category Errors
|
|
644
|
+
*/
|
|
645
|
+
export class ClientClosedError extends FluxerlyError {
|
|
646
|
+
/** Discriminator for identifying permanent client closure */
|
|
647
|
+
readonly _tag = "ClientClosedError"
|
|
648
|
+
constructor() {
|
|
649
|
+
super("The client is shutting down or has shut down, so it cannot do more work", {
|
|
650
|
+
code: "client.closed",
|
|
651
|
+
hint: "Create a new client to connect again",
|
|
652
|
+
})
|
|
653
|
+
this.name = this._tag
|
|
654
|
+
}
|
|
655
|
+
}
|
|
656
|
+
|
|
657
|
+
/** A default API operation was cancelled through its signal.
|
|
658
|
+
* The SDK returns this expected failure after required cleanup, not as proof that remote work was undone.
|
|
659
|
+
* Cancellation combined with an unexpected cleanup failure rejects with SdkDefect instead
|
|
660
|
+
*
|
|
661
|
+
* @category Errors
|
|
662
|
+
*/
|
|
663
|
+
export class CancelledError extends FluxerlyError {
|
|
664
|
+
/** Error tag for identifying cancellation in the default API */
|
|
665
|
+
readonly _tag = "CancelledError"
|
|
666
|
+
constructor(
|
|
667
|
+
/** The cancelled default API call, recorded as details.operation and named in the message. Defaults to undefined */
|
|
668
|
+
operation?: Operation,
|
|
669
|
+
) {
|
|
670
|
+
super(
|
|
671
|
+
`${operation === undefined ? "The operation" : `The operation ${operation}`} was cancelled before it finished`,
|
|
672
|
+
{
|
|
673
|
+
code: "operation.cancelled",
|
|
674
|
+
hint: "Its AbortSignal was aborted. Signals that the SDK passes to handlers abort when the client shuts down, so this is expected during shutdown",
|
|
675
|
+
details: operation === undefined ? undefined : { operation },
|
|
676
|
+
},
|
|
677
|
+
)
|
|
678
|
+
this.name = this._tag
|
|
679
|
+
}
|
|
680
|
+
}
|
|
681
|
+
|
|
682
|
+
/** Short masked text for an application-thrown value. Never throws, including for null, symbols and hostile proxies */
|
|
683
|
+
function thrownText(value: unknown): string {
|
|
684
|
+
if (typeof value === "string")
|
|
685
|
+
return maskText(JSON.stringify(value.length > 200 ? `${value.slice(0, 200)}…` : value))
|
|
686
|
+
let error = false
|
|
687
|
+
try {
|
|
688
|
+
error = value instanceof Error
|
|
689
|
+
} catch {
|
|
690
|
+
// allow-silent: a proxy that rejects prototype inspection is described as a non-Error object below
|
|
691
|
+
}
|
|
692
|
+
if (error) return maskText(errorSummary(value))
|
|
693
|
+
return typeof value === "object" && value !== null ? "a non-Error object" : describeValue(value)
|
|
694
|
+
}
|
|
695
|
+
|
|
696
|
+
/** The masked message of an application fault, usually an ApplicationError, or a guarded description of another value */
|
|
697
|
+
function defectMessage(value: unknown): string {
|
|
698
|
+
try {
|
|
699
|
+
if (value instanceof Error) return maskText(String(value.message))
|
|
700
|
+
} catch {
|
|
701
|
+
// allow-silent: an Error whose message getter throws is described by the guarded fallback below
|
|
702
|
+
}
|
|
703
|
+
return thrownText(value)
|
|
704
|
+
}
|
|
705
|
+
|
|
706
|
+
/** An application callback invoked by the SDK failed, threw or rejected.
|
|
707
|
+
* The runBot function returns it as an expected failure, with source "runBot setup", when its setup callback fails,
|
|
708
|
+
* and with source "runBot commands" when its commands register callback throws.
|
|
709
|
+
* Where the SDK cannot return a typed failure, such as a default keepTyping task, it appears as a fault inside SdkDefect.
|
|
710
|
+
* The original failure or thrown value is the cause. Handler, filter and collector callback failures are reported with
|
|
711
|
+
* their original value through FailureReport or their own error types instead
|
|
712
|
+
*
|
|
713
|
+
* @category Errors
|
|
714
|
+
*/
|
|
715
|
+
export class ApplicationError extends FluxerlyError {
|
|
716
|
+
/** Discriminator for a failure thrown by application code rather than the SDK */
|
|
717
|
+
readonly _tag = "ApplicationError"
|
|
718
|
+
constructor(
|
|
719
|
+
/** Names the application callback that failed, such as runBot setup or keepTyping task */
|
|
720
|
+
readonly source: string,
|
|
721
|
+
/** The original thrown or rejected value */
|
|
722
|
+
cause: unknown,
|
|
723
|
+
) {
|
|
724
|
+
super(`Application callback ${source} failed: ${thrownText(cause)}`, {
|
|
725
|
+
code: "application.callbackFailed",
|
|
726
|
+
hint: `Fix the ${source} callback. The error's cause is the value it threw`,
|
|
727
|
+
cause,
|
|
728
|
+
details: { source },
|
|
729
|
+
})
|
|
730
|
+
this.name = this._tag
|
|
731
|
+
}
|
|
732
|
+
}
|
|
733
|
+
|
|
734
|
+
/**
|
|
735
|
+
* Expected startup or terminal connection failures, excluding cancellation and SDK defects
|
|
736
|
+
*
|
|
737
|
+
* @category Errors
|
|
738
|
+
*/
|
|
739
|
+
export type ConnectionFailure =
|
|
740
|
+
AuthenticationError | ConnectionError | ConnectionTimeoutError | RateLimitError | ShardConnectionError
|
|
741
|
+
/**
|
|
742
|
+
* Expected connect and run failures, with default API methods adding CancelledError to their result union
|
|
743
|
+
*
|
|
744
|
+
* @category Errors
|
|
745
|
+
*/
|
|
746
|
+
export type ConnectError = ConnectionFailure | ClientBusyError | ClientClosedError
|
|
747
|
+
|
|
748
|
+
/** Details of what caused an SdkDefect in the default API.
|
|
749
|
+
* Failure holds an expected SDK error, Defect holds an unexpected fault with its original value, and Interruption marks cancellation.
|
|
750
|
+
* More than one entry can describe both the original failure and a cleanup fault
|
|
751
|
+
*
|
|
752
|
+
* @category Errors
|
|
753
|
+
*/
|
|
754
|
+
export type DefectReason =
|
|
755
|
+
| {
|
|
756
|
+
/** This cause entry retains an expected SDK failure */
|
|
757
|
+
readonly kind: "Failure"
|
|
758
|
+
/** Typed expected failure preserved alongside the unexpected fault */
|
|
759
|
+
readonly failure:
|
|
760
|
+
| ConnectError
|
|
761
|
+
| ConfigurationError
|
|
762
|
+
| import("./message-errors.js").EventReadError
|
|
763
|
+
| import("./message-errors.js").EventWaitError
|
|
764
|
+
| import("./message-errors.js").MessageError
|
|
765
|
+
| import("./message-errors.js").MessageOperationError
|
|
766
|
+
| import("./message-cleanup.js").MessageCleanupError
|
|
767
|
+
| import("./guilds.js").GuildOperationError
|
|
768
|
+
| import("./channels.js").ChannelOperationError
|
|
769
|
+
| import("./webhooks.js").WebhookOperationError
|
|
770
|
+
| import("./users.js").UserOperationError
|
|
771
|
+
| import("./application.js").BotApplicationOperationError
|
|
772
|
+
| import("./oauth.js").OAuthOperationError
|
|
773
|
+
| import("./counts.js").CountOperationError
|
|
774
|
+
| import("./member-chunks.js").MemberChunkError
|
|
775
|
+
| import("./presence.js").PresenceError
|
|
776
|
+
| import("./pagination.js").PaginationError
|
|
777
|
+
| import("./collectors.js").CollectorError
|
|
778
|
+
| import("./attachments.js").AttachmentDownloadFailure
|
|
779
|
+
| import("./attachments.js").AttachmentRefreshFailure
|
|
780
|
+
| import("./supervisor.js").SupervisorError
|
|
781
|
+
| import("./supervisor.js").SupervisorChildError
|
|
782
|
+
| CancelledError
|
|
783
|
+
| import("./bot-runner.js").CriticalWorkerStoppedError
|
|
784
|
+
}
|
|
785
|
+
| {
|
|
786
|
+
/** An unexpected fault occurred */
|
|
787
|
+
readonly kind: "Defect"
|
|
788
|
+
/**
|
|
789
|
+
* The original fault value. An application callback failure is an ApplicationError naming the callback, and a
|
|
790
|
+
* throw while the SDK read caller-supplied input, such as from a property getter or a caller AbortSignal
|
|
791
|
+
* listener method, is the thrown value itself
|
|
792
|
+
*/
|
|
793
|
+
readonly defect: unknown
|
|
794
|
+
/**
|
|
795
|
+
* Where the fault came from. The value application means an application callback failed or reading caller-supplied
|
|
796
|
+
* options or input threw, and sdk means any other fault, including one in SDK work that runs between those reads
|
|
797
|
+
*/
|
|
798
|
+
readonly origin: "application" | "sdk"
|
|
799
|
+
}
|
|
800
|
+
| {
|
|
801
|
+
/** Cancellation interrupted work, possibly alongside another failure */
|
|
802
|
+
readonly kind: "Interruption"
|
|
803
|
+
}
|
|
804
|
+
|
|
805
|
+
/**
|
|
806
|
+
* An unexpected fault thrown or rejected by the default API instead of returned as a typed error result.
|
|
807
|
+
* Client creation throws synchronously, while asynchronous operations reject.
|
|
808
|
+
* This includes expected failures or cancellation combined with an unexpected cleanup fault.
|
|
809
|
+
* The first fault is the standard cause property, and reasons list every failure, fault and interruption entry.
|
|
810
|
+
* A fault from an application callback, such as a default keepTyping task, is an ApplicationError with origin application.
|
|
811
|
+
* A throw while the SDK reads caller-supplied options or input, such as from a property getter or a caller AbortSignal
|
|
812
|
+
* listener method, keeps the thrown value as the cause with origin application. Either application origin sets code
|
|
813
|
+
* application.defect instead of sdk.defect. A fault in SDK work around those reads, such as building a command registry
|
|
814
|
+
* or a client logger, keeps origin sdk.
|
|
815
|
+
* The native entry point uses Effect causes rather than wrapping them in this exception
|
|
816
|
+
*
|
|
817
|
+
* @category Errors
|
|
818
|
+
*/
|
|
819
|
+
export class SdkDefect extends FluxerlyError {
|
|
820
|
+
/** Discriminator for an unexpected fault in the default API */
|
|
821
|
+
readonly _tag = "SdkDefect"
|
|
822
|
+
constructor(
|
|
823
|
+
/** Public call during which the fault was observed, not proof that a server mutation was rolled back */
|
|
824
|
+
readonly operation: Operation = "createClient",
|
|
825
|
+
/** Cause entries, which can include both the primary failure and cleanup faults */
|
|
826
|
+
readonly reasons: readonly DefectReason[] = [],
|
|
827
|
+
) {
|
|
828
|
+
const fault = reasons.find((reason) => reason.kind === "Defect")
|
|
829
|
+
const application = fault?.kind === "Defect" && fault.origin === "application"
|
|
830
|
+
super(
|
|
831
|
+
application
|
|
832
|
+
? `Application failure during ${operation}: ${defectMessage(fault.defect)}`
|
|
833
|
+
: `Unexpected SDK failure during ${operation}${fault?.kind === "Defect" ? `: ${thrownText(fault.defect)}` : ""}`,
|
|
834
|
+
{
|
|
835
|
+
code: application ? "application.defect" : "sdk.defect",
|
|
836
|
+
hint: application
|
|
837
|
+
? "Fix the application callback or the input property getter that raised the cause"
|
|
838
|
+
: "This is an SDK or cleanup fault. Report it with the output of describeError",
|
|
839
|
+
cause:
|
|
840
|
+
fault?.kind === "Defect"
|
|
841
|
+
? fault.defect
|
|
842
|
+
: reasons.find((reason) => reason.kind === "Failure")?.failure,
|
|
843
|
+
details: { operation, reasons: reasons.map((reason) => reason.kind) },
|
|
844
|
+
},
|
|
845
|
+
)
|
|
846
|
+
this.reasons = Object.freeze([...reasons])
|
|
847
|
+
this.name = "SdkDefect"
|
|
848
|
+
}
|
|
849
|
+
}
|