@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,1171 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Operation table: The single definition of every client namespace member shared by the default and Effect APIs.
|
|
3
|
+
* Each entry names its kind and the shared Effect it runs, and the [default](/projects/sdk/src/internal/binding/default.ts)
|
|
4
|
+
* and [native](/projects/sdk/src/internal/binding/native.ts) binders adapt it by kind.
|
|
5
|
+
* Invariant: Both APIs run the same Effect for a member, the default operation ID is the table key unless an entry names
|
|
6
|
+
* an existing Operation, and public member types stay in the hand-written interfaces under src/api/.
|
|
7
|
+
* Implements [SDK contracts: Public API model](/docs/SDK-CONTRACTS.md#public-api-model)
|
|
8
|
+
*/
|
|
9
|
+
import type * as Effect from "effect/Effect"
|
|
10
|
+
import type { Operation } from "#sdk/errors"
|
|
11
|
+
import type {
|
|
12
|
+
EditMessageInput,
|
|
13
|
+
ForwardMessageInput,
|
|
14
|
+
MessageCore,
|
|
15
|
+
MessageHistoryQuery,
|
|
16
|
+
MessageInput,
|
|
17
|
+
MessageAuditOperationOptions,
|
|
18
|
+
MessageOperationOptions,
|
|
19
|
+
MessageReference,
|
|
20
|
+
OwnMessageDeletionOptions,
|
|
21
|
+
ReplyInput,
|
|
22
|
+
SendOptions,
|
|
23
|
+
} from "#sdk/messages"
|
|
24
|
+
import type { MessageSearchContext, MessageSearchIterationLimits, MessageSearchQuery } from "#sdk/message-search"
|
|
25
|
+
import type { MessagePinsQuery } from "#sdk/pins"
|
|
26
|
+
import type { ReactionEmojiInput, ReactionUsersQuery } from "#sdk/reactions"
|
|
27
|
+
import type { MessageCleanupOptions, MessageCleanupPlan, MessageCleanupSelection } from "#sdk/message-cleanup"
|
|
28
|
+
import { cleanup, previewCleanup } from "#sdk/internal/message-cleanup"
|
|
29
|
+
import { configureLogging } from "#sdk/internal/logging"
|
|
30
|
+
import type { LogLevelSettings } from "#sdk/logging"
|
|
31
|
+
import { paginate } from "#sdk/internal/reaction-pages"
|
|
32
|
+
import type { ChannelPaginateOptions, PageInput } from "#sdk/reaction-pages"
|
|
33
|
+
import { searchMessagePagination } from "#sdk/internal/message-search-workflow"
|
|
34
|
+
import type {
|
|
35
|
+
BanInput,
|
|
36
|
+
GuildAuditOperationOptions,
|
|
37
|
+
GuildEdit,
|
|
38
|
+
GuildListQuery,
|
|
39
|
+
GuildOperationOptions,
|
|
40
|
+
CanManageOptions,
|
|
41
|
+
MemberProfileEdit,
|
|
42
|
+
MemberQuery,
|
|
43
|
+
MemberReference,
|
|
44
|
+
ModerationOptions,
|
|
45
|
+
RoleCreate,
|
|
46
|
+
RoleEdit,
|
|
47
|
+
RoleHoistPosition,
|
|
48
|
+
RolePosition,
|
|
49
|
+
RoleReference,
|
|
50
|
+
TimeoutOptions,
|
|
51
|
+
VoiceConnectionReference,
|
|
52
|
+
VoiceDeafenInput,
|
|
53
|
+
VoiceMuteInput,
|
|
54
|
+
} from "#sdk/guilds"
|
|
55
|
+
import type { DiscoveryApplicationEdit, DiscoveryApplicationInput, DiscoverySearchQuery } from "#sdk/discovery"
|
|
56
|
+
import type { PresenceInput } from "#sdk/presence"
|
|
57
|
+
import type { BotApplicationOperationOptions } from "#sdk/application"
|
|
58
|
+
import type { DirectMessageGroupEdit, UserOperationOptions, UserProfileQuery } from "#sdk/users"
|
|
59
|
+
import type { WebhookCreate, WebhookEdit, WebhookOperationOptions } from "#sdk/webhooks"
|
|
60
|
+
import type {
|
|
61
|
+
EmojiCreate,
|
|
62
|
+
EmojiEdit,
|
|
63
|
+
ExpressionDeleteOptions,
|
|
64
|
+
ExpressionReference,
|
|
65
|
+
StickerCreate,
|
|
66
|
+
StickerEdit,
|
|
67
|
+
} from "#sdk/expressions"
|
|
68
|
+
import type { AuditLogIterationQuery, AuditLogQuery } from "#sdk/audit-logs"
|
|
69
|
+
import type { InviteCreate } from "#sdk/invites"
|
|
70
|
+
import type { CountOperationOptions } from "#sdk/counts"
|
|
71
|
+
import type {
|
|
72
|
+
GuildIterationQuery,
|
|
73
|
+
HistoryIterationQuery,
|
|
74
|
+
PaginationError,
|
|
75
|
+
PinIterationQuery,
|
|
76
|
+
UserIterationQuery,
|
|
77
|
+
} from "#sdk/pagination"
|
|
78
|
+
import type {
|
|
79
|
+
ChannelAuditOperationOptions,
|
|
80
|
+
ChannelCreate,
|
|
81
|
+
ChannelEdit,
|
|
82
|
+
ChannelFollowInput,
|
|
83
|
+
ChannelOperationOptions,
|
|
84
|
+
ChannelPosition,
|
|
85
|
+
ForumTagInput,
|
|
86
|
+
PermissionOverwrite,
|
|
87
|
+
} from "#sdk/channels"
|
|
88
|
+
import type {
|
|
89
|
+
ArchivedThreadQuery,
|
|
90
|
+
ForumPostCreate,
|
|
91
|
+
ThreadCreate,
|
|
92
|
+
ThreadEdit,
|
|
93
|
+
ThreadFromMessageCreate,
|
|
94
|
+
ThreadMemberIterationQuery,
|
|
95
|
+
ThreadMemberPageQuery,
|
|
96
|
+
ThreadMemberQuery,
|
|
97
|
+
ThreadSearchQuery,
|
|
98
|
+
} from "#sdk/threads"
|
|
99
|
+
import type { MemberSearchIterationLimits, MemberSearchQuery } from "#sdk/member-search"
|
|
100
|
+
import type { PermissionInput, PermissionTarget } from "#sdk/permissions"
|
|
101
|
+
import type { Attachment, AttachmentDownloadOptions, AttachmentRefreshOptions } from "#sdk/attachments"
|
|
102
|
+
import type { ClientOwner } from "#sdk/internal/client"
|
|
103
|
+
import { defaultCacheOnChange, nativeCacheOnChange } from "#sdk/internal/cache-changes"
|
|
104
|
+
import {
|
|
105
|
+
auditLogPagination,
|
|
106
|
+
guildPagination,
|
|
107
|
+
historyPagination,
|
|
108
|
+
memberPagination,
|
|
109
|
+
pinPagination,
|
|
110
|
+
reactionUserPagination,
|
|
111
|
+
threadMemberPagination,
|
|
112
|
+
type Pagination,
|
|
113
|
+
} from "#sdk/internal/pagination"
|
|
114
|
+
import { applicationCurrent } from "#sdk/internal/application"
|
|
115
|
+
import { auditLogPage } from "#sdk/internal/audit-logs"
|
|
116
|
+
import {
|
|
117
|
+
channelCreate,
|
|
118
|
+
channelDelete,
|
|
119
|
+
channelEdit,
|
|
120
|
+
channelFetch,
|
|
121
|
+
channelFollow,
|
|
122
|
+
channelFollowerStats,
|
|
123
|
+
channelList,
|
|
124
|
+
channelReorder,
|
|
125
|
+
forumTagCreate,
|
|
126
|
+
forumTagDelete,
|
|
127
|
+
forumTagEdit,
|
|
128
|
+
permissionRemove,
|
|
129
|
+
permissionSet,
|
|
130
|
+
} from "#sdk/internal/channels"
|
|
131
|
+
import {
|
|
132
|
+
expressionBatch,
|
|
133
|
+
expressionClone,
|
|
134
|
+
expressionCreate,
|
|
135
|
+
expressionDelete,
|
|
136
|
+
expressionEdit,
|
|
137
|
+
expressionList,
|
|
138
|
+
expressionMetadata,
|
|
139
|
+
expressionSource,
|
|
140
|
+
} from "#sdk/internal/expressions"
|
|
141
|
+
import {
|
|
142
|
+
discoveryCategories,
|
|
143
|
+
discoverySearch,
|
|
144
|
+
discoveryStatus,
|
|
145
|
+
discoveryWithdraw,
|
|
146
|
+
discoveryWrite,
|
|
147
|
+
} from "#sdk/internal/guild-discovery"
|
|
148
|
+
import { guildList } from "#sdk/internal/guild-lifecycle"
|
|
149
|
+
import { guildEdit } from "#sdk/internal/guild-settings"
|
|
150
|
+
import {
|
|
151
|
+
guildFetch,
|
|
152
|
+
memberEditSelf,
|
|
153
|
+
memberFetch,
|
|
154
|
+
memberNicknameEdit,
|
|
155
|
+
memberPage,
|
|
156
|
+
memberRole,
|
|
157
|
+
memberRolesSet,
|
|
158
|
+
memberSelf,
|
|
159
|
+
roleCreate,
|
|
160
|
+
roleDelete,
|
|
161
|
+
roleEdit,
|
|
162
|
+
roleList,
|
|
163
|
+
roleReorder,
|
|
164
|
+
roleResetHoistPositions,
|
|
165
|
+
roleSetHoistPositions,
|
|
166
|
+
} from "#sdk/internal/guilds"
|
|
167
|
+
import { inviteCreate, inviteDelete, inviteFetch, inviteList } from "#sdk/internal/invites"
|
|
168
|
+
import {
|
|
169
|
+
fetchThreadMember,
|
|
170
|
+
fetchThreadMembers,
|
|
171
|
+
threadActive,
|
|
172
|
+
threadArchived,
|
|
173
|
+
threadCreate,
|
|
174
|
+
threadCreateFromMessage,
|
|
175
|
+
threadEdit,
|
|
176
|
+
threadMembership,
|
|
177
|
+
threadPost,
|
|
178
|
+
threadSearch,
|
|
179
|
+
} from "#sdk/internal/threads"
|
|
180
|
+
import { searchMemberPagination, searchMembers } from "#sdk/internal/member-search-workflow"
|
|
181
|
+
import {
|
|
182
|
+
guildBan,
|
|
183
|
+
guildBans,
|
|
184
|
+
guildUnban,
|
|
185
|
+
memberKick,
|
|
186
|
+
memberTimeout,
|
|
187
|
+
memberVoiceFlag,
|
|
188
|
+
memberVoiceMove,
|
|
189
|
+
} from "#sdk/internal/moderation"
|
|
190
|
+
import { calculatePermissions, fetchPermissions } from "#sdk/internal/permissions"
|
|
191
|
+
import { fetchCanManage } from "#sdk/internal/role-hierarchy-workflow"
|
|
192
|
+
import {
|
|
193
|
+
directMessageClose,
|
|
194
|
+
directMessageEdit,
|
|
195
|
+
directMessageFetch,
|
|
196
|
+
directMessageLatestMessages,
|
|
197
|
+
directMessageList,
|
|
198
|
+
directMessageOpen,
|
|
199
|
+
userFetch,
|
|
200
|
+
userProfile,
|
|
201
|
+
} from "#sdk/internal/users"
|
|
202
|
+
import { vanityUrlEdit, vanityUrlFetch } from "#sdk/internal/vanity-url"
|
|
203
|
+
import { webhookCreate, webhookDelete, webhookEdit, webhookFetch, webhookList } from "#sdk/internal/webhooks"
|
|
204
|
+
import {
|
|
205
|
+
defaultAttachmentStream,
|
|
206
|
+
defaultCacheClear,
|
|
207
|
+
defaultCacheDelete,
|
|
208
|
+
defaultCacheEntries,
|
|
209
|
+
defaultCollect,
|
|
210
|
+
defaultCollectReactions,
|
|
211
|
+
defaultInstanceResolve,
|
|
212
|
+
defaultKeepTyping,
|
|
213
|
+
defaultMemberChunks,
|
|
214
|
+
defaultRestRequest,
|
|
215
|
+
} from "./default-adapters.js"
|
|
216
|
+
import type { DefaultContext } from "./execute.js"
|
|
217
|
+
import {
|
|
218
|
+
nativeAttachmentStream,
|
|
219
|
+
nativeCacheClear,
|
|
220
|
+
nativeCacheDelete,
|
|
221
|
+
nativeCacheEntries,
|
|
222
|
+
nativeCollect,
|
|
223
|
+
nativeCollectReactions,
|
|
224
|
+
nativeInstanceResolve,
|
|
225
|
+
nativeKeepTyping,
|
|
226
|
+
nativeMemberChunks,
|
|
227
|
+
nativeRestRequest,
|
|
228
|
+
} from "./native-adapters.js"
|
|
229
|
+
|
|
230
|
+
/** An asynchronous remote operation. The default API executes it with the options argument at optionsAt */
|
|
231
|
+
export interface OperationEntry<M extends MessageCore, Args extends readonly unknown[], A, E> {
|
|
232
|
+
readonly kind: "op"
|
|
233
|
+
readonly optionsAt: number
|
|
234
|
+
readonly run: (owner: ClientOwner<M>, ...args: Args) => Effect.Effect<A, E>
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
/** A synchronous local command whose failure is a runtime outcome, such as a presence update, returned as Result by the default API */
|
|
238
|
+
export interface LookupEntry<M extends MessageCore, Args extends readonly unknown[], A, E> {
|
|
239
|
+
readonly kind: "lookup"
|
|
240
|
+
readonly run: (owner: ClientOwner<M>, ...args: Args) => Effect.Effect<A, E>
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
/**
|
|
244
|
+
* A local cache lookup. The default API returns the value or undefined and throws for invalid input, and the native API
|
|
245
|
+
* returns an Effect without an error channel whose misuse is a defect. A closing or closed client has no cache, so both
|
|
246
|
+
* APIs read undefined instead of failing
|
|
247
|
+
*/
|
|
248
|
+
export interface GetEntry<M extends MessageCore, Args extends readonly unknown[], A, E> {
|
|
249
|
+
readonly kind: "get"
|
|
250
|
+
readonly run: (owner: ClientOwner<M>, ...args: Args) => Effect.Effect<A, E>
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
/** A pure local calculation that both APIs return directly, throwing its error for invalid input */
|
|
254
|
+
export interface PureEntry<M extends MessageCore, Args extends readonly unknown[], A, E> {
|
|
255
|
+
readonly kind: "pure"
|
|
256
|
+
readonly run: (owner: ClientOwner<M>, ...args: Args) => Effect.Effect<A, E>
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
/** A paged traversal, iterated by the default API and streamed by the native API */
|
|
260
|
+
export interface PageEntry<M extends MessageCore, Args extends readonly unknown[], A, E> {
|
|
261
|
+
readonly kind: "page"
|
|
262
|
+
readonly optionsAt: number
|
|
263
|
+
readonly run: (owner: ClientOwner<M>, ...args: Args) => Effect.Effect<Pagination<A, E>, PaginationError>
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
/** A member whose two API styles need their own adapters, such as byte streams, collectors and callbacks */
|
|
267
|
+
export interface CustomEntry<M extends MessageCore, D, N> {
|
|
268
|
+
readonly kind: "stream" | "custom"
|
|
269
|
+
readonly default: (context: DefaultContext<M>) => D
|
|
270
|
+
readonly native: (owner: ClientOwner<M>) => N
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
/** Any table entry, as the binders read it */
|
|
274
|
+
export type BindableEntry<M extends MessageCore> =
|
|
275
|
+
| OperationEntry<M, readonly unknown[], unknown, unknown>
|
|
276
|
+
| LookupEntry<M, readonly unknown[], unknown, unknown>
|
|
277
|
+
| GetEntry<M, readonly unknown[], unknown, unknown>
|
|
278
|
+
| PureEntry<M, readonly unknown[], unknown, unknown>
|
|
279
|
+
| PageEntry<M, readonly unknown[], unknown, unknown>
|
|
280
|
+
| CustomEntry<M, unknown, unknown>
|
|
281
|
+
|
|
282
|
+
type EntryId<NS extends string, K extends string, E> = E extends { readonly kind: "stream" | "custom" }
|
|
283
|
+
? Operation
|
|
284
|
+
: E extends { readonly id: infer I }
|
|
285
|
+
? I
|
|
286
|
+
: `${NS}.${K}`
|
|
287
|
+
|
|
288
|
+
// Each default operation ID must be an existing Operation, so SdkDefect attribution stays stable
|
|
289
|
+
type CheckedTable<T> = {
|
|
290
|
+
readonly [NS in keyof T & string]: {
|
|
291
|
+
readonly [K in keyof T[NS] & string]: EntryId<NS, K, T[NS][K]> extends Operation
|
|
292
|
+
? T[NS][K]
|
|
293
|
+
: { readonly unknownOperationId: `${NS}.${K}` }
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
const checked = <T>(table: T & CheckedTable<T>): T => table
|
|
298
|
+
|
|
299
|
+
/** Keep an operation ID that differs from the table key, such as the message operations' unqualified IDs */
|
|
300
|
+
const named = <const I extends Operation, E>(id: I, entry: E): E & { readonly id: I } => Object.freeze({ ...entry, id })
|
|
301
|
+
|
|
302
|
+
function defineOperations<M extends MessageCore>() {
|
|
303
|
+
type Owner = ClientOwner<M>
|
|
304
|
+
const op = <Args extends readonly unknown[], A, E>(
|
|
305
|
+
optionsAt: number,
|
|
306
|
+
run: (owner: Owner, ...args: Args) => Effect.Effect<A, E>,
|
|
307
|
+
): OperationEntry<M, Args, A, E> => Object.freeze({ kind: "op", optionsAt, run })
|
|
308
|
+
const lookup = <Args extends readonly unknown[], A, E>(
|
|
309
|
+
run: (owner: Owner, ...args: Args) => Effect.Effect<A, E>,
|
|
310
|
+
): LookupEntry<M, Args, A, E> => Object.freeze({ kind: "lookup", run })
|
|
311
|
+
const get = <Args extends readonly unknown[], A, E>(
|
|
312
|
+
run: (owner: Owner, ...args: Args) => Effect.Effect<A, E>,
|
|
313
|
+
): GetEntry<M, Args, A, E> => Object.freeze({ kind: "get", run })
|
|
314
|
+
const pure = <Args extends readonly unknown[], A, E>(
|
|
315
|
+
run: (owner: Owner, ...args: Args) => Effect.Effect<A, E>,
|
|
316
|
+
): PureEntry<M, Args, A, E> => Object.freeze({ kind: "pure", run })
|
|
317
|
+
const page = <Args extends readonly unknown[], A, E>(
|
|
318
|
+
optionsAt: number,
|
|
319
|
+
run: (owner: Owner, ...args: Args) => Effect.Effect<Pagination<A, E>, PaginationError>,
|
|
320
|
+
): PageEntry<M, Args, A, E> => Object.freeze({ kind: "page", optionsAt, run })
|
|
321
|
+
const custom = <D, N>(
|
|
322
|
+
kind: "stream" | "custom",
|
|
323
|
+
defaultAdapter: (context: DefaultContext<M>) => D,
|
|
324
|
+
nativeAdapter: (owner: Owner) => N,
|
|
325
|
+
): CustomEntry<M, D, N> => Object.freeze({ kind, default: defaultAdapter, native: nativeAdapter })
|
|
326
|
+
return checked({
|
|
327
|
+
instance: {
|
|
328
|
+
resolve: custom("custom", defaultInstanceResolve<M>, nativeInstanceResolve<M>),
|
|
329
|
+
},
|
|
330
|
+
presence: {
|
|
331
|
+
set: lookup((owner: Owner, input: PresenceInput) => owner.setPresence(input)),
|
|
332
|
+
setMembers: lookup((owner: Owner, guildId: string, memberIds: readonly string[]) =>
|
|
333
|
+
owner.setPresenceMembers(guildId, memberIds),
|
|
334
|
+
),
|
|
335
|
+
},
|
|
336
|
+
cache: {
|
|
337
|
+
entries: custom("custom", defaultCacheEntries<M>, nativeCacheEntries<M>),
|
|
338
|
+
clear: custom("custom", defaultCacheClear<M>, nativeCacheClear<M>),
|
|
339
|
+
delete: custom("custom", defaultCacheDelete<M>, nativeCacheDelete<M>),
|
|
340
|
+
onChange: custom("custom", defaultCacheOnChange<M>, nativeCacheOnChange<M>),
|
|
341
|
+
},
|
|
342
|
+
logging: {
|
|
343
|
+
configure: pure((owner: Owner, settings: LogLevelSettings) => configureLogging(owner.logging, settings)),
|
|
344
|
+
},
|
|
345
|
+
rest: {
|
|
346
|
+
// Generic in the response body and typed with each API's own request shape, so each API adapts it
|
|
347
|
+
request: custom("custom", defaultRestRequest<M>, nativeRestRequest<M>),
|
|
348
|
+
},
|
|
349
|
+
gateway: {
|
|
350
|
+
// The default API passes its options as a fourth argument, which the public Effect member does not have
|
|
351
|
+
send: op(3, (owner: Owner, shardId: number, opcode: number, data: unknown, ...options: readonly []) =>
|
|
352
|
+
owner.gatewaySend(shardId, opcode, data, (options as readonly unknown[])[0]),
|
|
353
|
+
),
|
|
354
|
+
},
|
|
355
|
+
application: {
|
|
356
|
+
fetch: op(0, (owner: Owner, options?: BotApplicationOperationOptions) =>
|
|
357
|
+
owner.application("application.fetch", () => applicationCurrent(), options),
|
|
358
|
+
),
|
|
359
|
+
},
|
|
360
|
+
users: {
|
|
361
|
+
get: get((owner: Owner, id: string) => owner.getUserResource("users", id)),
|
|
362
|
+
getSelf: get((owner: Owner) => owner.getSelf()),
|
|
363
|
+
fetch: op(1, (owner: Owner, id: string, options?: UserOperationOptions) =>
|
|
364
|
+
owner.user("users.fetch", () => userFetch(id), options),
|
|
365
|
+
),
|
|
366
|
+
fetchSelf: op(0, (owner: Owner, options?: UserOperationOptions) =>
|
|
367
|
+
owner.user("users.fetchSelf", () => userFetch("@me"), options),
|
|
368
|
+
),
|
|
369
|
+
fetchProfile: op(2, (owner: Owner, id: string, query?: UserProfileQuery, options?: UserOperationOptions) =>
|
|
370
|
+
owner.user("users.fetchProfile", () => userProfile(id, query), options),
|
|
371
|
+
),
|
|
372
|
+
},
|
|
373
|
+
directMessages: {
|
|
374
|
+
send: op(2, (owner: Owner, userId: string, input: ReplyInput | string, options?: SendOptions) =>
|
|
375
|
+
owner.sendDirectMessage(userId, input, options),
|
|
376
|
+
),
|
|
377
|
+
get: get((owner: Owner, id: string) => owner.getUserResource("directMessages", id)),
|
|
378
|
+
open: op(1, (owner: Owner, userId: string, options?: UserOperationOptions) =>
|
|
379
|
+
owner.user("directMessages.open", () => directMessageOpen(userId), options),
|
|
380
|
+
),
|
|
381
|
+
fetch: op(1, (owner: Owner, id: string, options?: UserOperationOptions) =>
|
|
382
|
+
owner.user("directMessages.fetch", () => directMessageFetch(id), options),
|
|
383
|
+
),
|
|
384
|
+
fetchAll: op(0, (owner: Owner, options?: UserOperationOptions) =>
|
|
385
|
+
owner.user("directMessages.fetchAll", () => directMessageList(), options),
|
|
386
|
+
),
|
|
387
|
+
fetchLatestMessages: op(1, (owner: Owner, channelIds: readonly string[], options?: UserOperationOptions) =>
|
|
388
|
+
owner.user(
|
|
389
|
+
"directMessages.fetchLatestMessages",
|
|
390
|
+
() => directMessageLatestMessages(channelIds, owner.decodeMessage),
|
|
391
|
+
options,
|
|
392
|
+
),
|
|
393
|
+
),
|
|
394
|
+
editGroup: op(
|
|
395
|
+
2,
|
|
396
|
+
(owner: Owner, id: string, input: DirectMessageGroupEdit, options?: UserOperationOptions) =>
|
|
397
|
+
owner.user("directMessages.editGroup", () => directMessageEdit(id, input), options),
|
|
398
|
+
),
|
|
399
|
+
close: op(1, (owner: Owner, id: string, options?: UserOperationOptions) =>
|
|
400
|
+
owner.user("directMessages.close", () => directMessageClose(id), options),
|
|
401
|
+
),
|
|
402
|
+
removeRecipient: op(2, (owner: Owner, id: string, userId: string, options?: UserOperationOptions) =>
|
|
403
|
+
owner.user("directMessages.removeRecipient", () => directMessageClose(id, userId), options),
|
|
404
|
+
),
|
|
405
|
+
},
|
|
406
|
+
webhooks: {
|
|
407
|
+
create: op(2, (owner: Owner, channelId: string, input: WebhookCreate, options?: WebhookOperationOptions) =>
|
|
408
|
+
owner.webhook("webhooks.create", () => webhookCreate(channelId, input, options), options),
|
|
409
|
+
),
|
|
410
|
+
fetch: op(1, (owner: Owner, id: string, options?: WebhookOperationOptions) =>
|
|
411
|
+
owner.webhook("webhooks.fetch", () => webhookFetch(id), options),
|
|
412
|
+
),
|
|
413
|
+
fetchForChannel: op(1, (owner: Owner, channelId: string, options?: WebhookOperationOptions) =>
|
|
414
|
+
owner.webhook("webhooks.fetchForChannel", () => webhookList(channelId, "channels"), options),
|
|
415
|
+
),
|
|
416
|
+
fetchForGuild: op(1, (owner: Owner, guildId: string, options?: WebhookOperationOptions) =>
|
|
417
|
+
owner.webhook("webhooks.fetchForGuild", () => webhookList(guildId, "guilds"), options),
|
|
418
|
+
),
|
|
419
|
+
edit: op(2, (owner: Owner, id: string, input: WebhookEdit, options?: WebhookOperationOptions) =>
|
|
420
|
+
owner.webhook("webhooks.edit", () => webhookEdit(id, input, options), options),
|
|
421
|
+
),
|
|
422
|
+
delete: op(1, (owner: Owner, id: string, options?: WebhookOperationOptions) =>
|
|
423
|
+
owner.webhook("webhooks.delete", () => webhookDelete(id, options), options),
|
|
424
|
+
),
|
|
425
|
+
},
|
|
426
|
+
emojis: {
|
|
427
|
+
get: get((owner: Owner, target: ExpressionReference) => owner.getResource("emojis", target)),
|
|
428
|
+
fetchAll: op(1, (owner: Owner, guildId: string, options?: GuildOperationOptions) =>
|
|
429
|
+
owner.guild("emojis.fetchAll", () => expressionList("emojis", guildId), options),
|
|
430
|
+
),
|
|
431
|
+
fetchMetadata: op(1, (owner: Owner, id: string, options?: GuildOperationOptions) =>
|
|
432
|
+
owner.guild("emojis.fetchMetadata", () => expressionMetadata("emojis", id), options),
|
|
433
|
+
),
|
|
434
|
+
fetchSource: op(1, (owner: Owner, id: string, options?: GuildOperationOptions) =>
|
|
435
|
+
owner.guild("emojis.fetchSource", () => expressionSource("emojis", id), options),
|
|
436
|
+
),
|
|
437
|
+
create: op(2, (owner: Owner, guildId: string, input: EmojiCreate, options?: ModerationOptions) =>
|
|
438
|
+
owner.guild("emojis.create", () => expressionCreate("emojis", guildId, input, options), options),
|
|
439
|
+
),
|
|
440
|
+
createMany: op(
|
|
441
|
+
2,
|
|
442
|
+
(owner: Owner, guildId: string, input: readonly EmojiCreate[], options?: ModerationOptions) =>
|
|
443
|
+
owner.guild("emojis.createMany", () => expressionBatch("emojis", guildId, input, options), options),
|
|
444
|
+
),
|
|
445
|
+
clone: op(2, (owner: Owner, guildId: string, sourceId: string, options?: ModerationOptions) =>
|
|
446
|
+
owner.guild("emojis.clone", () => expressionClone("emojis", guildId, sourceId, options), options),
|
|
447
|
+
),
|
|
448
|
+
edit: op(2, (owner: Owner, target: ExpressionReference, input: EmojiEdit, options?: ModerationOptions) =>
|
|
449
|
+
owner.guild("emojis.edit", () => expressionEdit("emojis", target, input, options), options),
|
|
450
|
+
),
|
|
451
|
+
delete: op(1, (owner: Owner, target: ExpressionReference, options?: ExpressionDeleteOptions) =>
|
|
452
|
+
owner.guild("emojis.delete", () => expressionDelete("emojis", target, options), options),
|
|
453
|
+
),
|
|
454
|
+
},
|
|
455
|
+
stickers: {
|
|
456
|
+
get: get((owner: Owner, target: ExpressionReference) => owner.getResource("stickers", target)),
|
|
457
|
+
fetchAll: op(1, (owner: Owner, guildId: string, options?: GuildOperationOptions) =>
|
|
458
|
+
owner.guild("stickers.fetchAll", () => expressionList("stickers", guildId), options),
|
|
459
|
+
),
|
|
460
|
+
fetchMetadata: op(1, (owner: Owner, id: string, options?: GuildOperationOptions) =>
|
|
461
|
+
owner.guild("stickers.fetchMetadata", () => expressionMetadata("stickers", id), options),
|
|
462
|
+
),
|
|
463
|
+
fetchSource: op(1, (owner: Owner, id: string, options?: GuildOperationOptions) =>
|
|
464
|
+
owner.guild("stickers.fetchSource", () => expressionSource("stickers", id), options),
|
|
465
|
+
),
|
|
466
|
+
create: op(2, (owner: Owner, guildId: string, input: StickerCreate, options?: ModerationOptions) =>
|
|
467
|
+
owner.guild("stickers.create", () => expressionCreate("stickers", guildId, input, options), options),
|
|
468
|
+
),
|
|
469
|
+
createMany: op(
|
|
470
|
+
2,
|
|
471
|
+
(owner: Owner, guildId: string, input: readonly StickerCreate[], options?: ModerationOptions) =>
|
|
472
|
+
owner.guild(
|
|
473
|
+
"stickers.createMany",
|
|
474
|
+
() => expressionBatch("stickers", guildId, input, options),
|
|
475
|
+
options,
|
|
476
|
+
),
|
|
477
|
+
),
|
|
478
|
+
clone: op(2, (owner: Owner, guildId: string, sourceId: string, options?: ModerationOptions) =>
|
|
479
|
+
owner.guild("stickers.clone", () => expressionClone("stickers", guildId, sourceId, options), options),
|
|
480
|
+
),
|
|
481
|
+
edit: op(2, (owner: Owner, target: ExpressionReference, input: StickerEdit, options?: ModerationOptions) =>
|
|
482
|
+
owner.guild("stickers.edit", () => expressionEdit("stickers", target, input, options), options),
|
|
483
|
+
),
|
|
484
|
+
delete: op(1, (owner: Owner, target: ExpressionReference, options?: ExpressionDeleteOptions) =>
|
|
485
|
+
owner.guild("stickers.delete", () => expressionDelete("stickers", target, options), options),
|
|
486
|
+
),
|
|
487
|
+
},
|
|
488
|
+
auditLogs: {
|
|
489
|
+
fetchPage: op(2, (owner: Owner, guildId: string, query: AuditLogQuery, options?: GuildOperationOptions) =>
|
|
490
|
+
owner.guild("auditLogs.fetchPage", () => auditLogPage(guildId, query), options),
|
|
491
|
+
),
|
|
492
|
+
iterate: page(
|
|
493
|
+
2,
|
|
494
|
+
(owner: Owner, guildId: string, query: AuditLogIterationQuery, options?: GuildOperationOptions) =>
|
|
495
|
+
auditLogPagination(owner, guildId, query, options),
|
|
496
|
+
),
|
|
497
|
+
},
|
|
498
|
+
invites: {
|
|
499
|
+
fetch: op(1, (owner: Owner, code: string, options?: GuildOperationOptions) =>
|
|
500
|
+
owner.guild("invites.fetch", () => inviteFetch(code), options),
|
|
501
|
+
),
|
|
502
|
+
create: op(2, (owner: Owner, channelId: string, input?: InviteCreate, options?: ModerationOptions) =>
|
|
503
|
+
owner.guild("invites.create", () => inviteCreate(channelId, input, options), options),
|
|
504
|
+
),
|
|
505
|
+
fetchForChannel: op(1, (owner: Owner, channelId: string, options?: GuildOperationOptions) =>
|
|
506
|
+
owner.guild("invites.fetchForChannel", () => inviteList("channels", channelId), options),
|
|
507
|
+
),
|
|
508
|
+
fetchForGuild: op(1, (owner: Owner, guildId: string, options?: GuildOperationOptions) =>
|
|
509
|
+
owner.guild("invites.fetchForGuild", () => inviteList("guilds", guildId), options),
|
|
510
|
+
),
|
|
511
|
+
delete: op(1, (owner: Owner, code: string, options?: ModerationOptions) =>
|
|
512
|
+
owner.guild("invites.delete", () => inviteDelete(code, options), options),
|
|
513
|
+
),
|
|
514
|
+
},
|
|
515
|
+
discovery: {
|
|
516
|
+
search: op(1, (owner: Owner, query?: DiscoverySearchQuery, options?: GuildOperationOptions) =>
|
|
517
|
+
owner.guild("discovery.search", () => discoverySearch(query), options),
|
|
518
|
+
),
|
|
519
|
+
fetchStatus: op(1, (owner: Owner, guildId: string, options?: GuildOperationOptions) =>
|
|
520
|
+
owner.guild("discovery.fetchStatus", () => discoveryStatus(guildId), options),
|
|
521
|
+
),
|
|
522
|
+
fetchCategories: op(0, (owner: Owner, options?: GuildOperationOptions) =>
|
|
523
|
+
owner.guild("discovery.fetchCategories", discoveryCategories, options),
|
|
524
|
+
),
|
|
525
|
+
apply: op(
|
|
526
|
+
2,
|
|
527
|
+
(owner: Owner, guildId: string, input: DiscoveryApplicationInput, options?: GuildOperationOptions) =>
|
|
528
|
+
owner.guild("discovery.apply", () => discoveryWrite(guildId, input), options),
|
|
529
|
+
),
|
|
530
|
+
edit: op(
|
|
531
|
+
2,
|
|
532
|
+
(owner: Owner, guildId: string, input: DiscoveryApplicationEdit, options?: GuildOperationOptions) =>
|
|
533
|
+
owner.guild("discovery.edit", () => discoveryWrite(guildId, input, true), options),
|
|
534
|
+
),
|
|
535
|
+
withdraw: op(1, (owner: Owner, guildId: string, options?: GuildOperationOptions) =>
|
|
536
|
+
owner.guild("discovery.withdraw", () => discoveryWithdraw(guildId), options),
|
|
537
|
+
),
|
|
538
|
+
},
|
|
539
|
+
guilds: {
|
|
540
|
+
fetchCounts: op(1, (owner: Owner, guildIds: readonly string[], options?: CountOperationOptions) =>
|
|
541
|
+
owner.counts.fetchGuilds(guildIds, options),
|
|
542
|
+
),
|
|
543
|
+
fetchPage: op(1, (owner: Owner, query?: GuildListQuery, options?: GuildOperationOptions) =>
|
|
544
|
+
owner.guild("guilds.fetchPage", () => guildList(query), options),
|
|
545
|
+
),
|
|
546
|
+
iterate: page(1, (owner: Owner, query: GuildIterationQuery, options?: GuildOperationOptions) =>
|
|
547
|
+
guildPagination(owner, query, options),
|
|
548
|
+
),
|
|
549
|
+
leave: op(1, (owner: Owner, guildId: string, options?: GuildOperationOptions) =>
|
|
550
|
+
owner.leaveGuild(guildId, options),
|
|
551
|
+
),
|
|
552
|
+
deleteOwnMessages: op(1, (owner: Owner, guildId: string, options: OwnMessageDeletionOptions) =>
|
|
553
|
+
owner.deleteOwnGuildMessages(guildId, options),
|
|
554
|
+
),
|
|
555
|
+
fetchVanityUrl: op(1, (owner: Owner, guildId: string, options?: GuildOperationOptions) =>
|
|
556
|
+
owner.guild("guilds.fetchVanityUrl", () => vanityUrlFetch(guildId), options),
|
|
557
|
+
),
|
|
558
|
+
editVanityUrl: op(2, (owner: Owner, guildId: string, code: string | null, options?: ModerationOptions) =>
|
|
559
|
+
owner.guild("guilds.editVanityUrl", () => vanityUrlEdit(guildId, code, options), options),
|
|
560
|
+
),
|
|
561
|
+
edit: op(2, (owner: Owner, guildId: string, input: GuildEdit, options?: ModerationOptions) =>
|
|
562
|
+
owner.guild("guilds.edit", () => guildEdit(guildId, input, options), options),
|
|
563
|
+
),
|
|
564
|
+
get: get((owner: Owner, guildId: string) => owner.getResource("guilds", guildId)),
|
|
565
|
+
fetch: op(1, (owner: Owner, guildId: string, options?: GuildOperationOptions) =>
|
|
566
|
+
owner.guild("guilds.fetch", () => guildFetch(guildId), options),
|
|
567
|
+
),
|
|
568
|
+
},
|
|
569
|
+
channels: {
|
|
570
|
+
follow: op(
|
|
571
|
+
2,
|
|
572
|
+
(owner: Owner, channelId: string, input: ChannelFollowInput, options?: ChannelAuditOperationOptions) =>
|
|
573
|
+
owner.channel("channels.follow", () => channelFollow(channelId, input), options),
|
|
574
|
+
),
|
|
575
|
+
fetchFollowerStats: op(1, (owner: Owner, channelId: string, options?: ChannelOperationOptions) =>
|
|
576
|
+
owner.channel("channels.fetchFollowerStats", () => channelFollowerStats(channelId), options),
|
|
577
|
+
),
|
|
578
|
+
fetchMemberCounts: op(
|
|
579
|
+
2,
|
|
580
|
+
(owner: Owner, guildId: string, channelIds: readonly string[], options?: CountOperationOptions) =>
|
|
581
|
+
owner.counts.fetchChannels(guildId, channelIds, options),
|
|
582
|
+
),
|
|
583
|
+
get: get((owner: Owner, channelId: string) => owner.getChannel(channelId)),
|
|
584
|
+
fetch: op(1, (owner: Owner, channelId: string, options?: ChannelOperationOptions) =>
|
|
585
|
+
owner.channel("channels.fetch", () => channelFetch(channelId), options),
|
|
586
|
+
),
|
|
587
|
+
fetchAll: op(1, (owner: Owner, guildId: string, options?: ChannelOperationOptions) =>
|
|
588
|
+
owner.channel("channels.fetchAll", () => channelList(guildId), options),
|
|
589
|
+
),
|
|
590
|
+
create: op(
|
|
591
|
+
2,
|
|
592
|
+
(owner: Owner, guildId: string, input: ChannelCreate, options?: ChannelAuditOperationOptions) =>
|
|
593
|
+
owner.channel("channels.create", () => channelCreate(guildId, input), options),
|
|
594
|
+
),
|
|
595
|
+
edit: op(2, (owner: Owner, channelId: string, input: ChannelEdit, options?: ChannelAuditOperationOptions) =>
|
|
596
|
+
owner.channel("channels.edit", () => channelEdit(channelId, input), options),
|
|
597
|
+
),
|
|
598
|
+
delete: op(1, (owner: Owner, channelId: string, options?: ChannelAuditOperationOptions) =>
|
|
599
|
+
owner.channel("channels.delete", () => channelDelete(channelId), options),
|
|
600
|
+
),
|
|
601
|
+
reorder: op(
|
|
602
|
+
2,
|
|
603
|
+
(
|
|
604
|
+
owner: Owner,
|
|
605
|
+
guildId: string,
|
|
606
|
+
positions: readonly ChannelPosition[],
|
|
607
|
+
options?: ChannelAuditOperationOptions,
|
|
608
|
+
) => owner.channel("channels.reorder", () => channelReorder(guildId, positions), options),
|
|
609
|
+
),
|
|
610
|
+
setPermissionOverwrite: op(
|
|
611
|
+
2,
|
|
612
|
+
(owner: Owner, channelId: string, input: PermissionOverwrite, options?: ChannelAuditOperationOptions) =>
|
|
613
|
+
owner.channel("channels.setPermissionOverwrite", () => permissionSet(channelId, input), options),
|
|
614
|
+
),
|
|
615
|
+
removePermissionOverwrite: op(
|
|
616
|
+
2,
|
|
617
|
+
(owner: Owner, channelId: string, targetId: string, options?: ChannelAuditOperationOptions) =>
|
|
618
|
+
owner.channel(
|
|
619
|
+
"channels.removePermissionOverwrite",
|
|
620
|
+
() => permissionRemove(channelId, targetId),
|
|
621
|
+
options,
|
|
622
|
+
),
|
|
623
|
+
),
|
|
624
|
+
createForumTag: op(
|
|
625
|
+
2,
|
|
626
|
+
(owner: Owner, channelId: string, input: ForumTagInput, options?: ChannelAuditOperationOptions) =>
|
|
627
|
+
owner.channel("channels.createForumTag", () => forumTagCreate(channelId, input), options),
|
|
628
|
+
),
|
|
629
|
+
editForumTag: op(
|
|
630
|
+
3,
|
|
631
|
+
(
|
|
632
|
+
owner: Owner,
|
|
633
|
+
channelId: string,
|
|
634
|
+
tagId: string,
|
|
635
|
+
input: ForumTagInput,
|
|
636
|
+
options?: ChannelAuditOperationOptions,
|
|
637
|
+
) => owner.channel("channels.editForumTag", () => forumTagEdit(channelId, tagId, input), options),
|
|
638
|
+
),
|
|
639
|
+
deleteForumTag: op(
|
|
640
|
+
2,
|
|
641
|
+
(owner: Owner, channelId: string, tagId: string, options?: ChannelAuditOperationOptions) =>
|
|
642
|
+
owner.channel("channels.deleteForumTag", () => forumTagDelete(channelId, tagId), options),
|
|
643
|
+
),
|
|
644
|
+
},
|
|
645
|
+
members: {
|
|
646
|
+
iterateChunks: custom("stream", defaultMemberChunks<M>, nativeMemberChunks<M>),
|
|
647
|
+
setRoles: op(
|
|
648
|
+
2,
|
|
649
|
+
(
|
|
650
|
+
owner: Owner,
|
|
651
|
+
member: MemberReference,
|
|
652
|
+
roleIds: readonly string[],
|
|
653
|
+
options?: GuildAuditOperationOptions,
|
|
654
|
+
) => owner.guild("members.setRoles", () => memberRolesSet(member, roleIds), options),
|
|
655
|
+
),
|
|
656
|
+
search: op(
|
|
657
|
+
2,
|
|
658
|
+
(owner: Owner, guildId: string, filters?: MemberSearchQuery, options?: GuildOperationOptions) =>
|
|
659
|
+
searchMembers(owner, guildId, filters, options),
|
|
660
|
+
),
|
|
661
|
+
iterateSearch: page(
|
|
662
|
+
3,
|
|
663
|
+
(
|
|
664
|
+
owner: Owner,
|
|
665
|
+
guildId: string,
|
|
666
|
+
filters: Omit<MemberSearchQuery, "limit">,
|
|
667
|
+
limits: MemberSearchIterationLimits,
|
|
668
|
+
options?: GuildOperationOptions,
|
|
669
|
+
) => searchMemberPagination(owner, guildId, filters, limits, options),
|
|
670
|
+
),
|
|
671
|
+
editSelf: op(
|
|
672
|
+
2,
|
|
673
|
+
(owner: Owner, guildId: string, input: MemberProfileEdit, options?: GuildAuditOperationOptions) =>
|
|
674
|
+
owner.guild("members.editSelf", () => memberEditSelf(guildId, input), options),
|
|
675
|
+
),
|
|
676
|
+
setNickname: op(
|
|
677
|
+
2,
|
|
678
|
+
(
|
|
679
|
+
owner: Owner,
|
|
680
|
+
member: MemberReference,
|
|
681
|
+
nickname: string | null,
|
|
682
|
+
options?: GuildAuditOperationOptions,
|
|
683
|
+
) => owner.guild("members.setNickname", () => memberNicknameEdit(member, nickname), options),
|
|
684
|
+
),
|
|
685
|
+
move: op(
|
|
686
|
+
2,
|
|
687
|
+
(owner: Owner, target: VoiceConnectionReference, channelId: string, options?: ModerationOptions) =>
|
|
688
|
+
owner.guild("members.move", () => memberVoiceMove(target, channelId, options), options),
|
|
689
|
+
),
|
|
690
|
+
disconnect: op(1, (owner: Owner, target: VoiceConnectionReference, options?: ModerationOptions) =>
|
|
691
|
+
owner.guild("members.disconnect", () => memberVoiceMove(target, null, options), options),
|
|
692
|
+
),
|
|
693
|
+
setMute: op(
|
|
694
|
+
2,
|
|
695
|
+
(owner: Owner, target: MemberReference, input: VoiceMuteInput, options?: ModerationOptions) =>
|
|
696
|
+
owner.guild("members.setMute", () => memberVoiceFlag(target, "mute", input, options), options),
|
|
697
|
+
),
|
|
698
|
+
setDeaf: op(
|
|
699
|
+
2,
|
|
700
|
+
(owner: Owner, target: MemberReference, input: VoiceDeafenInput, options?: ModerationOptions) =>
|
|
701
|
+
owner.guild("members.setDeaf", () => memberVoiceFlag(target, "deaf", input, options), options),
|
|
702
|
+
),
|
|
703
|
+
timeout: op(2, (owner: Owner, target: MemberReference, durationMs: number, options?: TimeoutOptions) =>
|
|
704
|
+
owner.guild("members.timeout", () => memberTimeout(target, durationMs, options), options),
|
|
705
|
+
),
|
|
706
|
+
clearTimeout: op(1, (owner: Owner, target: MemberReference, options?: TimeoutOptions) =>
|
|
707
|
+
owner.guild("members.clearTimeout", () => memberTimeout(target, null, options, true), options),
|
|
708
|
+
),
|
|
709
|
+
kick: op(1, (owner: Owner, target: MemberReference, options?: ModerationOptions) =>
|
|
710
|
+
owner.guild("members.kick", () => memberKick(target, options), options),
|
|
711
|
+
),
|
|
712
|
+
ban: op(2, (owner: Owner, target: MemberReference, input?: BanInput, options?: ModerationOptions) =>
|
|
713
|
+
owner.guild("members.ban", () => guildBan(target, input, options), options),
|
|
714
|
+
),
|
|
715
|
+
unban: op(1, (owner: Owner, target: MemberReference, options?: ModerationOptions) =>
|
|
716
|
+
owner.guild("members.unban", () => guildUnban(target, options), options),
|
|
717
|
+
),
|
|
718
|
+
fetchBans: op(1, (owner: Owner, guildId: string, options?: GuildOperationOptions) =>
|
|
719
|
+
owner.guild("members.fetchBans", () => guildBans(guildId), options),
|
|
720
|
+
),
|
|
721
|
+
iterate: page(
|
|
722
|
+
2,
|
|
723
|
+
(owner: Owner, guildId: string, query: UserIterationQuery, options?: GuildOperationOptions) =>
|
|
724
|
+
memberPagination(owner, guildId, query, options),
|
|
725
|
+
),
|
|
726
|
+
get: get((owner: Owner, member: MemberReference) => owner.getResource("members", member)),
|
|
727
|
+
fetch: op(1, (owner: Owner, member: MemberReference, options?: GuildOperationOptions) =>
|
|
728
|
+
owner.guild("members.fetch", () => memberFetch(member), options),
|
|
729
|
+
),
|
|
730
|
+
fetchSelf: op(1, (owner: Owner, guildId: string, options?: GuildOperationOptions) =>
|
|
731
|
+
owner.guild("members.fetchSelf", () => memberSelf(guildId), options),
|
|
732
|
+
),
|
|
733
|
+
fetchCanManage: op(1, (owner: Owner, target: MemberReference, options?: CanManageOptions) =>
|
|
734
|
+
fetchCanManage(owner, target, options),
|
|
735
|
+
),
|
|
736
|
+
fetchPage: op(2, (owner: Owner, guildId: string, query?: MemberQuery, options?: GuildOperationOptions) =>
|
|
737
|
+
owner.guild("members.fetchPage", () => memberPage(guildId, query), options),
|
|
738
|
+
),
|
|
739
|
+
addRole: op(
|
|
740
|
+
2,
|
|
741
|
+
(owner: Owner, member: MemberReference, roleId: string, options?: GuildAuditOperationOptions) =>
|
|
742
|
+
owner.guild("members.addRole", () => memberRole(member, roleId, true), options),
|
|
743
|
+
),
|
|
744
|
+
removeRole: op(
|
|
745
|
+
2,
|
|
746
|
+
(owner: Owner, member: MemberReference, roleId: string, options?: GuildAuditOperationOptions) =>
|
|
747
|
+
owner.guild("members.removeRole", () => memberRole(member, roleId, false), options),
|
|
748
|
+
),
|
|
749
|
+
},
|
|
750
|
+
permissions: {
|
|
751
|
+
calculate: pure((_owner: Owner, input: PermissionInput) => calculatePermissions(input)),
|
|
752
|
+
fetch: op(1, (owner: Owner, target: PermissionTarget, options?: GuildOperationOptions) =>
|
|
753
|
+
fetchPermissions(owner, target, options),
|
|
754
|
+
),
|
|
755
|
+
},
|
|
756
|
+
roles: {
|
|
757
|
+
setHoistPositions: op(
|
|
758
|
+
2,
|
|
759
|
+
(
|
|
760
|
+
owner: Owner,
|
|
761
|
+
guildId: string,
|
|
762
|
+
positions: readonly RoleHoistPosition[],
|
|
763
|
+
options?: GuildAuditOperationOptions,
|
|
764
|
+
) => owner.guild("roles.setHoistPositions", () => roleSetHoistPositions(guildId, positions), options),
|
|
765
|
+
),
|
|
766
|
+
resetHoistPositions: op(1, (owner: Owner, guildId: string, options?: GuildAuditOperationOptions) =>
|
|
767
|
+
owner.guild("roles.resetHoistPositions", () => roleResetHoistPositions(guildId), options),
|
|
768
|
+
),
|
|
769
|
+
get: get((owner: Owner, role: RoleReference) => owner.getResource("roles", role)),
|
|
770
|
+
fetchAll: op(1, (owner: Owner, guildId: string, options?: GuildOperationOptions) =>
|
|
771
|
+
owner.guild("roles.fetchAll", () => roleList(guildId), options),
|
|
772
|
+
),
|
|
773
|
+
create: op(2, (owner: Owner, guildId: string, input: RoleCreate, options?: GuildAuditOperationOptions) =>
|
|
774
|
+
owner.guild("roles.create", () => roleCreate(guildId, input), options),
|
|
775
|
+
),
|
|
776
|
+
edit: op(2, (owner: Owner, role: RoleReference, input: RoleEdit, options?: GuildAuditOperationOptions) =>
|
|
777
|
+
owner.guild("roles.edit", () => roleEdit(role, input), options),
|
|
778
|
+
),
|
|
779
|
+
delete: op(1, (owner: Owner, role: RoleReference, options?: GuildAuditOperationOptions) =>
|
|
780
|
+
owner.guild("roles.delete", () => roleDelete(role), options),
|
|
781
|
+
),
|
|
782
|
+
reorder: op(
|
|
783
|
+
2,
|
|
784
|
+
(
|
|
785
|
+
owner: Owner,
|
|
786
|
+
guildId: string,
|
|
787
|
+
positions: readonly RolePosition[],
|
|
788
|
+
options?: GuildAuditOperationOptions,
|
|
789
|
+
) => owner.guild("roles.reorder", () => roleReorder(guildId, positions), options),
|
|
790
|
+
),
|
|
791
|
+
},
|
|
792
|
+
threads: {
|
|
793
|
+
create: op(
|
|
794
|
+
2,
|
|
795
|
+
(owner: Owner, channelId: string, input: ThreadCreate, options?: ChannelAuditOperationOptions) =>
|
|
796
|
+
owner.channel("threads.create", () => threadCreate(channelId, input), options),
|
|
797
|
+
),
|
|
798
|
+
createFromMessage: op(
|
|
799
|
+
2,
|
|
800
|
+
(
|
|
801
|
+
owner: Owner,
|
|
802
|
+
message: MessageReference,
|
|
803
|
+
input: ThreadFromMessageCreate,
|
|
804
|
+
options?: ChannelAuditOperationOptions,
|
|
805
|
+
) => owner.channel("threads.createFromMessage", () => threadCreateFromMessage(message, input), options),
|
|
806
|
+
),
|
|
807
|
+
createPost: op(
|
|
808
|
+
2,
|
|
809
|
+
(owner: Owner, channelId: string, input: ForumPostCreate, options?: ChannelAuditOperationOptions) =>
|
|
810
|
+
owner.channel(
|
|
811
|
+
"threads.createPost",
|
|
812
|
+
() => threadPost(channelId, input, owner.decodeMessage),
|
|
813
|
+
options,
|
|
814
|
+
),
|
|
815
|
+
),
|
|
816
|
+
edit: op(2, (owner: Owner, threadId: string, input: ThreadEdit, options?: ChannelAuditOperationOptions) =>
|
|
817
|
+
owner.channel("threads.edit", () => threadEdit(threadId, input), options),
|
|
818
|
+
),
|
|
819
|
+
fetchActive: op(1, (owner: Owner, guildId: string, options?: ChannelOperationOptions) =>
|
|
820
|
+
owner.channel("threads.fetchActive", () => threadActive(guildId), options),
|
|
821
|
+
),
|
|
822
|
+
fetchArchived: op(
|
|
823
|
+
2,
|
|
824
|
+
(owner: Owner, channelId: string, query?: ArchivedThreadQuery, options?: ChannelOperationOptions) =>
|
|
825
|
+
owner.channel("threads.fetchArchived", () => threadArchived(channelId, query), options),
|
|
826
|
+
),
|
|
827
|
+
search: op(
|
|
828
|
+
2,
|
|
829
|
+
(owner: Owner, channelId: string, query?: ThreadSearchQuery, options?: ChannelOperationOptions) =>
|
|
830
|
+
owner.channel("threads.search", () => threadSearch(channelId, query, owner.decodeMessage), options),
|
|
831
|
+
),
|
|
832
|
+
join: op(1, (owner: Owner, threadId: string, options?: ChannelOperationOptions) =>
|
|
833
|
+
owner.channel("threads.join", () => threadMembership(threadId, undefined, "PUT"), options),
|
|
834
|
+
),
|
|
835
|
+
leave: op(1, (owner: Owner, threadId: string, options?: ChannelOperationOptions) =>
|
|
836
|
+
owner.channel("threads.leave", () => threadMembership(threadId, undefined, "DELETE"), options),
|
|
837
|
+
),
|
|
838
|
+
addMember: op(2, (owner: Owner, threadId: string, userId: string, options?: ChannelOperationOptions) =>
|
|
839
|
+
owner.channel("threads.addMember", () => threadMembership(threadId, userId, "PUT"), options),
|
|
840
|
+
),
|
|
841
|
+
removeMember: op(2, (owner: Owner, threadId: string, userId: string, options?: ChannelOperationOptions) =>
|
|
842
|
+
owner.channel("threads.removeMember", () => threadMembership(threadId, userId, "DELETE"), options),
|
|
843
|
+
),
|
|
844
|
+
fetchMember: op(
|
|
845
|
+
3,
|
|
846
|
+
(
|
|
847
|
+
owner: Owner,
|
|
848
|
+
threadId: string,
|
|
849
|
+
userId: string,
|
|
850
|
+
query?: ThreadMemberQuery,
|
|
851
|
+
options?: ChannelOperationOptions,
|
|
852
|
+
) => fetchThreadMember(owner, threadId, userId, query, options),
|
|
853
|
+
),
|
|
854
|
+
fetchMembers: op(
|
|
855
|
+
2,
|
|
856
|
+
(owner: Owner, threadId: string, query?: ThreadMemberPageQuery, options?: ChannelOperationOptions) =>
|
|
857
|
+
fetchThreadMembers(owner, threadId, query, options),
|
|
858
|
+
),
|
|
859
|
+
iterateMembers: page(
|
|
860
|
+
2,
|
|
861
|
+
(
|
|
862
|
+
owner: Owner,
|
|
863
|
+
threadId: string,
|
|
864
|
+
query: ThreadMemberIterationQuery,
|
|
865
|
+
options?: ChannelOperationOptions,
|
|
866
|
+
) => threadMemberPagination(owner, threadId, query, options),
|
|
867
|
+
),
|
|
868
|
+
},
|
|
869
|
+
attachments: {
|
|
870
|
+
refreshUrls: op(1, (owner: Owner, urls: readonly string[], options?: AttachmentRefreshOptions) =>
|
|
871
|
+
owner.refreshAttachmentUrls(urls, options),
|
|
872
|
+
),
|
|
873
|
+
download: op(1, (owner: Owner, attachment: Attachment, options: AttachmentDownloadOptions) =>
|
|
874
|
+
owner.downloadAttachment(attachment, options),
|
|
875
|
+
),
|
|
876
|
+
stream: custom("stream", defaultAttachmentStream<M>, nativeAttachmentStream<M>),
|
|
877
|
+
},
|
|
878
|
+
messages: {
|
|
879
|
+
publish: named(
|
|
880
|
+
"publish",
|
|
881
|
+
op(1, (owner: Owner, target: MessageReference, options?: MessageOperationOptions) =>
|
|
882
|
+
owner.publish(target, options),
|
|
883
|
+
),
|
|
884
|
+
),
|
|
885
|
+
fetchCrosspostSource: named(
|
|
886
|
+
"fetchCrosspostSource",
|
|
887
|
+
op(1, (owner: Owner, target: MessageReference, options?: MessageOperationOptions) =>
|
|
888
|
+
owner.fetchCrosspostSource(target, options),
|
|
889
|
+
),
|
|
890
|
+
),
|
|
891
|
+
iterateHistory: named(
|
|
892
|
+
"iterateHistory",
|
|
893
|
+
page(
|
|
894
|
+
2,
|
|
895
|
+
(
|
|
896
|
+
owner: Owner,
|
|
897
|
+
channelId: string,
|
|
898
|
+
query: HistoryIterationQuery,
|
|
899
|
+
options?: MessageOperationOptions,
|
|
900
|
+
) => historyPagination(owner, channelId, query, options),
|
|
901
|
+
),
|
|
902
|
+
),
|
|
903
|
+
search: named(
|
|
904
|
+
"search",
|
|
905
|
+
op(
|
|
906
|
+
2,
|
|
907
|
+
(
|
|
908
|
+
owner: Owner,
|
|
909
|
+
context: MessageSearchContext,
|
|
910
|
+
query?: MessageSearchQuery,
|
|
911
|
+
options?: MessageOperationOptions,
|
|
912
|
+
) => owner.searchMessages(context, query, options),
|
|
913
|
+
),
|
|
914
|
+
),
|
|
915
|
+
iterateSearch: page(
|
|
916
|
+
3,
|
|
917
|
+
(
|
|
918
|
+
owner: Owner,
|
|
919
|
+
context: MessageSearchContext,
|
|
920
|
+
filters: Omit<MessageSearchQuery, "limit" | "page">,
|
|
921
|
+
limits: MessageSearchIterationLimits,
|
|
922
|
+
options?: MessageOperationOptions,
|
|
923
|
+
) => searchMessagePagination(owner, context, filters, limits, options),
|
|
924
|
+
),
|
|
925
|
+
iterateReactionUsers: named(
|
|
926
|
+
"iterateReactionUsers",
|
|
927
|
+
page(
|
|
928
|
+
3,
|
|
929
|
+
(
|
|
930
|
+
owner: Owner,
|
|
931
|
+
message: MessageReference,
|
|
932
|
+
emoji: ReactionEmojiInput,
|
|
933
|
+
query: UserIterationQuery,
|
|
934
|
+
options?: MessageOperationOptions,
|
|
935
|
+
) => reactionUserPagination(owner, message, emoji, query, options),
|
|
936
|
+
),
|
|
937
|
+
),
|
|
938
|
+
iteratePins: named(
|
|
939
|
+
"iteratePins",
|
|
940
|
+
page(
|
|
941
|
+
2,
|
|
942
|
+
(owner: Owner, channelId: string, query: PinIterationQuery, options?: MessageOperationOptions) =>
|
|
943
|
+
pinPagination(owner, channelId, query, options),
|
|
944
|
+
),
|
|
945
|
+
),
|
|
946
|
+
removeUserReaction: named(
|
|
947
|
+
"removeUserReaction",
|
|
948
|
+
op(
|
|
949
|
+
3,
|
|
950
|
+
(
|
|
951
|
+
owner: Owner,
|
|
952
|
+
message: MessageReference,
|
|
953
|
+
emoji: ReactionEmojiInput,
|
|
954
|
+
userId: string,
|
|
955
|
+
options?: MessageOperationOptions,
|
|
956
|
+
) => owner.reaction("removeUserReaction", message, emoji, options, userId),
|
|
957
|
+
),
|
|
958
|
+
),
|
|
959
|
+
clearReaction: named(
|
|
960
|
+
"clearReaction",
|
|
961
|
+
op(
|
|
962
|
+
2,
|
|
963
|
+
(
|
|
964
|
+
owner: Owner,
|
|
965
|
+
message: MessageReference,
|
|
966
|
+
emoji: ReactionEmojiInput,
|
|
967
|
+
options?: MessageOperationOptions,
|
|
968
|
+
) => owner.reaction("clearReaction", message, emoji, options),
|
|
969
|
+
),
|
|
970
|
+
),
|
|
971
|
+
clearReactions: named(
|
|
972
|
+
"clearReactions",
|
|
973
|
+
op(1, (owner: Owner, message: MessageReference, options?: MessageOperationOptions) =>
|
|
974
|
+
owner.reaction("clearReactions", message, undefined, options),
|
|
975
|
+
),
|
|
976
|
+
),
|
|
977
|
+
pin: named(
|
|
978
|
+
"pin",
|
|
979
|
+
op(1, (owner: Owner, message: MessageReference, options?: MessageAuditOperationOptions) =>
|
|
980
|
+
owner.pin("pin", message, options),
|
|
981
|
+
),
|
|
982
|
+
),
|
|
983
|
+
unpin: named(
|
|
984
|
+
"unpin",
|
|
985
|
+
op(1, (owner: Owner, message: MessageReference, options?: MessageAuditOperationOptions) =>
|
|
986
|
+
owner.pin("unpin", message, options),
|
|
987
|
+
),
|
|
988
|
+
),
|
|
989
|
+
fetchPins: named(
|
|
990
|
+
"fetchPins",
|
|
991
|
+
op(2, (owner: Owner, channelId: string, query?: MessagePinsQuery, options?: MessageOperationOptions) =>
|
|
992
|
+
owner.fetchPins(channelId, query, options),
|
|
993
|
+
),
|
|
994
|
+
),
|
|
995
|
+
fetchReactionUsers: named(
|
|
996
|
+
"fetchReactionUsers",
|
|
997
|
+
op(
|
|
998
|
+
3,
|
|
999
|
+
(
|
|
1000
|
+
owner: Owner,
|
|
1001
|
+
message: MessageReference,
|
|
1002
|
+
emoji: ReactionEmojiInput,
|
|
1003
|
+
query?: ReactionUsersQuery,
|
|
1004
|
+
options?: MessageOperationOptions,
|
|
1005
|
+
) => owner.fetchReactionUsers(message, emoji, query, options),
|
|
1006
|
+
),
|
|
1007
|
+
),
|
|
1008
|
+
addReaction: named(
|
|
1009
|
+
"addReaction",
|
|
1010
|
+
op(
|
|
1011
|
+
2,
|
|
1012
|
+
(
|
|
1013
|
+
owner: Owner,
|
|
1014
|
+
message: MessageReference,
|
|
1015
|
+
emoji: ReactionEmojiInput,
|
|
1016
|
+
options?: MessageOperationOptions,
|
|
1017
|
+
) => owner.reaction("addReaction", message, emoji, options),
|
|
1018
|
+
),
|
|
1019
|
+
),
|
|
1020
|
+
removeReaction: named(
|
|
1021
|
+
"removeReaction",
|
|
1022
|
+
op(
|
|
1023
|
+
2,
|
|
1024
|
+
(
|
|
1025
|
+
owner: Owner,
|
|
1026
|
+
message: MessageReference,
|
|
1027
|
+
emoji: ReactionEmojiInput,
|
|
1028
|
+
options?: MessageOperationOptions,
|
|
1029
|
+
) => owner.reaction("removeReaction", message, emoji, options),
|
|
1030
|
+
),
|
|
1031
|
+
),
|
|
1032
|
+
collect: custom("custom", defaultCollect<M>, nativeCollect<M>),
|
|
1033
|
+
collectReactions: custom("custom", defaultCollectReactions<M>, nativeCollectReactions<M>),
|
|
1034
|
+
paginate: named(
|
|
1035
|
+
"paginate",
|
|
1036
|
+
op(2, (owner: Owner, channelId: string, pages: readonly PageInput[], options: ChannelPaginateOptions) =>
|
|
1037
|
+
paginate(owner, channelId, pages, options),
|
|
1038
|
+
),
|
|
1039
|
+
),
|
|
1040
|
+
get: get((owner: Owner, message: MessageReference) => owner.get(message)),
|
|
1041
|
+
send: named(
|
|
1042
|
+
"send",
|
|
1043
|
+
op(2, (owner: Owner, channelId: string, input: MessageInput | string, options?: SendOptions) =>
|
|
1044
|
+
owner.send(channelId, input, options),
|
|
1045
|
+
),
|
|
1046
|
+
),
|
|
1047
|
+
forward: named(
|
|
1048
|
+
"forward",
|
|
1049
|
+
op(2, (owner: Owner, channelId: string, input: ForwardMessageInput, options?: SendOptions) =>
|
|
1050
|
+
owner.forward(channelId, input, options),
|
|
1051
|
+
),
|
|
1052
|
+
),
|
|
1053
|
+
typing: named(
|
|
1054
|
+
"typing",
|
|
1055
|
+
op(1, (owner: Owner, channelId: string, options?: MessageOperationOptions) =>
|
|
1056
|
+
owner.typing(channelId, options),
|
|
1057
|
+
),
|
|
1058
|
+
),
|
|
1059
|
+
keepTyping: custom("custom", defaultKeepTyping<M>, nativeKeepTyping<M>),
|
|
1060
|
+
reply: named(
|
|
1061
|
+
"reply",
|
|
1062
|
+
op(2, (owner: Owner, message: MessageReference, input: ReplyInput | string, options?: SendOptions) =>
|
|
1063
|
+
owner.reply(message, input, options),
|
|
1064
|
+
),
|
|
1065
|
+
),
|
|
1066
|
+
fetch: named(
|
|
1067
|
+
"fetch",
|
|
1068
|
+
op(1, (owner: Owner, message: MessageReference, options?: MessageOperationOptions) =>
|
|
1069
|
+
owner.fetch(message, options),
|
|
1070
|
+
),
|
|
1071
|
+
),
|
|
1072
|
+
fetchHistory: named(
|
|
1073
|
+
"fetchHistory",
|
|
1074
|
+
op(
|
|
1075
|
+
2,
|
|
1076
|
+
(owner: Owner, channelId: string, query?: MessageHistoryQuery, options?: MessageOperationOptions) =>
|
|
1077
|
+
owner.fetchHistory(channelId, query, options),
|
|
1078
|
+
),
|
|
1079
|
+
),
|
|
1080
|
+
previewCleanup: named(
|
|
1081
|
+
"previewCleanup",
|
|
1082
|
+
op(
|
|
1083
|
+
2,
|
|
1084
|
+
(
|
|
1085
|
+
owner: Owner,
|
|
1086
|
+
channelId: string,
|
|
1087
|
+
selection: MessageCleanupSelection<M>,
|
|
1088
|
+
options?: MessageOperationOptions,
|
|
1089
|
+
) => previewCleanup(owner, channelId, selection, options),
|
|
1090
|
+
),
|
|
1091
|
+
),
|
|
1092
|
+
cleanup: named(
|
|
1093
|
+
"cleanup",
|
|
1094
|
+
op(1, (owner: Owner, plan: MessageCleanupPlan<M>, options?: MessageCleanupOptions) =>
|
|
1095
|
+
cleanup(owner, plan, options),
|
|
1096
|
+
),
|
|
1097
|
+
),
|
|
1098
|
+
edit: named(
|
|
1099
|
+
"edit",
|
|
1100
|
+
op(
|
|
1101
|
+
2,
|
|
1102
|
+
(
|
|
1103
|
+
owner: Owner,
|
|
1104
|
+
message: MessageReference,
|
|
1105
|
+
input: EditMessageInput | string,
|
|
1106
|
+
options?: MessageOperationOptions,
|
|
1107
|
+
) => owner.edit(message, input, options),
|
|
1108
|
+
),
|
|
1109
|
+
),
|
|
1110
|
+
delete: named(
|
|
1111
|
+
"delete",
|
|
1112
|
+
op(1, (owner: Owner, message: MessageReference, options?: MessageAuditOperationOptions) =>
|
|
1113
|
+
owner.delete(message, options),
|
|
1114
|
+
),
|
|
1115
|
+
),
|
|
1116
|
+
deleteAttachment: named(
|
|
1117
|
+
"deleteAttachment",
|
|
1118
|
+
op(
|
|
1119
|
+
2,
|
|
1120
|
+
(
|
|
1121
|
+
owner: Owner,
|
|
1122
|
+
message: MessageReference,
|
|
1123
|
+
attachmentId: string,
|
|
1124
|
+
options?: MessageOperationOptions,
|
|
1125
|
+
) => owner.deleteAttachment(message, attachmentId, options),
|
|
1126
|
+
),
|
|
1127
|
+
),
|
|
1128
|
+
deleteMany: named(
|
|
1129
|
+
"deleteMany",
|
|
1130
|
+
op(
|
|
1131
|
+
2,
|
|
1132
|
+
(
|
|
1133
|
+
owner: Owner,
|
|
1134
|
+
channelId: string,
|
|
1135
|
+
messageIds: readonly string[],
|
|
1136
|
+
options?: MessageAuditOperationOptions,
|
|
1137
|
+
) => owner.deleteMany(channelId, messageIds, options),
|
|
1138
|
+
),
|
|
1139
|
+
),
|
|
1140
|
+
deleteOwnMessages: named(
|
|
1141
|
+
"deleteOwnMessages",
|
|
1142
|
+
op(1, (owner: Owner, channelId: string, options: OwnMessageDeletionOptions) =>
|
|
1143
|
+
owner.deleteOwnMessages(channelId, options),
|
|
1144
|
+
),
|
|
1145
|
+
),
|
|
1146
|
+
},
|
|
1147
|
+
})
|
|
1148
|
+
}
|
|
1149
|
+
|
|
1150
|
+
/** The operation table for one client's selected message type */
|
|
1151
|
+
export type OperationTable<M extends MessageCore> = ReturnType<typeof defineOperations<M>>
|
|
1152
|
+
|
|
1153
|
+
/** Build the table for one client. Entries hold no client state until a binder supplies the owner */
|
|
1154
|
+
export const operationTable = <M extends MessageCore>(): OperationTable<M> => defineOperations<M>()
|
|
1155
|
+
|
|
1156
|
+
/** Iterate table entries with their default operation IDs */
|
|
1157
|
+
export function eachEntry<M extends MessageCore>(
|
|
1158
|
+
table: OperationTable<M>,
|
|
1159
|
+
bind: (entry: BindableEntry<M>, id: Operation) => unknown,
|
|
1160
|
+
): Record<string, Readonly<Record<string, unknown>>> {
|
|
1161
|
+
const namespaces: Record<string, Readonly<Record<string, unknown>>> = {}
|
|
1162
|
+
for (const [namespace, members] of Object.entries(table)) {
|
|
1163
|
+
const bound: Record<string, unknown> = {}
|
|
1164
|
+
for (const [member, entry] of Object.entries(
|
|
1165
|
+
members as Record<string, BindableEntry<M> & { readonly id?: Operation }>,
|
|
1166
|
+
))
|
|
1167
|
+
bound[member] = bind(entry, entry.id ?? (`${namespace}.${member}` as Operation))
|
|
1168
|
+
namespaces[namespace] = Object.freeze(bound)
|
|
1169
|
+
}
|
|
1170
|
+
return namespaces
|
|
1171
|
+
}
|