@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
|
@@ -0,0 +1,359 @@
|
|
|
1
|
+
import type { Result } from "neverthrow"
|
|
2
|
+
import { assets as sharedAssets, type AssetHelpers } from "#sdk/assets"
|
|
3
|
+
import { colors as sharedColors, type ColorInput, type RgbColor } from "#sdk/colors"
|
|
4
|
+
import { text as sharedText, type TextHelpers } from "#sdk/text"
|
|
5
|
+
import {
|
|
6
|
+
display as sharedDisplay,
|
|
7
|
+
format as sharedFormat,
|
|
8
|
+
links as sharedLinks,
|
|
9
|
+
permissionBits as sharedPermissionBits,
|
|
10
|
+
snowflakes as sharedSnowflakes,
|
|
11
|
+
type CustomEmojiMarkup,
|
|
12
|
+
type DisplayHelpers,
|
|
13
|
+
type HelperError,
|
|
14
|
+
type LinkHelpers,
|
|
15
|
+
type Mention,
|
|
16
|
+
type PermissionBitHelpers,
|
|
17
|
+
type TimestampMarkup,
|
|
18
|
+
type TimestampStyle,
|
|
19
|
+
} from "#sdk/helpers"
|
|
20
|
+
import * as Effect from "effect/Effect"
|
|
21
|
+
|
|
22
|
+
export type { AssetHelpers, LinkHelpers, PermissionBitHelpers, TextHelpers }
|
|
23
|
+
|
|
24
|
+
/** Run a try-helper when the Effect executes, moving its Err into the typed error channel */
|
|
25
|
+
function resultEffect<A>(create: () => Result<A, HelperError>): Effect.Effect<A, HelperError> {
|
|
26
|
+
return Effect.suspend(() => {
|
|
27
|
+
const result = create()
|
|
28
|
+
return result.isOk() ? Effect.succeed(result.value) : Effect.fail(result.error)
|
|
29
|
+
})
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Methods of the native format helper, which creates and reads mention, timestamp and custom-emoji markup and escapes Markdown.
|
|
34
|
+
* Most methods return plain values and throw HelperError for invalid input, and such a throw inside Effect code becomes a defect.
|
|
35
|
+
* The try-prefixed parsers accept untrusted text and return Effects that fail with HelperError in the error channel
|
|
36
|
+
*
|
|
37
|
+
* @category Builders and formatting
|
|
38
|
+
*/
|
|
39
|
+
export type FormatHelpers = Readonly<{
|
|
40
|
+
/**
|
|
41
|
+
* Add backslashes so text is treated literally by Fluxer's markup parser, for example escaping `**bold**`.
|
|
42
|
+
* Returns the escaped string immediately and never throws for string input.
|
|
43
|
+
* It does not change a message's `allowedMentions` or enable notifications
|
|
44
|
+
*/
|
|
45
|
+
escapeMarkdown: (value: string) => string
|
|
46
|
+
/**
|
|
47
|
+
* Create `<@id>` text for a decimal user ID, such as `<@123>`, and return it directly.
|
|
48
|
+
* Throws HelperError when the ID is not a valid decimal-string snowflake.
|
|
49
|
+
* This does not look up the user, and allowedMentions must be set separately to request a notification
|
|
50
|
+
*/
|
|
51
|
+
userMention: (id: string) => string
|
|
52
|
+
/**
|
|
53
|
+
* Create `<@&id>` text for a decimal role ID, such as `<@&123>`, and return it directly.
|
|
54
|
+
* Throws HelperError for an invalid ID.
|
|
55
|
+
* Role members are not notified merely because this text appears in a message, and allowedMentions must be set separately
|
|
56
|
+
*/
|
|
57
|
+
roleMention: (id: string) => string
|
|
58
|
+
/**
|
|
59
|
+
* Create `<#id>` text linking to a channel, such as `<#123>`, and return it directly.
|
|
60
|
+
* Throws HelperError for an invalid decimal-string ID, and no channel lookup occurs
|
|
61
|
+
*/
|
|
62
|
+
channelMention: (id: string) => string
|
|
63
|
+
/**
|
|
64
|
+
* Read a string containing exactly one user, role or channel mention into a frozen `{ kind, id }` object.
|
|
65
|
+
* Both `<@id>` and `<@!id>` produce kind `"user"`.
|
|
66
|
+
* Throws HelperError for surrounding text, malformed markup or an invalid decimal ID.
|
|
67
|
+
* For text received from users, use tryParseMention, which reports the same HelperError without throwing
|
|
68
|
+
*/
|
|
69
|
+
parseMention: (value: string) => Mention
|
|
70
|
+
/**
|
|
71
|
+
* Read a mention with the same rules as parseMention, but report invalid text without throwing.
|
|
72
|
+
* The default API returns a Result holding the frozen `{ kind, id }` object or HelperError.
|
|
73
|
+
* The native API returns an Effect that reads the text when run and fails with HelperError.
|
|
74
|
+
* Use it for text received from users or other untrusted sources
|
|
75
|
+
*/
|
|
76
|
+
tryParseMention: (value: string) => Effect.Effect<Mention, HelperError, never>
|
|
77
|
+
/**
|
|
78
|
+
* Create `<t:seconds:style>` message text from a Date, which Fluxer displays in the reader's local time.
|
|
79
|
+
* The style defaults to ShortDateTime, and milliseconds are dropped.
|
|
80
|
+
* The whole Unix second must be from 1 through 8_640_000_000_000.
|
|
81
|
+
* Throws HelperError for an invalid Date, a time outside that range or an unsupported style.
|
|
82
|
+
* The input Date is not changed
|
|
83
|
+
*/
|
|
84
|
+
timestamp: (value: Date, style?: TimestampStyle) => string
|
|
85
|
+
/**
|
|
86
|
+
* Read exactly one `<t:seconds:style>` or `<t:seconds>` string into a frozen object with a new Date and style.
|
|
87
|
+
* A missing style becomes ShortDateTime.
|
|
88
|
+
* The Date has whole-second precision.
|
|
89
|
+
* Throws HelperError for malformed markup, nonpositive seconds or dates outside JavaScript's range.
|
|
90
|
+
* For text received from users, use tryParseTimestamp, which reports the same HelperError without throwing
|
|
91
|
+
*/
|
|
92
|
+
parseTimestamp: (value: string) => TimestampMarkup
|
|
93
|
+
/**
|
|
94
|
+
* Read timestamp markup with the same rules as parseTimestamp, but report invalid text without throwing.
|
|
95
|
+
* The default API returns a Result holding the frozen date and style or HelperError.
|
|
96
|
+
* The native API returns an Effect that reads the text when run and fails with HelperError.
|
|
97
|
+
* Use it for text received from users or other untrusted sources
|
|
98
|
+
*/
|
|
99
|
+
tryParseTimestamp: (value: string) => Effect.Effect<TimestampMarkup, HelperError, never>
|
|
100
|
+
/**
|
|
101
|
+
* Create `<:name:id>` text, or `<a:name:id>` when animated is true.
|
|
102
|
+
* A GuildEmoji can be passed directly.
|
|
103
|
+
* Throws HelperError for invalid names, IDs or animation values.
|
|
104
|
+
* This does not upload or look up an emoji
|
|
105
|
+
*/
|
|
106
|
+
customEmoji: (input: CustomEmojiMarkup) => string
|
|
107
|
+
/**
|
|
108
|
+
* Read exactly one `<:name:id>` or `<a:name:id>` string into frozen name, ID and animated fields.
|
|
109
|
+
* Throws HelperError for malformed markup.
|
|
110
|
+
* This does not resolve shortcodes such as `:smile:` or parse Unicode emoji.
|
|
111
|
+
* For text received from users, use tryParseCustomEmoji, which reports the same HelperError without throwing
|
|
112
|
+
*/
|
|
113
|
+
parseCustomEmoji: (value: string) => CustomEmojiMarkup
|
|
114
|
+
/**
|
|
115
|
+
* Read custom-emoji markup with the same rules as parseCustomEmoji, but report invalid text without throwing.
|
|
116
|
+
* The default API returns a Result holding the frozen name, ID and animated fields or HelperError.
|
|
117
|
+
* The native API returns an Effect that reads the text when run and fails with HelperError.
|
|
118
|
+
* Use it for text received from users or other untrusted sources
|
|
119
|
+
*/
|
|
120
|
+
tryParseCustomEmoji: (value: string) => Effect.Effect<CustomEmojiMarkup, HelperError, never>
|
|
121
|
+
}>
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* Create and read Fluxer mention, timestamp and custom-emoji markup without a client or network requests.
|
|
125
|
+
* Most methods return plain values immediately, the same as in the default API, and throw HelperError for invalid input.
|
|
126
|
+
* Inside Effect code such a throw becomes a defect rather than a typed failure, because invalid input is a programming mistake.
|
|
127
|
+
* For text received from users, tryParseMention, tryParseTimestamp and tryParseCustomEmoji return Effects that read the text when run and fail with HelperError.
|
|
128
|
+
* Mention markup alone does not enable notifications
|
|
129
|
+
*
|
|
130
|
+
* @example
|
|
131
|
+
* ```ts
|
|
132
|
+
* import { Effect } from "effect"
|
|
133
|
+
* import { format, links, type GuildChannel } from "@neontechspace/fluxerly/effect"
|
|
134
|
+
*
|
|
135
|
+
* export const helpersEffectExample = (userId: string, messageId: string, channel: GuildChannel, userText: string) =>
|
|
136
|
+
* Effect.gen(function* () {
|
|
137
|
+
* const mentioned = yield* format.tryParseMention(userText)
|
|
138
|
+
* return {
|
|
139
|
+
* escaped: format.escapeMarkdown("@everyone: **literal**"),
|
|
140
|
+
* mention: format.userMention(userId),
|
|
141
|
+
* message: links.message({ id: messageId, channelId: channel.id }, channel),
|
|
142
|
+
* mentionedId: mentioned.id,
|
|
143
|
+
* }
|
|
144
|
+
* })
|
|
145
|
+
* ```
|
|
146
|
+
*
|
|
147
|
+
* @category Builders and formatting
|
|
148
|
+
*/
|
|
149
|
+
export const format: FormatHelpers = Object.freeze({
|
|
150
|
+
escapeMarkdown: sharedFormat.escapeMarkdown,
|
|
151
|
+
userMention: sharedFormat.userMention,
|
|
152
|
+
roleMention: sharedFormat.roleMention,
|
|
153
|
+
channelMention: sharedFormat.channelMention,
|
|
154
|
+
parseMention: sharedFormat.parseMention,
|
|
155
|
+
tryParseMention: (value: string) => resultEffect(() => sharedFormat.tryParseMention(value)),
|
|
156
|
+
timestamp: sharedFormat.timestamp,
|
|
157
|
+
parseTimestamp: sharedFormat.parseTimestamp,
|
|
158
|
+
tryParseTimestamp: (value: string) => resultEffect(() => sharedFormat.tryParseTimestamp(value)),
|
|
159
|
+
customEmoji: sharedFormat.customEmoji,
|
|
160
|
+
parseCustomEmoji: sharedFormat.parseCustomEmoji,
|
|
161
|
+
tryParseCustomEmoji: (value: string) => resultEffect(() => sharedFormat.tryParseCustomEmoji(value)),
|
|
162
|
+
})
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
* Methods of the native snowflakes helper, which reads and converts decimal Fluxer IDs without losing precision.
|
|
166
|
+
* Conversions return plain values and throw HelperError for invalid input, and such a throw inside Effect code becomes a defect.
|
|
167
|
+
* The tryParse method returns an Effect that fails with HelperError in the error channel
|
|
168
|
+
*
|
|
169
|
+
* @category Builders and formatting
|
|
170
|
+
*/
|
|
171
|
+
export type SnowflakeHelpers = Readonly<{
|
|
172
|
+
/**
|
|
173
|
+
* Return true for a decimal string from `"0"` through `"9223372036854775807"`, with no extra leading zeroes.
|
|
174
|
+
* Returns false immediately for numbers, whitespace and invalid strings, without converting through Number or failing
|
|
175
|
+
*/
|
|
176
|
+
isValid: (value: unknown) => value is string
|
|
177
|
+
/**
|
|
178
|
+
* Convert a valid decimal-string ID to bigint without losing precision.
|
|
179
|
+
* Throws HelperError for an invalid ID.
|
|
180
|
+
* For IDs received from users, use tryParse, which reports the same HelperError without throwing
|
|
181
|
+
*/
|
|
182
|
+
parse: (value: string) => bigint
|
|
183
|
+
/**
|
|
184
|
+
* Convert a decimal-string ID with the same rules as parse, but report an invalid ID without throwing.
|
|
185
|
+
* The default API returns a Result holding the bigint or HelperError.
|
|
186
|
+
* The native API returns an Effect that reads the ID when run and fails with HelperError.
|
|
187
|
+
* Use it for IDs received from users or other untrusted sources
|
|
188
|
+
*/
|
|
189
|
+
tryParse: (value: string) => Effect.Effect<bigint, HelperError, never>
|
|
190
|
+
/**
|
|
191
|
+
* Return a new UTC Date for the creation time encoded in an ID.
|
|
192
|
+
* Throws HelperError for an invalid ID.
|
|
193
|
+
* This decodes the ID's high 41 timestamp bits relative to 2015-01-01 UTC, and does not fetch the resource or prove it is visible
|
|
194
|
+
*/
|
|
195
|
+
createdAt: (value: string) => Date
|
|
196
|
+
/**
|
|
197
|
+
* Make the smallest ID for a Date's exact UTC millisecond, useful as a time-based pagination boundary.
|
|
198
|
+
* Throws HelperError for an invalid Date, a date before 2015-01-01 UTC or a result outside the ID range.
|
|
199
|
+
* This does not create a resource.
|
|
200
|
+
* Whether the boundary is included depends on the endpoint using it
|
|
201
|
+
*/
|
|
202
|
+
boundary: (value: Date) => string
|
|
203
|
+
/**
|
|
204
|
+
* Return the shard that receives a community's gateway events when the bot runs totalShards shards.
|
|
205
|
+
* Fluxer calls a community a guild, so the first argument is a guild ID.
|
|
206
|
+
* Fluxer routes each community with (guildId >> 22) % totalShards, and this helper applies the same formula.
|
|
207
|
+
* Use it to find which process owns a community when shards run in several processes.
|
|
208
|
+
* Throws HelperError for an invalid ID or a totalShards outside 1 through 16,384.
|
|
209
|
+
* It does not check whether the bot belongs to that community
|
|
210
|
+
*/
|
|
211
|
+
shardFor: (guildId: string, totalShards: number) => number
|
|
212
|
+
}>
|
|
213
|
+
|
|
214
|
+
/** Validate Fluxer IDs, read their creation time or create pagination boundaries.
|
|
215
|
+
* A snowflake is Fluxer's time-based decimal-string ID. Conversions use bigint to avoid Number precision loss.
|
|
216
|
+
* They return plain values and throw HelperError for invalid input, which becomes a defect inside Effect code.
|
|
217
|
+
* For IDs received from users, tryParse returns an Effect that fails with HelperError instead
|
|
218
|
+
*
|
|
219
|
+
* @category Builders and formatting
|
|
220
|
+
*/
|
|
221
|
+
export const snowflakes: SnowflakeHelpers = Object.freeze({
|
|
222
|
+
isValid: sharedSnowflakes.isValid,
|
|
223
|
+
parse: sharedSnowflakes.parse,
|
|
224
|
+
tryParse: (value: string) => resultEffect(() => sharedSnowflakes.tryParse(value)),
|
|
225
|
+
createdAt: sharedSnowflakes.createdAt,
|
|
226
|
+
boundary: sharedSnowflakes.boundary,
|
|
227
|
+
shardFor: sharedSnowflakes.shardFor,
|
|
228
|
+
})
|
|
229
|
+
|
|
230
|
+
/** Choose a display name from user data and an optional community member, without a request or cache lookup.
|
|
231
|
+
* The display.name helper prefers the member nickname, then the user's displayName, then username.
|
|
232
|
+
* Only null or undefined trigger a fallback.
|
|
233
|
+
* Supply a member belonging to the same user, because this helper does not check identity
|
|
234
|
+
*
|
|
235
|
+
* @category Builders and formatting
|
|
236
|
+
*/
|
|
237
|
+
export const display: DisplayHelpers = sharedDisplay
|
|
238
|
+
|
|
239
|
+
/** Build and inspect permission bitfields from named Fluxer permissions.
|
|
240
|
+
* A bitfield stores permission flags in a bigint. Methods return plain values immediately, the same as in the default API, without fetching resources or deciding whether an action is allowed.
|
|
241
|
+
* Unknown names or bits outside the unsigned 64-bit range throw HelperError, and such a throw inside Effect code becomes a defect
|
|
242
|
+
*
|
|
243
|
+
* @category Roles and permissions
|
|
244
|
+
*/
|
|
245
|
+
export const permissionBits: PermissionBitHelpers = sharedPermissionBits
|
|
246
|
+
|
|
247
|
+
/**
|
|
248
|
+
* Methods of the native colors helper, which converts RGB numbers, hex strings and tuples.
|
|
249
|
+
* Most methods return plain values and throw HelperError for invalid input, and such a throw inside Effect code becomes a defect.
|
|
250
|
+
* The tryParse method returns an Effect that fails with HelperError in the error channel
|
|
251
|
+
*
|
|
252
|
+
* @category Builders and formatting
|
|
253
|
+
*/
|
|
254
|
+
export type ColorHelpers = Readonly<{
|
|
255
|
+
/**
|
|
256
|
+
* Convert a six-digit hexadecimal string, an RGB array of three integer channels from 0 through 255, or a color number to the integer used by embeds and roles.
|
|
257
|
+
* The leading `#` is optional.
|
|
258
|
+
* CSS names, three-digit shorthand, alpha channels and surrounding whitespace are rejected.
|
|
259
|
+
* Values are never rounded or clamped, and invalid input throws HelperError.
|
|
260
|
+
* For colors received from users, use tryParse, which reports the same HelperError without throwing
|
|
261
|
+
*/
|
|
262
|
+
parse: (value: ColorInput) => number
|
|
263
|
+
/**
|
|
264
|
+
* Convert a color with the same rules as parse, but report invalid input without throwing.
|
|
265
|
+
* The default API returns a Result holding the color integer or HelperError.
|
|
266
|
+
* The native API returns an Effect that reads the input when run and fails with HelperError.
|
|
267
|
+
* Use it for colors received from users or other untrusted sources
|
|
268
|
+
*/
|
|
269
|
+
tryParse: (value: ColorInput) => Effect.Effect<number, HelperError, never>
|
|
270
|
+
/**
|
|
271
|
+
* Turn a color integer into a lowercase six-digit string such as `"#000001"`, including leading zeroes.
|
|
272
|
+
* Accepts only integers from 0 through 0xffffff, not the strings or arrays accepted by `parse`.
|
|
273
|
+
* Throws HelperError for invalid numbers
|
|
274
|
+
*/
|
|
275
|
+
toHex: (value: number) => string
|
|
276
|
+
/**
|
|
277
|
+
* Split a color integer into a new frozen `[red, green, blue]` array, each from 0 through 255.
|
|
278
|
+
* Accepts only integers from 0 through 0xffffff.
|
|
279
|
+
* Throws HelperError for invalid numbers
|
|
280
|
+
*/
|
|
281
|
+
toRgb: (value: number) => RgbColor
|
|
282
|
+
}>
|
|
283
|
+
|
|
284
|
+
/** Convert RGB colors between integers, hex strings and channel tuples.
|
|
285
|
+
* Methods return plain values immediately. Invalid values throw HelperError instead of being coerced or clamped, and CSS color names are not accepted.
|
|
286
|
+
* Such a throw inside Effect code becomes a defect. For colors received from users, tryParse returns an Effect that fails with HelperError instead
|
|
287
|
+
*
|
|
288
|
+
* @category Builders and formatting
|
|
289
|
+
*/
|
|
290
|
+
export const colors: ColorHelpers = Object.freeze({
|
|
291
|
+
parse: sharedColors.parse,
|
|
292
|
+
tryParse: (value: ColorInput) => resultEffect(() => sharedColors.tryParse(value)),
|
|
293
|
+
toHex: sharedColors.toHex,
|
|
294
|
+
toRgb: sharedColors.toRgb,
|
|
295
|
+
})
|
|
296
|
+
|
|
297
|
+
/**
|
|
298
|
+
* Split long text into length-bounded pieces without losing its contents.
|
|
299
|
+
* The caller chooses the length limit, how to send the pieces and any Markdown handling.
|
|
300
|
+
* The split method returns the pieces directly, without sending them.
|
|
301
|
+
* Invalid text or options throw HelperError, and such a throw inside Effect code becomes a defect
|
|
302
|
+
*
|
|
303
|
+
* @example
|
|
304
|
+
* ```ts
|
|
305
|
+
* import { Effect } from "effect"
|
|
306
|
+
* import { permissionBits, colors, text } from "@neontechspace/fluxerly/effect"
|
|
307
|
+
*
|
|
308
|
+
* export function pureHelpersExample(bits: bigint, content: string, colorText: string) {
|
|
309
|
+
* return Effect.gen(function* () {
|
|
310
|
+
* const color = yield* colors.tryParse(colorText)
|
|
311
|
+
* return {
|
|
312
|
+
* required: permissionBits.from(["ManageRoles", "ManageMessages"]),
|
|
313
|
+
* missing: permissionBits.missing(bits, ["ManageRoles", "ManageMessages"]),
|
|
314
|
+
* inspection: permissionBits.inspect(bits),
|
|
315
|
+
* color,
|
|
316
|
+
* chunks: text.split(content, { maxLength: 2_000 }),
|
|
317
|
+
* }
|
|
318
|
+
* })
|
|
319
|
+
* }
|
|
320
|
+
* ```
|
|
321
|
+
*
|
|
322
|
+
* @category Builders and formatting
|
|
323
|
+
*/
|
|
324
|
+
export const text: TextHelpers = sharedText
|
|
325
|
+
|
|
326
|
+
/** Build hosted Fluxer channel, message and bot-installation links from supplied IDs.
|
|
327
|
+
* Methods return URLs immediately, the same as in the default API, and throw HelperError for invalid input.
|
|
328
|
+
* Such a throw inside Effect code becomes a defect. Building a link does not visit it or check access
|
|
329
|
+
*
|
|
330
|
+
* @category Builders and formatting
|
|
331
|
+
*/
|
|
332
|
+
export const links: LinkHelpers = sharedLinks
|
|
333
|
+
|
|
334
|
+
/**
|
|
335
|
+
* Build image URLs for hosted Fluxer from supplied user, member, community, emoji or sticker data.
|
|
336
|
+
* Methods return URLs immediately, the same as in the default API, and use fixed hosted addresses. Use client.instance.resolve for URLs on a selected self-hosted instance.
|
|
337
|
+
* Invalid targets, IDs, hashes or options throw AssetUrlError, and such a throw inside Effect code becomes a defect.
|
|
338
|
+
* Image format defaults to WebP. Omit size to leave pixel size selection to Fluxer.
|
|
339
|
+
* Options are validated even when the supplied asset is absent.
|
|
340
|
+
* These helpers do not fetch profiles, change caches, download bytes, refresh URLs or change attachment or embed URLs.
|
|
341
|
+
* Custom base addresses are not accepted by this hosted namespace.
|
|
342
|
+
* Omitted optional asset hashes become `undefined`. Known absent hashes become `null`. A returned URL does not prove the asset exists
|
|
343
|
+
*
|
|
344
|
+
* @example
|
|
345
|
+
* ```ts
|
|
346
|
+
* import { assets, AssetFormats, type Guild, type GuildEmoji, type GuildMember, type User, type UserProfile } from "@neontechspace/fluxerly/effect"
|
|
347
|
+
*
|
|
348
|
+
* export const assetsEffectExample = (user: Pick<User, "id" | "avatar">, member: Pick<GuildMember, "guildId" | "userId" | "avatar" | "profileFlags">, guild: Pick<Guild, "id" | "icon">, emoji: Pick<GuildEmoji, "id" | "animated">, profile: UserProfile) => ({
|
|
349
|
+
* avatar: assets.displayAvatar(user, { size: 256, format: AssetFormats.Webp }),
|
|
350
|
+
* memberAvatar: assets.displayMemberAvatar(user, member, { size: 256 }),
|
|
351
|
+
* icon: assets.guildIcon(guild, { format: AssetFormats.Png }),
|
|
352
|
+
* emojiUrl: assets.emoji(emoji, { animated: emoji.animated }),
|
|
353
|
+
* banner: assets.userBanner(profile),
|
|
354
|
+
* })
|
|
355
|
+
* ```
|
|
356
|
+
*
|
|
357
|
+
* @category Builders and formatting
|
|
358
|
+
*/
|
|
359
|
+
export const assets: AssetHelpers = sharedAssets
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { hierarchy as sharedHierarchy, type HierarchyHelpers } from "#sdk/role-hierarchy"
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Compare roles and members by Fluxer's role hierarchy from snapshots already held, returning plain values rather than Effects.
|
|
5
|
+
* Invalid snapshots throw GuildOperationError with reason input, and such a throw inside Effect code becomes a defect,
|
|
6
|
+
* because inconsistent snapshots are a programming mistake
|
|
7
|
+
* @example
|
|
8
|
+
* ```ts
|
|
9
|
+
* import { Effect } from "effect"
|
|
10
|
+
* import { hierarchy, type Client } from "@neontechspace/fluxerly/effect"
|
|
11
|
+
* export function hierarchyExample(client: Client, guildId: string, actorUserId: string, targetUserId: string) {
|
|
12
|
+
* return Effect.gen(function* () {
|
|
13
|
+
* const [guild, actor, target, roles] = yield* Effect.all([
|
|
14
|
+
* client.guilds.fetch(guildId),
|
|
15
|
+
* client.members.fetch({ guildId, userId: actorUserId }),
|
|
16
|
+
* client.members.fetch({ guildId, userId: targetUserId }),
|
|
17
|
+
* client.roles.fetchAll(guildId),
|
|
18
|
+
* ])
|
|
19
|
+
* return hierarchy.canManage({ guild, actor, target, roles })
|
|
20
|
+
* })
|
|
21
|
+
* }
|
|
22
|
+
* ```
|
|
23
|
+
*
|
|
24
|
+
* @category Roles and permissions
|
|
25
|
+
*/
|
|
26
|
+
export const hierarchy: HierarchyHelpers = sharedHierarchy
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import type * as Effect from "effect/Effect"
|
|
2
|
+
import type { InstanceResolveError, InstanceResolveOptions, ResolvedInstance } from "#sdk/instance"
|
|
3
|
+
|
|
4
|
+
export type { ResolvedInstance }
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Return the shared resolved-instance value for native callers.
|
|
8
|
+
* Its asset and link helpers already return plain values in both APIs, so no Effect wrapping is needed
|
|
9
|
+
*/
|
|
10
|
+
export function effectInstance(value: ResolvedInstance): ResolvedInstance {
|
|
11
|
+
return value
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Resolve the service addresses and URL helpers for the instance selected at client creation
|
|
16
|
+
*
|
|
17
|
+
* The resolve method starts when executed and uses the caller's Effect services. Concurrent callers share one document read
|
|
18
|
+
* that runs in the client Scope. Interrupting one caller releases only that caller's wait. A successful immutable
|
|
19
|
+
* result is reused without refresh until client shutdown
|
|
20
|
+
*
|
|
21
|
+
* The resolved assets and links helpers return URLs directly, the same as in the default API.
|
|
22
|
+
* They throw AssetUrlError or HelperError for invalid input, and such a throw inside Effect code becomes a defect
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* ```ts
|
|
26
|
+
* import { Effect } from "effect"
|
|
27
|
+
* import type { Client } from "@neontechspace/fluxerly/effect"
|
|
28
|
+
* export const instanceExample = (client: Client) => Effect.gen(function* () {
|
|
29
|
+
* const resolved = yield* client.instance.resolve({ timeoutMs: 10_000 })
|
|
30
|
+
* const channel = resolved.links.channel({ id: "1750000000000000000" })
|
|
31
|
+
* const avatar = resolved.assets.defaultAvatar("1750000000000000000")
|
|
32
|
+
* return { api: resolved.endpoints.apiPublic, channel, avatar }
|
|
33
|
+
* })
|
|
34
|
+
* ```
|
|
35
|
+
*
|
|
36
|
+
* @category Client and lifecycle
|
|
37
|
+
*/
|
|
38
|
+
export interface Instance {
|
|
39
|
+
/**
|
|
40
|
+
* Resolve this client's instance endpoints and its pure link and asset URL helpers.
|
|
41
|
+
* The unauthenticated discovery request is shared with other resolves, REST work or gateway startup.
|
|
42
|
+
* The timeoutMs option defaults to 30,000 for this wait only.
|
|
43
|
+
* Cancellation releases only this wait, while other users can keep the shared discovery read alive.
|
|
44
|
+
* Document, rate-limit, timeout, closure and invalid timeout-option failures are expected failures
|
|
45
|
+
*
|
|
46
|
+
* @remarks
|
|
47
|
+
* Cleanup defects remain in the Cause alongside any failure or interruption
|
|
48
|
+
*/
|
|
49
|
+
resolve(options?: InstanceResolveOptions): Effect.Effect<ResolvedInstance, InstanceResolveError>
|
|
50
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import type { Invite, InviteCreate, InviteMetadata } from "#sdk/invites"
|
|
2
|
+
import type * as Effect from "effect/Effect"
|
|
3
|
+
import type { GuildOperationFailure, GuildOperationOptions, ModerationOptions } from "#sdk/guilds"
|
|
4
|
+
|
|
5
|
+
/** Inspect, create, list or revoke invite codes without joining their destinations.
|
|
6
|
+
* Methods return Effects and do not connect the gateway or cache invites.
|
|
7
|
+
* Reads retry eligible transient failures at most twice. Writes retry only confirmed 429 rejections.
|
|
8
|
+
* Fluxer checks destination visibility, invite permissions and capacity. Failures use GuildOperationError.
|
|
9
|
+
* Effects start when executed. Interruption waits for owned cleanup and defects remain in Cause.
|
|
10
|
+
* Closing clients fail with ClientClosedError. Lost responses can leave mutations applied. Do not replay them blindly
|
|
11
|
+
*
|
|
12
|
+
* @category Invites and webhooks
|
|
13
|
+
*/
|
|
14
|
+
export interface Invites {
|
|
15
|
+
/**
|
|
16
|
+
* Look up an invite code without using it or joining its destination.
|
|
17
|
+
* Pass the code, not its full URL.
|
|
18
|
+
* Expired, revoked or inaccessible codes fail remotely.
|
|
19
|
+
* Fluxer may normalize the case of a vanity code
|
|
20
|
+
*/
|
|
21
|
+
fetch(code: string, options?: GuildOperationOptions): Effect.Effect<Invite, GuildOperationFailure>
|
|
22
|
+
/**
|
|
23
|
+
* Create an invite for an accessible channel, including an existing group direct message.
|
|
24
|
+
* Defaults are a new code, 86,400 seconds, unlimited uses and non-temporary membership.
|
|
25
|
+
* The result is invite metadata.
|
|
26
|
+
* The SDK does not send the code, create a group or add members.
|
|
27
|
+
* Cancellation cannot revoke an invite that was already created.
|
|
28
|
+
* After an unknown outcome, list the destination's invites before deciding whether to create again
|
|
29
|
+
*/
|
|
30
|
+
create(
|
|
31
|
+
channelId: string,
|
|
32
|
+
input?: InviteCreate,
|
|
33
|
+
options?: ModerationOptions,
|
|
34
|
+
): Effect.Effect<InviteMetadata, GuildOperationFailure>
|
|
35
|
+
/**
|
|
36
|
+
* List a channel's management-visible invites in Fluxer's order.
|
|
37
|
+
* Channel permissions determine access.
|
|
38
|
+
* Concurrent changes can make the list stale, so it is not a stable snapshot
|
|
39
|
+
*/
|
|
40
|
+
fetchForChannel(
|
|
41
|
+
channelId: string,
|
|
42
|
+
options?: GuildOperationOptions,
|
|
43
|
+
): Effect.Effect<readonly InviteMetadata[], GuildOperationFailure>
|
|
44
|
+
/**
|
|
45
|
+
* List a community's management-visible invites with ManageGuild permission.
|
|
46
|
+
* The community's vanity invite is excluded
|
|
47
|
+
*/
|
|
48
|
+
fetchForGuild(
|
|
49
|
+
guildId: string,
|
|
50
|
+
options?: GuildOperationOptions,
|
|
51
|
+
): Effect.Effect<readonly InviteMetadata[], GuildOperationFailure>
|
|
52
|
+
/**
|
|
53
|
+
* Revoke an invite code, succeeding with no value after HTTP 204.
|
|
54
|
+
* Fluxer checks creator or management permissions.
|
|
55
|
+
* Existing members remain.
|
|
56
|
+
* A missing code is an error, not proof a previous delete succeeded
|
|
57
|
+
*/
|
|
58
|
+
delete(code: string, options?: ModerationOptions): Effect.Effect<void, GuildOperationFailure>
|
|
59
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { LogLevelSettings } from "#sdk/logging"
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Change what this client logs while it runs.
|
|
5
|
+
* Creation settings other than level, categories and debug, such as sink and format, stay fixed for the client's lifetime
|
|
6
|
+
*
|
|
7
|
+
* @category Logging and diagnostics
|
|
8
|
+
*/
|
|
9
|
+
export interface ClientLogging {
|
|
10
|
+
/**
|
|
11
|
+
* Replace the client's log level and per-category levels, and optionally its Debug categories, effective for the next record.
|
|
12
|
+
* The settings are validated like level, categories and debug in the logging option of createClient.
|
|
13
|
+
* Omitted level and categories return to their defaults, level info without category levels, as at creation.
|
|
14
|
+
* An omitted debug keeps the current Debug categories, which start as the debug creation setting plus FLUXERLY_DEBUG.
|
|
15
|
+
* A debug value replaces them, including those from FLUXERLY_DEBUG.
|
|
16
|
+
* Pass true for every category, a list for only those categories, or false or an empty list for none.
|
|
17
|
+
* Debug categories lower their threshold to Debug, never raise it.
|
|
18
|
+
* It works before, during and after a connection, and changes nothing else about the client
|
|
19
|
+
*
|
|
20
|
+
* @remarks
|
|
21
|
+
* Returns synchronously. Invalid settings, including keys other than level, categories and debug, throw
|
|
22
|
+
* ConfigurationError and leave the previous settings in place. A throwing settings getter throws SdkDefect with code
|
|
23
|
+
* application.defect
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* ```ts
|
|
27
|
+
* import type { Client } from "@neontechspace/fluxerly/effect"
|
|
28
|
+
* export function traceRequests(client: Client) {
|
|
29
|
+
* client.logging.configure({ categories: { rest: "debug" } })
|
|
30
|
+
* }
|
|
31
|
+
* export function stopDebugOutput(client: Client) {
|
|
32
|
+
* client.logging.configure({ debug: false })
|
|
33
|
+
* }
|
|
34
|
+
* ```
|
|
35
|
+
*/
|
|
36
|
+
configure(settings: LogLevelSettings): void
|
|
37
|
+
}
|