@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/client.ts
ADDED
|
@@ -0,0 +1,663 @@
|
|
|
1
|
+
import type { MessageCacheOptions, ResourceCacheSettings } from "./cache.js"
|
|
2
|
+
import type { GuildChannel } from "./channels.js"
|
|
3
|
+
import type { GuildEmoji, GuildSticker } from "./expressions.js"
|
|
4
|
+
import type { Guild, GuildMember, GuildRole } from "./guilds.js"
|
|
5
|
+
import type { ClientCounters, LoggingOptions } from "./logging.js"
|
|
6
|
+
import type { FailureReport } from "./failures.js"
|
|
7
|
+
import type { Observer } from "./observer.js"
|
|
8
|
+
import type { Message, MessageCore, MessageFields, SelectedMessage } from "./messages.js"
|
|
9
|
+
import type { ShardingOptions, ShardState } from "./sharding.js"
|
|
10
|
+
import type { DirectMessageChannel, User } from "./users.js"
|
|
11
|
+
import type { InstanceOptions } from "./instance.js"
|
|
12
|
+
import type { PresenceInput } from "./presence.js"
|
|
13
|
+
import type { RestOptions, TransportOptions } from "./rest.js"
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Configure a bot client before connecting or making requests.
|
|
17
|
+
* Creation checks and copies these settings without authenticating the token or opening a connection.
|
|
18
|
+
* Settings belong to this client and cannot be changed after creation
|
|
19
|
+
*
|
|
20
|
+
* @category Options
|
|
21
|
+
*/
|
|
22
|
+
export interface ClientOptions<F extends MessageFields | undefined = undefined> {
|
|
23
|
+
/**
|
|
24
|
+
* Choose which optional message fields the application receives.
|
|
25
|
+
* Omit this setting for full Message output.
|
|
26
|
+
* An empty array keeps id, channelId, content, author, type and guildId, where the last two are kept when the response supplies them
|
|
27
|
+
*
|
|
28
|
+
* Excluded fields are absent, not undefined or empty arrays, in this client's REST, event, cache and collector results
|
|
29
|
+
*
|
|
30
|
+
* Selecting a field includes its nested values.
|
|
31
|
+
* For example, messageSnapshots keeps its own media even when top-level media fields are excluded
|
|
32
|
+
*
|
|
33
|
+
* This reduces the objects the SDK builds locally, not network payloads or data stored by Fluxer.
|
|
34
|
+
* The SDK still rejects malformed recognized response fields, even when they are excluded
|
|
35
|
+
*
|
|
36
|
+
* Unknown field names and non-arrays fail with ConfigurationError whose field is messageFields.
|
|
37
|
+
* Including core field names is allowed and does not change the required core
|
|
38
|
+
*
|
|
39
|
+
* TypeScript knows the exact selection when given a literal tuple. For an array whose contents are unknown, optional fields remain optional.
|
|
40
|
+
* The copied selection lasts for this client's lifetime and does not affect separately created webhook clients or other resource types
|
|
41
|
+
*
|
|
42
|
+
* @example
|
|
43
|
+
* ```ts
|
|
44
|
+
* import { createClient } from "@neontechspace/fluxerly"
|
|
45
|
+
* export function selectedMessagesExample(token: string) {
|
|
46
|
+
* return createClient({ token, messageFields: ["attachments", "messageReference"] })
|
|
47
|
+
* }
|
|
48
|
+
* ```
|
|
49
|
+
*/
|
|
50
|
+
readonly messageFields?: F
|
|
51
|
+
/**
|
|
52
|
+
* Select a self-hosted or other Fluxer instance instead of hosted Fluxer.
|
|
53
|
+
* Creation checks the root URL without a request.
|
|
54
|
+
* The first REST, gateway or instance.resolve operation that needs endpoints reads the unauthenticated discovery document.
|
|
55
|
+
* The client keeps those service addresses until shutdown and sends authenticated requests to them.
|
|
56
|
+
* HTTPS and WSS are required unless allowInsecure explicitly allows HTTP and WS
|
|
57
|
+
*/
|
|
58
|
+
readonly instance?: InstanceOptions
|
|
59
|
+
/**
|
|
60
|
+
* Tune how many REST requests this client runs and queues, and the default operation deadline.
|
|
61
|
+
* See RestOptions for each limit and its default
|
|
62
|
+
*/
|
|
63
|
+
readonly rest?: RestOptions
|
|
64
|
+
/**
|
|
65
|
+
* Replace the HTTP and WebSocket implementations or the User-Agent this client sends.
|
|
66
|
+
* This is an advanced option for proxies, instrumentation and tests. See TransportOptions
|
|
67
|
+
*/
|
|
68
|
+
readonly transport?: TransportOptions
|
|
69
|
+
/** Bound the attachment transfer bytes reserved by queued and active upload operations */
|
|
70
|
+
readonly uploads?: {
|
|
71
|
+
/** Maximum reserved attachment transfer bytes across queued and active operations, as a positive safe integer.
|
|
72
|
+
* Defaults to 104,857,600 (100 MiB), separate from the rest.queuedJsonMaxBytes queued JSON budget (4 MiB by default).
|
|
73
|
+
* The SDK reserves accepted byte-array lengths, file sizes or declared stream sizes before waiting for a request slot.
|
|
74
|
+
* A new operation fails with busy if its reservation would exceed this limit.
|
|
75
|
+
* Reservations remain held across rate-limit retries and release after transport cleanup.
|
|
76
|
+
* This excludes caller buffers, metadata and runtime overhead, so it is not a JavaScript heap or process-memory ceiling
|
|
77
|
+
*/
|
|
78
|
+
readonly maxBytes?: number
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Configure this client's log output without changing another client.
|
|
82
|
+
* By default the client prints Info and higher records to the console: Startup, shard readiness, connection loss
|
|
83
|
+
* with its close code and next step, rate-limit waits of at least one second, shutdown, and application errors in full.
|
|
84
|
+
* Raise or lower the level, adjust single categories, enable Debug records or send records to an application sink.
|
|
85
|
+
* Creation copies and checks these settings without printing anything.
|
|
86
|
+
* Records never contain tokens or other credentials. Logging does not consume or replace returned operation failures
|
|
87
|
+
*
|
|
88
|
+
* @example
|
|
89
|
+
* ```ts
|
|
90
|
+
* import { createClient } from "@neontechspace/fluxerly"
|
|
91
|
+
* export function loggingExample(token: string) {
|
|
92
|
+
* return createClient({
|
|
93
|
+
* token,
|
|
94
|
+
* logging: {
|
|
95
|
+
* level: "info",
|
|
96
|
+
* categories: { rest: "debug" },
|
|
97
|
+
* sink: (record) => console.log(JSON.stringify(record)),
|
|
98
|
+
* },
|
|
99
|
+
* })
|
|
100
|
+
* }
|
|
101
|
+
* ```
|
|
102
|
+
*/
|
|
103
|
+
readonly logging?: LoggingOptions
|
|
104
|
+
/**
|
|
105
|
+
* Receive every failure that has no returned result: Event handler, command, collector callback and filter,
|
|
106
|
+
* cleanup progress and cache-callback failures, subscriptions stopped by overflow, and failed state observers.
|
|
107
|
+
* The report holds the original error and IDs of the message involved, never message content.
|
|
108
|
+
* A subscription's own onError takes precedence for that subscription.
|
|
109
|
+
* Without a hook the SDK logs each failure at Error with its message, stack and cause chain.
|
|
110
|
+
* A failure only queues its report. Reports are delivered one at a time in order. Up to 256 wait while the hook is busy, and later ones are logged instead, with fields.reportOutcome "queueFull", and counted in diagnostics().counters.reportsDropped.
|
|
111
|
+
* A hook that throws or rejects is logged together with the original failure and is never retried.
|
|
112
|
+
* Shutdown does not wait for a pending hook promise. The report it was handling and any queued ones are logged at Error instead,
|
|
113
|
+
* with fields.reportOutcome "interrupted" for the report being handled and "clientClosed" for queued or later reports
|
|
114
|
+
*/
|
|
115
|
+
readonly onError?: (report: FailureReport) => unknown
|
|
116
|
+
/**
|
|
117
|
+
* Receive structured measurements of this client's work to export as metrics or traces to any monitoring system:
|
|
118
|
+
* Each REST request attempt with its route template, status and duration, rate-limit waits, reconnection attempts,
|
|
119
|
+
* resumed sessions, and each handler and command invocation with its duration and outcome.
|
|
120
|
+
* The observer runs synchronously when the measured work finishes and is independent of the logging settings.
|
|
121
|
+
* Observations never contain tokens, payloads or message content.
|
|
122
|
+
* An observer that throws is counted in diagnostics().counters.sinkFailures without changing SDK work.
|
|
123
|
+
* The native API calls the same observer, in addition to its Effect metrics and spans.
|
|
124
|
+
* A value that is not a function fails creation with ConfigurationError
|
|
125
|
+
*
|
|
126
|
+
* @example
|
|
127
|
+
* ```ts
|
|
128
|
+
* import { createClient, type Observation } from "@neontechspace/fluxerly"
|
|
129
|
+
* export function observerExample(token: string, record: (observation: Observation) => void) {
|
|
130
|
+
* return createClient({
|
|
131
|
+
* token,
|
|
132
|
+
* observe: (observation) => {
|
|
133
|
+
* if (observation.type === "rest" || observation.type === "handler") record(observation)
|
|
134
|
+
* },
|
|
135
|
+
* })
|
|
136
|
+
* }
|
|
137
|
+
* ```
|
|
138
|
+
*/
|
|
139
|
+
readonly observe?: Observer
|
|
140
|
+
/** Gateway protocol handling and the optional fields sent in each new session's Identify */
|
|
141
|
+
readonly gateway?: GatewayOptions
|
|
142
|
+
/** Bot token used to authenticate requests and gateway connections, commonly read from the process environment.
|
|
143
|
+
* Undefined is accepted so an environment value can be passed directly. Creation requires a non-blank string and
|
|
144
|
+
* otherwise fails with ConfigurationError, whose hint names an unset environment variable as the likely cause.
|
|
145
|
+
* Surrounding whitespace and one pair of matching quotes, which .env files often add, are removed.
|
|
146
|
+
* A value that starts with a Bot or Bearer scheme is rejected, since the SDK adds the Bot scheme itself.
|
|
147
|
+
* Only Fluxer can establish whether the token is valid
|
|
148
|
+
*/
|
|
149
|
+
readonly token: string | undefined
|
|
150
|
+
/**
|
|
151
|
+
* Keep bounded, memory-only resource snapshots for local lookups.
|
|
152
|
+
* Omit this setting to retain no snapshots, without disabling REST reads or event delivery.
|
|
153
|
+
* Each category has its own client-wide budget shared across this client's shards, not a budget per shard or community.
|
|
154
|
+
* A lost gateway connection clears affected users, direct messages and messages, even after the session resumes.
|
|
155
|
+
* Community, member, role, emoji, sticker and channel snapshots stay while the shard resumes, because Fluxer replays every
|
|
156
|
+
* missed event on Resume, and are cleared when the shard has to start a new session. Cached threads are the exception:
|
|
157
|
+
* Fluxer does not replay thread list changes, so a resumed shard's threads are cleared.
|
|
158
|
+
* Resume sends no community snapshots, so a process that resumes a session from sharding.sessions refills the enabled
|
|
159
|
+
* community, role and channel caches through REST once every shard is ready, unless sharding.refillCaches is false.
|
|
160
|
+
* When a snapshot lacks enough community context to identify its shard, the SDK clears it conservatively
|
|
161
|
+
*/
|
|
162
|
+
readonly cache?: {
|
|
163
|
+
/** Cache public account profiles from explicit reads and complete user events, not partial message authors.
|
|
164
|
+
* A local lookup makes the item less likely to be removed for capacity, but does not extend its age limit.
|
|
165
|
+
* Targeted reads conflict only with later observations of the same account, so unrelated IDs can both populate.
|
|
166
|
+
* Reads without a target ID, lost gateway connections, clear and shutdown can prevent older responses from restoring the whole category
|
|
167
|
+
*/
|
|
168
|
+
readonly users?: boolean | ResourceCacheSettings<User>
|
|
169
|
+
/** Cache private conversations from explicit reads and complete channel events, without automatically listing them.
|
|
170
|
+
* A local lookup makes the item less likely to be removed for capacity, but does not extend its age limit.
|
|
171
|
+
* Targeted reads, mutations and channel events conflict only for the same conversation.
|
|
172
|
+
* Full-list reads, opening by user ID, account updates, connection gaps, clear and shutdown can prevent older responses from restoring the whole category
|
|
173
|
+
*/
|
|
174
|
+
readonly directMessages?: boolean | ResourceCacheSettings<DirectMessageChannel>
|
|
175
|
+
/** Cache community details from explicit reads and guild create or update events, without preloading members.
|
|
176
|
+
* Community removal or unavailability clears this community's cached resources, including channels
|
|
177
|
+
*/
|
|
178
|
+
readonly guilds?: boolean | ResourceCacheSettings<Guild>
|
|
179
|
+
/** Cache individual memberships from explicit reads, REST pages and member add or update events.
|
|
180
|
+
* Member removal clears that membership.
|
|
181
|
+
* Successful or uncertain role assignment clears the target
|
|
182
|
+
*/
|
|
183
|
+
readonly members?: boolean | ResourceCacheSettings<GuildMember>
|
|
184
|
+
/** Cache role definitions from explicit list, create or edit results and role events.
|
|
185
|
+
* Successful or uncertain creation or reordering clears this community's cached roles.
|
|
186
|
+
* Edits clear their target, or all this community's roles when changing hoistPosition.
|
|
187
|
+
* Role deletion also clears cached memberships because assignments can change without individual member events.
|
|
188
|
+
* A full list removes missing roles only when no conflicting observation overlaps the read.
|
|
189
|
+
* Partial bulk events replace only the roles they supply.
|
|
190
|
+
* A guild create event replaces this community's cached roles with its complete role list.
|
|
191
|
+
* The cache counts bigint permission fields as decimal strings when measuring bytes
|
|
192
|
+
*/
|
|
193
|
+
readonly roles?: boolean | ResourceCacheSettings<GuildRole>
|
|
194
|
+
/** Cache emoji metadata from REST reads and writes, not image bytes or creator accounts.
|
|
195
|
+
* A guild create event replaces this community's cached emojis with its complete list, and other community expression
|
|
196
|
+
* events clear observations.
|
|
197
|
+
* ResourceCacheSettings controls bounds and expiry, while gaps and shutdown release snapshots
|
|
198
|
+
*/
|
|
199
|
+
readonly emojis?: boolean | ResourceCacheSettings<GuildEmoji>
|
|
200
|
+
/** Cache sticker metadata, with the same bounds, expiry and invalidation rules as emojis */
|
|
201
|
+
readonly stickers?: boolean | ResourceCacheSettings<GuildSticker>
|
|
202
|
+
/** Cache community channels and threads from explicit reads and channel and thread events, without automatically listing them.
|
|
203
|
+
* A guild create event replaces this community's cached channels and threads with the channels and active threads the bot can view.
|
|
204
|
+
* Once a channel mutation is dispatched, the SDK clears this client's channel cache and prevents pending reads from restoring it,
|
|
205
|
+
* except that an operation confined to one thread clears only that thread.
|
|
206
|
+
* Bulk ordering events clear this community's cached channels because permission updates may still be in progress.
|
|
207
|
+
* Category updates or deletions also clear this community's channels because children can inherit changed permissions.
|
|
208
|
+
* Visibility loss clears the affected channel, and for a text, announcement, forum or media channel also its threads,
|
|
209
|
+
* because Fluxer deletes them without thread deletion events.
|
|
210
|
+
* Thread create and update events store the thread, a thread deletion clears it, and a thread list replaces the cached
|
|
211
|
+
* threads of its community or of its listed parent channels. A change to the bot's own membership of a thread clears
|
|
212
|
+
* that thread, because its membership field is then out of date.
|
|
213
|
+
* A full list removes missing channels, never threads, only when no conflicting observation overlaps the read.
|
|
214
|
+
* These snapshots are not a complete copy of the community's channels or threads
|
|
215
|
+
*/
|
|
216
|
+
readonly channels?: boolean | ResourceCacheSettings<GuildChannel>
|
|
217
|
+
/**
|
|
218
|
+
* Cache messages encountered in eligible REST results and gateway events, without automatically requesting history.
|
|
219
|
+
* Omission or false disables this category, while true or an options object enables it.
|
|
220
|
+
* Updates replace snapshots, while deletions and uncertain mutations remove them.
|
|
221
|
+
* A thread deletion removes the thread's messages. Deleting a text, announcement, forum or media channel also deletes its
|
|
222
|
+
* threads without thread events, so it removes the messages of every channel in that community, or without community
|
|
223
|
+
* context, that the channel cache does not hold, and every such message when the channel cache is off.
|
|
224
|
+
* Lost gateway connections clear affected entries even when the session resumes successfully.
|
|
225
|
+
* Overlapping reads and events can cause cache misses.
|
|
226
|
+
* A response that differs from an overlapping event only by lacking its community ID keeps the event snapshot.
|
|
227
|
+
* Shutdown releases this client's references, not messages still held by the application
|
|
228
|
+
*/
|
|
229
|
+
readonly messages?: boolean | MessageCacheOptions<NoInfer<SelectedMessage<F>>>
|
|
230
|
+
}
|
|
231
|
+
/** Set the startup deadline and retry limit used by both connect and run, and the recovery timing after readiness */
|
|
232
|
+
readonly connection?: {
|
|
233
|
+
/**
|
|
234
|
+
* Total milliseconds allowed for startup, including instance discovery, retries and every local shard becoming ready.
|
|
235
|
+
* Must be an integer from 1 through 2,147,483,647.
|
|
236
|
+
* When this client owns several shards, the SDK spaces their new-session Identify commands by one second and adds
|
|
237
|
+
* one second to this deadline for each shard after the first, so the spacing alone never causes a timeout.
|
|
238
|
+
* The spacing does not coordinate quotas across processes or an IP address. An identify coordinator replaces it, and
|
|
239
|
+
* the coordinator's waits count against this deadline. Automatic sharding counts the bot's communities under a separate
|
|
240
|
+
* deadline of the same length before the shards start.
|
|
241
|
+
* Expiry stops startup work, while completion still waits for the SDK's owned-resource cleanup
|
|
242
|
+
* @defaultValue 30000
|
|
243
|
+
*/
|
|
244
|
+
readonly startupTimeoutMs?: number
|
|
245
|
+
/**
|
|
246
|
+
* Maximum attempts to start each local shard, including its first attempt, as a positive safe integer.
|
|
247
|
+
* The SDK retries only failures it classifies as transient, and the overall deadline can stop retries sooner.
|
|
248
|
+
* This does not limit recovery attempts after a session has become ready
|
|
249
|
+
* @defaultValue 3
|
|
250
|
+
*/
|
|
251
|
+
readonly maxStartupAttempts?: number
|
|
252
|
+
/** Retry timing for established-session recovery. See ConnectionRecoveryOptions */
|
|
253
|
+
readonly recovery?: ConnectionRecoveryOptions
|
|
254
|
+
}
|
|
255
|
+
/**
|
|
256
|
+
* Divide community gateway traffic into numbered connections, called shards, and choose which this client owns.
|
|
257
|
+
* Omit this setting for one gateway connection, which moves to automatic sharding when Fluxer requires more shards, as
|
|
258
|
+
* described below. Omit shardIds to assign every shard in totalShards to this client.
|
|
259
|
+
* Explicit IDs are copied in the supplied order and cannot change during this client's lifetime.
|
|
260
|
+
* Use non-overlapping ID lists when another supervisor distributes shards across processes.
|
|
261
|
+
* Shard zero receives direct-message traffic, so a client handling DMs must own ID zero.
|
|
262
|
+
* A total of one uses the single-connection Identify format, without a shard tuple
|
|
263
|
+
*
|
|
264
|
+
* The value "auto", or totalShards "auto", sizes the plan once, at the first connect, and assigns every shard to this
|
|
265
|
+
* client. The SDK counts the bot's communities by paging GET /users/@me/guilds within startupTimeoutMs and uses one
|
|
266
|
+
* shard per 2,000 communities, from 1 through 16,384 shards. It never uses the shard count from GET /gateway/bot, which
|
|
267
|
+
* Fluxer fixes at 1. Fluxer rejects a new session with close code 4011 (sharding required) when that one shard holds
|
|
268
|
+
* more than 2,500 communities (MAX_GUILDS_PER_SHARD in fluxer_gateway/src/gateway/gateway_sharding.erl). Community IDs do not
|
|
269
|
+
* split evenly across shards, so the lower target keeps every shard below that ceiling and leaves room to grow.
|
|
270
|
+
* Until that count completes, client.shards and diagnostics().shards are empty and community routing treats every community
|
|
271
|
+
* as unowned. A failed count fails startup like a connection failure: A rejected token with AuthenticationError, an
|
|
272
|
+
* exhausted rate limit with RateLimitError, the deadline with ConnectionTimeoutError and other failures with
|
|
273
|
+
* ConnectionError whose phase is discovery, including a community list page that does not move past the previous one.
|
|
274
|
+
*
|
|
275
|
+
* When the bot grows and Fluxer closes a shard with 4011 while the client runs, the SDK counts the communities again and
|
|
276
|
+
* moves every shard to a larger plan in the same process: The plan for the new count, or one shard more when the count
|
|
277
|
+
* still fits the old total. Every shard then starts a new session under the new total, so events sent during the
|
|
278
|
+
* switch are missed and community-scoped caches refill from the new sessions. The SDK logs lifecycle.resharded at Warn
|
|
279
|
+
* with the old and new totals and keeps running. A failed count during a move ends the client with the same errors as a
|
|
280
|
+
* failed count at startup.
|
|
281
|
+
* After 3 such moves within an hour, or at 16,384 shards, a further 4011 ends the client with a
|
|
282
|
+
* ConnectionError as an explicit total does. Automatic sizing suits one process that owns every shard. Processes
|
|
283
|
+
* that split shards need an explicit total
|
|
284
|
+
*
|
|
285
|
+
* A client without this setting makes the same move from its one shard when Fluxer closes it with 4011, so a bot that
|
|
286
|
+
* outgrows one connection keeps running instead of failing.
|
|
287
|
+
* Once the bot is in more than 2,500 communities, each start first opens a session that Fluxer rejects, which the
|
|
288
|
+
* value "auto" avoids.
|
|
289
|
+
* An explicit total, including totalShards 1, never moves
|
|
290
|
+
*/
|
|
291
|
+
readonly sharding?: ShardingOptions | "auto"
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
/**
|
|
295
|
+
* Optional gateway settings: Malformed-dispatch handling and the fields sent in each new session's Identify.
|
|
296
|
+
* Creation validates and copies every value
|
|
297
|
+
*
|
|
298
|
+
* @category Options
|
|
299
|
+
*/
|
|
300
|
+
export interface GatewayOptions {
|
|
301
|
+
/** What to do when Fluxer sends a known dispatch that fails validation.
|
|
302
|
+
* The default, skip, drops that event, logs gateway.dispatchRejected at Warn with the dispatch type and failing field path,
|
|
303
|
+
* clears cache entries it could have changed and keeps the session running. When the dispatch lacks a usable
|
|
304
|
+
* channel or community ID, the entries it could have changed are found by message ID or cleared more widely.
|
|
305
|
+
* The value terminate ends the shard with a protocol ConnectionError instead, without the new-session retry that
|
|
306
|
+
* other invalid gateway data gets
|
|
307
|
+
*/
|
|
308
|
+
readonly onMalformedDispatch?: "skip" | "terminate"
|
|
309
|
+
/**
|
|
310
|
+
* Dispatch types Fluxer should not send to this client's sessions, to save bandwidth and decoding.
|
|
311
|
+
* Omission suppresses nothing. An array lists upper-case dispatch names such as TYPING_START or PRESENCE_UPDATE:
|
|
312
|
+
* Names may use letters, digits and underscores up to 64 characters, are upper-cased and deduplicated, and the list
|
|
313
|
+
* may hold at most 256 names that encode to at most 2,560 bytes, keeping Identify within Fluxer's 4,096-byte limit.
|
|
314
|
+
* Creation rejects READY, RESUMED and the request replies GUILD_MEMBERS_CHUNK, RATE_LIMITED, GUILD_COUNTS_UPDATE and
|
|
315
|
+
* CHANNEL_MEMBER_COUNTS_UPDATE, and any type an enabled cache category needs to stay current, with ConfigurationError.
|
|
316
|
+
* Fluxer still delivers MESSAGE_CREATE for a message that directly mentions the bot, @here or @everyone, but not
|
|
317
|
+
* merely for a role mention, a direct message or a message the bot authored. A suppressed dispatch uses no sequence
|
|
318
|
+
* number. MESSAGE_REACTION_ADD_MANY batches are generated from unsuppressed MESSAGE_REACTION_ADD dispatches, so
|
|
319
|
+
* ignoring ADD prevents batches, while ignoring MANY alone does not. The list is fixed for each session, so changing
|
|
320
|
+
* an explicit list needs a new client. Resume retains the session's filtering.
|
|
321
|
+
* Registering an event whose source dispatch types are all suppressed receives nothing, apart from the message
|
|
322
|
+
* mention exceptions, and each new session logs gateway.ignoredEventRegistered at Warn for such registrations
|
|
323
|
+
*
|
|
324
|
+
* The value "auto" computes the list at each new-session Identify from the events registered at that moment,
|
|
325
|
+
* through on, subscribe, waitFor, collectors and command routers: Every dispatch type that delivers no registered
|
|
326
|
+
* event is suppressed, except those enabled cache categories, presence member selection (GUILD_CREATE) and cache
|
|
327
|
+
* clearing (GUILD_DELETE) need, READY, RESUMED, request replies and types this SDK version does not decode.
|
|
328
|
+
* MESSAGE_REACTION_ADD and MESSAGE_REACTION_REMOVE are always kept, because reaction pages started after Identify
|
|
329
|
+
* read clicks from them, so bots in busy guilds save less than the registrations alone suggest. A raw
|
|
330
|
+
* subscriber disables suppression entirely. The tradeoff: A handler registered after a session started does not
|
|
331
|
+
* receive suppressed types until that shard's next new session, which a Resume does not start, so register handlers
|
|
332
|
+
* before connecting. A messageReactionAddMany registration keeps MESSAGE_REACTION_ADD for Fluxer's batch generator.
|
|
333
|
+
* Cache categories keep their dispatch types whether or not an event is registered, so enabled caches reduce the
|
|
334
|
+
* savings
|
|
335
|
+
*/
|
|
336
|
+
readonly ignoredEvents?: readonly string[] | "auto"
|
|
337
|
+
/**
|
|
338
|
+
* Identify session flags. Omission sets none. Creation rejects other keys and non-boolean values
|
|
339
|
+
*/
|
|
340
|
+
readonly flags?: {
|
|
341
|
+
/**
|
|
342
|
+
* Ask Fluxer to merge runs of reaction additions in direct messages and group direct messages into one
|
|
343
|
+
* messageReactionAddMany event (MESSAGE_REACTION_ADD_MANY) instead of many messageReactionAdd events.
|
|
344
|
+
* Community reactions always arrive individually. This is Fluxer's DEBOUNCE_MESSAGE_REACTIONS flag, value 2.
|
|
345
|
+
* Defaults to false
|
|
346
|
+
*/
|
|
347
|
+
readonly debounceMessageReactions?: boolean
|
|
348
|
+
}
|
|
349
|
+
/**
|
|
350
|
+
* Initial presence: The status each new session's Identify carries, and the first presence intent, as if
|
|
351
|
+
* presence.set were called with it before connecting. A later presence.set replaces it, and later new sessions
|
|
352
|
+
* then Identify with the latest accepted presence. Because Fluxer may prefer the account's saved status to an
|
|
353
|
+
* Identify presence, the SDK also publishes the intent with a presence update after READY or RESUMED, as for
|
|
354
|
+
* presence.set. Creation validates it like presence.set and fails with ConfigurationError for invalid input.
|
|
355
|
+
* Omission sends no Identify presence, so Fluxer uses the account's saved status
|
|
356
|
+
*/
|
|
357
|
+
readonly presence?: PresenceInput
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
/**
|
|
361
|
+
* Retry timing for shards that lost an established session. Startup retries keep their own timing within
|
|
362
|
+
* connection.startupTimeoutMs. Each recovery wait is a random delay from zero up to a ceiling that starts at minDelayMs
|
|
363
|
+
* and doubles per consecutive failure up to maxDelayMs, and never shorter than a wait Fluxer requires.
|
|
364
|
+
* Recovery never gives up on transient failures unless a native recovery schedule ends it. Creation validates every
|
|
365
|
+
* value and fails with ConfigurationError for other keys or out-of-range values
|
|
366
|
+
*
|
|
367
|
+
* @category Options
|
|
368
|
+
*/
|
|
369
|
+
export interface ConnectionRecoveryOptions {
|
|
370
|
+
/** Ceiling for the first recovery retry in milliseconds, an integer from 100 through 2,147,483,647
|
|
371
|
+
* @defaultValue 1000
|
|
372
|
+
*/
|
|
373
|
+
readonly minDelayMs?: number
|
|
374
|
+
/** Largest backoff ceiling in milliseconds, an integer from minDelayMs through 2,147,483,647.
|
|
375
|
+
* Defaults to 30,000, or to minDelayMs when that is larger
|
|
376
|
+
* @defaultValue 30000
|
|
377
|
+
*/
|
|
378
|
+
readonly maxDelayMs?: number
|
|
379
|
+
/** Time allowed for one recovery attempt in milliseconds, covering discovery, the handshake and Identify or Resume,
|
|
380
|
+
* an integer from 1,000 through 2,147,483,647. An attempt that runs out fails and is retried
|
|
381
|
+
* @defaultValue 30000
|
|
382
|
+
*/
|
|
383
|
+
readonly attemptTimeoutMs?: number
|
|
384
|
+
/** Continuous connected time in milliseconds after which the next connection loss restarts the backoff sequence
|
|
385
|
+
* from minDelayMs, an integer from 1,000 through 2,147,483,647. Socket cleanup never counts as connected time
|
|
386
|
+
* @defaultValue 60000
|
|
387
|
+
*/
|
|
388
|
+
readonly healthyResetMs?: number
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
/**
|
|
392
|
+
* The client's current gateway connection state, not a history of events.
|
|
393
|
+
* Disconnected permits startup. Connecting includes startup retries until every shard owned by this client is ready at the same time.
|
|
394
|
+
* Connected means every local shard is ready.
|
|
395
|
+
* Recovering means an established shard lost readiness and lasts until all shards owned by this client are ready again.
|
|
396
|
+
* Other ready shards can continue work during Recovering.
|
|
397
|
+
* Closing means permanent cleanup is underway, and Closed requires a new client to connect again
|
|
398
|
+
*
|
|
399
|
+
* @category Client and lifecycle
|
|
400
|
+
*/
|
|
401
|
+
export type ConnectionState = "Disconnected" | "Connecting" | "Connected" | "Recovering" | "Closing" | "Closed"
|
|
402
|
+
|
|
403
|
+
/**
|
|
404
|
+
* The resource category to inspect or clear in the client's local cache, not a remote resource identifier
|
|
405
|
+
*
|
|
406
|
+
* @category Caching
|
|
407
|
+
*/
|
|
408
|
+
export type CacheKind =
|
|
409
|
+
"messages" | "guilds" | "members" | "roles" | "channels" | "users" | "directMessages" | "emojis" | "stickers"
|
|
410
|
+
|
|
411
|
+
/** Maps each cache category to the snapshot returned by its local lookup and enumeration methods.
|
|
412
|
+
* Message snapshots use this client's selected message fields
|
|
413
|
+
*
|
|
414
|
+
* @category Caching
|
|
415
|
+
*/
|
|
416
|
+
export interface CachedResources<M extends MessageCore = Message> {
|
|
417
|
+
/** Messages encountered by eligible REST calls or gateway events */
|
|
418
|
+
readonly messages: M
|
|
419
|
+
/** Community identity and settings, without a preloaded member or role list */
|
|
420
|
+
readonly guilds: Guild
|
|
421
|
+
/** Individual community memberships */
|
|
422
|
+
readonly members: GuildMember
|
|
423
|
+
/** Community role definitions */
|
|
424
|
+
readonly roles: GuildRole
|
|
425
|
+
/** Community channels, distinct from private conversations */
|
|
426
|
+
readonly channels: GuildChannel
|
|
427
|
+
/** Public account profiles, not partial message authors */
|
|
428
|
+
readonly users: User
|
|
429
|
+
/** Direct-message and group direct-message conversations */
|
|
430
|
+
readonly directMessages: DirectMessageChannel
|
|
431
|
+
/** Community emoji metadata, not image bytes */
|
|
432
|
+
readonly emojis: GuildEmoji
|
|
433
|
+
/** Community sticker metadata, not image bytes */
|
|
434
|
+
readonly stickers: GuildSticker
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
/**
|
|
438
|
+
* Limit the snapshots returned by one local cache enumeration, without fetching missing resources
|
|
439
|
+
*
|
|
440
|
+
* @category Caching
|
|
441
|
+
*/
|
|
442
|
+
export interface CacheEntriesOptions {
|
|
443
|
+
/** Maximum snapshots to return, from 1 through 1,000, default 100 */
|
|
444
|
+
readonly limit?: number
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
/** Current snapshot count and accounted bytes for one local cache category, with running lookup and eviction totals since the client was created.
|
|
448
|
+
* These values measure SDK retention, not how many resources exist remotely or how much process memory is used.
|
|
449
|
+
* A disabled category reports zero for every total
|
|
450
|
+
*
|
|
451
|
+
* @category Caching
|
|
452
|
+
*/
|
|
453
|
+
export interface CacheDiagnostic {
|
|
454
|
+
/** Whether this category was configured when the client was created. A Closing/Closed client accepts no further snapshots */
|
|
455
|
+
readonly configured: boolean
|
|
456
|
+
/** Snapshots still held by the SDK after expired entries are removed */
|
|
457
|
+
readonly retainedEntries: number
|
|
458
|
+
/** Accounted UTF-8 JSON bytes of retained snapshots, excluding JavaScript overhead and caller-held copies */
|
|
459
|
+
readonly accountedBytes: number
|
|
460
|
+
/** Configured client-wide entry bound, or null when this category was disabled */
|
|
461
|
+
readonly maxEntries: number | null
|
|
462
|
+
/** Configured client-wide accounted-byte bound, or null when this category was disabled */
|
|
463
|
+
readonly maxBytes: number | null
|
|
464
|
+
/** Local lookups, such as client.messages.get, that returned a snapshot, including lookups the SDK makes itself */
|
|
465
|
+
readonly hits: number
|
|
466
|
+
/** Local lookups that found no snapshot, including one that had just expired */
|
|
467
|
+
readonly misses: number
|
|
468
|
+
/** Snapshots this category removed on its own, by reason.
|
|
469
|
+
* Removal by events, writes, cache.delete, clears, connection gaps and shutdown is not counted
|
|
470
|
+
*/
|
|
471
|
+
readonly evictions: {
|
|
472
|
+
/** Least recently used snapshots removed to make room within maxEntries or maxBytes */
|
|
473
|
+
readonly capacity: number
|
|
474
|
+
/** Snapshots removed because their maxAgeMs passed */
|
|
475
|
+
readonly expiry: number
|
|
476
|
+
}
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
/** Inspect this client's current connection state, occupied request slots and cache usage.
|
|
480
|
+
* These local values do not describe other processes or guarantee that a later request can start or the gateway will stay ready.
|
|
481
|
+
* Diagnostics include no token, remote route, resource ID or cached payload
|
|
482
|
+
*
|
|
483
|
+
* @category Logging and diagnostics
|
|
484
|
+
*/
|
|
485
|
+
export interface ClientDiagnostics {
|
|
486
|
+
/** Current aggregate client lifecycle state, not an event history or a readiness promise */
|
|
487
|
+
readonly state: ConnectionState
|
|
488
|
+
/** Slowest current shard heartbeat round-trip time in milliseconds, or null under ClientState.gatewayLatencyMs availability rules */
|
|
489
|
+
readonly gatewayLatencyMs: number | null
|
|
490
|
+
/** Current locally owned shard state only, in configured local order.
|
|
491
|
+
* Empty for an automatically sized client until its first connect has chosen the plan
|
|
492
|
+
*/
|
|
493
|
+
readonly shards: readonly ShardState[]
|
|
494
|
+
/** HTTP requests running or waiting for a slot in this client.
|
|
495
|
+
* Active values combine the rest.concurrency REST or upload slots, four per local shard by default, with the separate rest.mediaConcurrency media-download slots, four by default.
|
|
496
|
+
* Queued JSON bytes exclude attachment transfers and do not measure heap or process memory
|
|
497
|
+
*/
|
|
498
|
+
readonly rest: {
|
|
499
|
+
/** Requests currently using either the REST/upload pool or the media-download pool */
|
|
500
|
+
readonly activeRequests: number
|
|
501
|
+
/** Combined active-request capacity of those two pools */
|
|
502
|
+
readonly activeCapacity: number
|
|
503
|
+
/** Requests waiting for a local request slot */
|
|
504
|
+
readonly queuedRequests: number
|
|
505
|
+
/** Maximum queued requests shared by both pools */
|
|
506
|
+
readonly queuedCapacity: number
|
|
507
|
+
/** Accounted JSON-body bytes of queued requests, excluding attachment transfer bytes */
|
|
508
|
+
readonly queuedJsonBytes: number
|
|
509
|
+
/** Maximum accounted JSON-body bytes allowed in the shared queue */
|
|
510
|
+
readonly queuedJsonByteCapacity: number
|
|
511
|
+
}
|
|
512
|
+
/** Attachment transfer reservations across queued and active uploads, not caller buffers or remote temporary storage */
|
|
513
|
+
readonly uploads: {
|
|
514
|
+
/** Attachment transfer bytes currently reserved by queued and active work */
|
|
515
|
+
readonly reservedBytes: number
|
|
516
|
+
/** Configured maximum transfer-byte reservation for this client */
|
|
517
|
+
readonly byteCapacity: number
|
|
518
|
+
}
|
|
519
|
+
/** Local request slots shared by fresh counts and member streams, not provider worker occupancy or a cross-process quota */
|
|
520
|
+
readonly gatewayRequests: {
|
|
521
|
+
/** Logical count requests and member streams currently holding shared local slots */
|
|
522
|
+
readonly activeRequests: number
|
|
523
|
+
/** Maximum logical requests allowed concurrently by this client */
|
|
524
|
+
readonly activeCapacity: number
|
|
525
|
+
}
|
|
526
|
+
/** Current event sources, collectors and running callbacks owned by this client, not process memory or a shared quota.
|
|
527
|
+
* Counts exclude other clients and application tasks outside SDK event handlers
|
|
528
|
+
*/
|
|
529
|
+
readonly events: {
|
|
530
|
+
/** Open event sources, including subscriptions, event streams and single-event waits */
|
|
531
|
+
readonly subscriptions: number
|
|
532
|
+
/** Registered message collectors, including collectors waiting for matching messages */
|
|
533
|
+
readonly messageCollectors: number
|
|
534
|
+
/** Registered reaction collectors, including collectors waiting for matching reactions */
|
|
535
|
+
readonly reactionCollectors: number
|
|
536
|
+
/** Subscription callbacks currently executing, excluding idle subscriptions and collector filters */
|
|
537
|
+
readonly activeHandlers: number
|
|
538
|
+
}
|
|
539
|
+
/** Accounting for each local cache category.
|
|
540
|
+
* Closure releases retained snapshots but leaves configured capacity values available for inspection
|
|
541
|
+
*/
|
|
542
|
+
readonly caches: Readonly<Record<CacheKind, CacheDiagnostic>>
|
|
543
|
+
/** Running totals of failures, drops, retries, waits and reconnects since creation, including work the logs summarized or suppressed */
|
|
544
|
+
readonly counters: ClientCounters
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
/** Observe a client's current gateway state in either API without starting a connection */
|
|
548
|
+
export interface ClientState {
|
|
549
|
+
/** Current connection state, controlled by the SDK rather than the consumer */
|
|
550
|
+
readonly state: ConnectionState
|
|
551
|
+
/**
|
|
552
|
+
* The slowest current heartbeat round-trip time in milliseconds across this client's gateway shards.
|
|
553
|
+
* Null unless the client is Connected and every local shard has a current heartbeat acknowledgement.
|
|
554
|
+
* Connection loss, recovery and shutdown clear the affected shard's measurement until its new connection receives an acknowledgement.
|
|
555
|
+
* Zero is a valid measurement, not a marker for unavailable data
|
|
556
|
+
*/
|
|
557
|
+
readonly gatewayLatencyMs: number | null
|
|
558
|
+
/**
|
|
559
|
+
* Frozen connection state and heartbeat measurements for this client's shards, in configured local ID order.
|
|
560
|
+
* An unsharded client contains only shard ID zero until it moves to automatic sharding, and an automatically sized
|
|
561
|
+
* client contains none until its first connect has chosen the plan. Both contain the new plan's shards after a move.
|
|
562
|
+
* Inspect this to identify a recovering shard even while other shards remain ready.
|
|
563
|
+
* It excludes shards owned by other processes and does not establish whole-bot state or cross-process ordering
|
|
564
|
+
*/
|
|
565
|
+
readonly shards: readonly ShardState[]
|
|
566
|
+
/**
|
|
567
|
+
* Return the ID of this client's shard that receives a community's gateway events, or undefined when another
|
|
568
|
+
* process owns that shard. Fluxer calls a community a guild, so the argument is a guild ID.
|
|
569
|
+
* An automatically sized client returns undefined until its first connect has chosen the plan, and the answer can
|
|
570
|
+
* change when automatic sharding moves to a larger plan, including the first move of a client without sharding
|
|
571
|
+
* settings.
|
|
572
|
+
* The snowflakes.shardFor helper computes the same routing for any plan.
|
|
573
|
+
* Throws ConfigurationError when the ID is not a decimal string
|
|
574
|
+
*/
|
|
575
|
+
shardIdForGuild(guildId: string): number | undefined
|
|
576
|
+
}
|
|
577
|
+
|
|
578
|
+
/**
|
|
579
|
+
* Choose how shutdown treats work that is still running, in both entry points
|
|
580
|
+
*
|
|
581
|
+
* @category Client and lifecycle
|
|
582
|
+
*/
|
|
583
|
+
export interface ShutdownOptions {
|
|
584
|
+
/**
|
|
585
|
+
* Milliseconds to let running work finish before shutdown cancels it, an integer from 0 through 2,147,483,647.
|
|
586
|
+
* The default 0 cancels running handlers at once. The runBot function drains for 5,000 ms by default when asked to stop.
|
|
587
|
+
*
|
|
588
|
+
* During the drain the client accepts no new events. New subscriptions and event waits start closed, as after shutdown.
|
|
589
|
+
* Running handlers and commands continue, events already waiting in on handler queues still run, and REST requests
|
|
590
|
+
* continue, including new ones that handlers send. Scheduled task runs in progress continue, while tasks start no new
|
|
591
|
+
* run and new tasks are refused. The connection state stays as it was until the drain ends.
|
|
592
|
+
* The drain ends as soon as no handler or scheduled task is running, no event is waiting and no REST request is in
|
|
593
|
+
* progress, logging lifecycle.drained, or when the time runs out. Then shutdown continues as usual and cancels what is
|
|
594
|
+
* left, logging how many handlers, events, tasks and requests it cut off as a lifecycle.drainTimedOut Warn record.
|
|
595
|
+
* Collectors and subscribe subscriptions receive no events during the drain and end with the shutdown.
|
|
596
|
+
* A shutdown call while another is in progress shares that shutdown and its drain.
|
|
597
|
+
*
|
|
598
|
+
* A default API handler or scheduled task that awaits a draining shutdown of its own client keeps the drain waiting
|
|
599
|
+
* until the time runs out, so start the shutdown without awaiting it there. A native handler, collector callback or
|
|
600
|
+
* scheduled task that calls shutdown ends at once, and the drain continues for the other work.
|
|
601
|
+
* An invalid value throws ConfigurationError in the default API and dies with it in the Effect API, before shutdown starts
|
|
602
|
+
*/
|
|
603
|
+
readonly drainMs?: number
|
|
604
|
+
}
|
|
605
|
+
|
|
606
|
+
/**
|
|
607
|
+
* Choose when client.schedule runs a task, in both entry points. Without options the task runs once, as soon as possible
|
|
608
|
+
*
|
|
609
|
+
* @category Client and lifecycle
|
|
610
|
+
*/
|
|
611
|
+
export interface ScheduleOptions {
|
|
612
|
+
/**
|
|
613
|
+
* Milliseconds before the first run, an integer from 0 through 2,147,483,647.
|
|
614
|
+
* A repeating task waits intervalMs by default, like an interval timer, and a task that runs once waits 0
|
|
615
|
+
*/
|
|
616
|
+
readonly delayMs?: number
|
|
617
|
+
/**
|
|
618
|
+
* Repeat the task, waiting this many milliseconds after each run ends before the next one starts, an integer from 1
|
|
619
|
+
* through 2,147,483,647. Runs therefore never overlap. Without it the task runs once
|
|
620
|
+
*/
|
|
621
|
+
readonly intervalMs?: number
|
|
622
|
+
}
|
|
623
|
+
|
|
624
|
+
/** Add cancellation to a default-API operation with an AbortController's signal.
|
|
625
|
+
* Aborting affects this operation's owned work, not unrelated calls
|
|
626
|
+
*
|
|
627
|
+
* @category Options
|
|
628
|
+
*/
|
|
629
|
+
export interface OperationOptions {
|
|
630
|
+
/**
|
|
631
|
+
* Pass an AbortController's signal to cancel this operation and await its required cleanup.
|
|
632
|
+
* An already-aborted signal cancels before the operation takes ownership.
|
|
633
|
+
* For connect it controls startup only, so aborting after READY does not close the established connection.
|
|
634
|
+
* For an accepted run it controls the full client lifetime, but waitForClose cancels only that observer.
|
|
635
|
+
* Cancellation cannot undo a dispatched server mutation, and a later abort cannot undo completed work.
|
|
636
|
+
* A malformed signal returns ConfigurationError with field signal before work starts, or on a lazy iterator's first next.
|
|
637
|
+
* Throwing signal accessors or listener methods are application faults rather than typed input failures, rejected as
|
|
638
|
+
* SdkDefect with code application.defect and the thrown value as its cause.
|
|
639
|
+
* Shutdown does not accept a signal
|
|
640
|
+
*/
|
|
641
|
+
readonly signal?: OperationSignal
|
|
642
|
+
}
|
|
643
|
+
|
|
644
|
+
/** The AbortSignal members used by default-API operations.
|
|
645
|
+
* A standard AbortController provides this shape without requiring DOM types in the TypeScript project
|
|
646
|
+
*
|
|
647
|
+
* @category Options
|
|
648
|
+
*/
|
|
649
|
+
export interface OperationSignal {
|
|
650
|
+
/** Whether cancellation has already been requested */
|
|
651
|
+
readonly aborted: boolean
|
|
652
|
+
/** Register the callback that requests operation cancellation when the signal aborts */
|
|
653
|
+
addEventListener(
|
|
654
|
+
type: "abort",
|
|
655
|
+
listener: () => void,
|
|
656
|
+
options?: {
|
|
657
|
+
/** Remove this listener automatically after its first abort event */
|
|
658
|
+
once?: boolean
|
|
659
|
+
},
|
|
660
|
+
): void
|
|
661
|
+
/** Remove the operation's callback when its observation ends */
|
|
662
|
+
removeEventListener(type: "abort", listener: () => void): void
|
|
663
|
+
}
|