20 symbols from @neontechspace/fluxerly/effect
Interfaces#
AuditedRequestOptions #
Settings for a remote mutation that Fluxer can record in the community audit log: Its deadline and an optional reason
interface AuditedRequestOptions extends RequestOptionsinterface AuditedRequestOptions
extends RequestOptionsauditoptional#Reason -
Optional audit-log reason, 1–512 printable ASCII characters after trimming
Sent only as the raw X-Audit-Log-Reason header, without URL escaping, because Fluxer does not decode escapes. Non-ASCII and control characters fail before dispatch. Omission sends no header. Never included in SDK errors or diagnostics. Header delivery does not guarantee that Fluxer stores the reason in an audit entry. Methods name the known paths that do not
string
Inherited from Request: timeout
CanManageOptions #
Settings for members: Whose rank to check, and the shared deadline of its reads
interface CanManageOptions extends RequestOptionsinterface CanManageOptions
extends RequestOptionsInherited from Request: timeout
ClientOptions #
Choose the client's connection, logging, message fields, failure hook and optional caches
The create function reads these options when its Effect executes, not when the Effect is built. Required services for the on hook are captured at that time. The sharding option chooses which gateway shards this client owns. Automatic sharding, and a client without sharding settings, may move to a larger plan while the client runs. Shard zero receives direct-message traffic. HTTP and cache budgets apply to the whole client, not separately to each shard. The message option chooses which optional message fields are returned, including nested results, callbacks and cached messages. Omission returns full Message objects. The selection cannot change after client creation. TypeScript usually infers the type parameters from these options. If supplying error and service types E and R explicitly with message, also supply the selected-field tuple as F
interface ClientOptions<
E = never,
R = never,
F extends MessageFields | undefined = undefined
>
extends Omit<
SharedClientOptions<F>,
"cache" | "logging" | "onError" | "connection"
>interface ClientOptions<
E = never,
R = never,
F extends
| MessageFields | undefined
= undefined
>
extends Omit<
SharedClientOptions<F>,
| "cache" | "logging"
| "onError" | "connection"
>cacheoptional#-
Optionally keep resource snapshots in memory
Omission keeps none. Every configured budget applies across this client's locally owned shards. A gateway gap invalidates known-scope snapshots from its affected shard. Unknown community scope invalidates conservatively because the SDK keeps no channel-to-community index
channelsoptional-
Cache community channels and threads from explicit reads and channel and thread events, without automatically listing them
A guild create event replaces this community's cached channels and threads with the channels and active threads the bot can view. Once a channel mutation is dispatched, the SDK removes the cached channels it can affect and prevents pending reads from restoring them. That is the written channel, with its threads when the mutation deletes the channel or converts its type, and with the forum posts that apply a tag it removes, as
deleteand an edit withForum Tag availablecan, because Fluxer drops removed tags from posts without a thread update, or this community's channels for a category or a community-wide mutation such as create or reorder, or every cached channel when the cache does not hold the written channel. An operation confined to one thread removes only that thread. Bulk ordering events clear this community's cached channels because permission updates may still be in progress. Category updates or deletions also clear this community's channels because children can inherit changed permissions. Visibility loss clears the affected channel, and for a text, announcement, forum or media channel also its threads, because Fluxer deletes them without thread deletion events. A text or announcement channel update clears that channel's cached threads whose type its type cannot hold, because Fluxer retypes a converted channel's threads without thread events for archived ones. A forum or media channel update clears that channel's cached posts that apply a tag missing from the update, because Fluxer removes a tag through the channel update alone. Either update also stops pending reads from storing that channel's threads. Other pending reads by ID, and reads of other communities, still store what they return, while a pending read of the channel's own community stores nothing, as after any channel update. Thread create and update events store the thread, a thread deletion clears it, and a thread list replaces the cached threads of its community or of its listed parent channels. A change to the bot's own membership of a thread clears that thread, because its membership field is then out of date. A full list removes missing channels, never threads, only when no conflicting observation overlaps the read. These snapshots are not a complete copy of the community's channels or threadsTags boolean | ResourceCacheSettings<GuildChannel>| boolean | ResourceCacheSettings<GuildChannel> directoptionalMessages -
Cache private conversations from explicit reads and complete channel events, without automatically listing them
A local lookup makes the item less likely to be removed for capacity, but does not extend its age limit. Targeted reads, mutations and channel events conflict only for the same conversation. Full-list reads, opening by user ID, account updates, connection gaps, clear and shutdown can prevent older responses from restoring the whole category
boolean | ResourceCacheSettings<DirectMessageChannel>| boolean | ResourceCacheSettings< DirectMessageChannel > emojisoptional-
Cache emoji metadata from REST reads and writes, not image bytes or creator accounts
A guild create event replaces this community's cached emojis with its complete list, and other community expression events clear observations.
Resourcecontrols bounds and expiry, while gaps and shutdown release snapshotsCache Settings boolean | ResourceCacheSettings<GuildEmoji>| boolean | ResourceCacheSettings<GuildEmoji> guildsoptional-
Cache community details from explicit reads and guild create or update events, without preloading members
Community removal or unavailability clears this community's cached resources, including channels
boolean | ResourceCacheSettings<Guild> membersoptional-
Cache individual memberships from explicit reads, REST pages, member add or update events and the members a guild create event lists, which are the bot's own and those in voice channels
The guild create events sent while a session starts list member accounts by ID only, so only the bot's own member, completed from READY's account, is stored from them. The member that Fluxer attaches to message create and update, reaction add and remove, and typing events refreshes it too, because Fluxer reads that member from the community's current state when it dispatches the event. It is stored whatever
messageselects. A reaction or typing member that arrives without the user's name is completed from the member already cached before it is stored. When the member of such an event does not decode, or the whole event is rejected as malformed, the account's cached member is removed because the cached copy may now be stale. When a rejected event does not identify the account, the community's cached members are removed, and when it does not identify the community either, every cached member is. A member that fails to decode logsFields gateway. A voice state's member is never stored, because it can lag behind role edits. The cache only receives these when Fluxer sends the events, so enabling it requests no extra dispatches and a bot that receives no such events fills it from reads alone. Member removal clears that membership. Successful or uncertain role assignment clears the target.member Skipped boolean | ResourceCacheSettings<GuildMember>| boolean | ResourceCacheSettings<GuildMember> messagesoptional-
Omit or pass false to disable caching
Pass true or an options object to keep bounded message snapshots in memory across the client. Eligible HTTP responses and gateway events populate the cache. Deletes and writes with unknown outcomes evict affected messages. Gateway gaps clear it even after successful resume. Conflicts can produce misses. A response that differs from an overlapping event only by lacking its community ID keeps the event snapshot. No automatic history retrieval. Shutdown releases cached references
boolean | MessageCacheOptions<NoInfer<SelectedMessage<F>>>| boolean | MessageCacheOptions< NoInfer<SelectedMessage<F>> > rolesoptional-
Cache role definitions from explicit list, create or edit results and role events
Successful or uncertain creation or reordering clears this community's cached roles. Edits clear their target, or all this community's roles when changing
hoist. Role deletion also clears cached memberships because assignments can change without individual member events. A full list removes missing roles only when no conflicting observation overlaps the read. Partial bulk events replace only the roles they supply. A guild create event replaces this community's cached roles with its complete role list. ThePosition rolesmethod returns a community's roles only while that list is known complete, which a full list read establishes only while the community's shard is connected. The entry limit counts the roles of every community together, so complete lists for many communities need a larger.get All max. The cache counts bigint permission fields as decimal strings when measuring bytesEntries boolean | ResourceCacheSettings<GuildRole>| boolean | ResourceCacheSettings<GuildRole> stickersoptional-
Cache sticker metadata, with the same bounds, expiry and invalidation rules as emojis
boolean | ResourceCacheSettings<GuildSticker>| boolean | ResourceCacheSettings<GuildSticker> usersoptional-
Cache public account profiles from explicit reads and complete user events, not partial message authors
A local lookup makes the item less likely to be removed for capacity, but does not extend its age limit. Targeted reads conflict only with later observations of the same account, so unrelated IDs can both populate. Reads without a target ID, lost gateway connections, clear and shutdown can prevent older responses from restoring the whole category
boolean | ResourceCacheSettings<User>
connectionoptional#-
Set the startup deadline, retry limit and recovery timing, as in the default entry point
Native recovery can also take an Effect Schedule that decides established-session recovery delays
maxoptionalStartup Attempts -
Maximum attempts to start each local shard, including its first attempt, as a positive safe integer
The SDK retries only failures it classifies as transient, and the overall deadline can stop retries sooner. This does not limit recovery attempts after a session has become ready
number recoveryoptional-
Recovery timing for established sessions, with the same settings as the default entry point plus schedule
& ConnectionRecoveryOptions & { readonly schedule?: Schedule<unknown, ConnectionFailure, never, never> }& ConnectionRecoveryOptions & { readonly schedule?: Schedule< unknown, ConnectionFailure, never, never > } startupoptionalTimeout Ms -
Total milliseconds allowed for startup, including instance discovery, retries and every local shard becoming ready
Must be an integer from 1 through 2,147,483,647. When this client owns several shards, the SDK spaces their new-session Identify commands by one second and adds one second to this deadline for each shard after the first, so the spacing alone never causes a timeout. The spacing does not coordinate quotas across processes or an IP address. An identify coordinator replaces it, and the coordinator's waits count against this deadline. Automatic sharding counts the bot's communities under a separate deadline of the same length before the shards start. Expiry stops startup work, while completion still waits for the SDK's owned-resource cleanup
number
loggingoptional#-
Configure what the SDK logs, with the same settings as the default entry point
Without sink or format, records go through the caller's Effect logger with
Effect, the real Cause and fluxerly.* annotations such as.log With Level fluxerlyand.code fluxerly, so any Effect Logger, span and tracer applies. Debug and Trace records enabled by these settings bypass the Effect minimum log level, while Info and higher records respect it. Connection records use connect or run's services, handler records use registration services and shutdown records use shutdown's services. A sink or an explicit format replaces the Effect logger with the SDK's own output.category LoggingOptionsimport { Effect, Logger } from "effect" import { createClient } from "@neontechspace/fluxerly/effect" export function loggingExample(token: string) { return createClient({ token, logging: { categories: { rest: "debug" } } }).pipe( Effect.withLogger(Logger.consoleJson), ) } messageoptional#Fields -
Choose which optional message fields the application receives
Omit this setting for full Message output. An empty array keeps id,
channel, content, author, type andId guild, where the last two are kept when the response supplies themId FExcluded fields are absent, not undefined or empty arrays, in this client's REST, event, cache and collector results
Selecting a field includes its nested values. For example,
messagekeeps its own media even when top-level media fields are excludedSnapshots This reduces the objects the SDK builds locally, not network payloads or data stored by Fluxer. The SDK still rejects malformed recognized response fields, even when they are excluded
Unknown field names and non-arrays fail with
Configurationwhose field isError message. Including core field names is allowed and does not change the required coreFields TypeScript knows the exact selection when given a literal tuple. For an array whose contents are unknown, optional fields remain optional. The copied selection lasts for this client's lifetime and does not affect separately created webhook clients or other resource types
import { createClient } from "@neontechspace/fluxerly" export function selectedMessagesExample(token) { return createClient({ token, messageFields: ["attachments", "messageReference"] }) }import { createClient } from "@neontechspace/fluxerly" export function selectedMessagesExample(token: string) { return createClient({ token, messageFields: ["attachments", "messageReference"] }) } onoptional#Error -
Receive every failure that has no returned result, with the original error and its complete Cause
The hook runs with the services available when client creation executes, one report at a time in order. Up to 256 reports wait while it is busy, and later ones are logged instead, with
fields".report Outcome queue", and counted inFull diagnostics().counters.reportsDropped. A subscription's ownontakes precedence. Without a hook the SDK logs each failure at Error with its full Cause. A failing hook is logged with the original failure and never retried. Shutdown interrupts a running hook and waits at most one second for its cleanup, so a hook that ignores interruption cannot hold shutdown open. The interrupted report and any queued ones are logged at Error, withError fields"interrupted" for the report being handled and ".report Outcome client" for queued or later reports. A hook that interrupts itself also logs its report with "interrupted", and later reports still reach the hookClosed (report: FailureReport) => Effect<unknown, E, R>(report: FailureReport) => Effect<unknown, E, R> uploadsoptional#-
Bound the attachment transfer bytes reserved by queued and active upload operations
maxoptionalBytes -
Maximum reserved attachment transfer bytes across queued and active operations, as a positive safe integer
Defaults to 104,857,600 (100 MiB), separate from the
restqueued JSON budget (4 MiB by default). The SDK reserves accepted byte-array lengths, file sizes or declared stream sizes before waiting for a request slot. A new operation fails with busy if its reservation would exceed this limit. Reservations remain held across rate-limit retries and release after transport cleanup. This excludes caller buffers, metadata and runtime overhead, so it is not a JavaScript heap or process-memory ceiling.queued Json Max Bytes number
Inherited from Client: gateway, instance, observe, rest, sharding, token, transport
ExpressionDeleteOptions #
Choose whether deleting a community emoji or sticker also requests removal of its image asset
The inherited timeout and audit follow Audited. Removing the image is a separate queued job. Deleting the community entry does not wait for it to finish
interface ExpressionDeleteOptions extends AuditedRequestOptionsinterface ExpressionDeleteOptions
extends AuditedRequestOptionspurgeoptional#-
False/default removes the community entry without asking to purge its image
True additionally requests irreversible queued asset/CDN removal and requires Fluxer's expression-purge feature. HTTP success does not mean the purge job has finished. Failure after dispatch can leave either effect applied
boolean
Inherited from Audited: audit, timeout
OwnMessageDeletionOptions #
Required confirmation and deadline for deleting this bot's entire authored history in a channel or community
The confirm field must be the literal true, so an accidental call without it fails before any request with reason input and input path options
interface OwnMessageDeletionOptions extends RequestOptionsinterface OwnMessageDeletionOptions
extends RequestOptionsconfirm#-
Must be true to acknowledge that the deletion is irreversible and cannot be rolled back
true
Inherited from Request: timeout
PermissionFetchOptions #
Settings for permissions: The shared deadline of its reads, and whether enabled caches may replace them
interface PermissionFetchOptions extends RequestOptionsinterface PermissionFetchOptions
extends RequestOptionspreferoptional#Cache -
Read each observation from an enabled cache before fetching it, such as to decide for every command without a request
Default false, which fetches every observation fresh. The guild, member and channel come from their caches when present, and the roles when the everyone role and every member role are all cached, otherwise one list read replaces all of them. A cached channel without its overwrite list is fetched, and a thread's parent channel is read the same way. Only fetches count toward the deadline. Cached observations reflect the last applied gateway events, so they can differ from Fluxer, and their snapshots can come from different moments. Cached entries stay while a shard can resume and are cleared when a new session starts, after which they are fetched. Use the default right before an action where a stale grant matters. With the caches disabled, the call behaves as it does by default. A value that is not a boolean fails with reason input
boolean
Inherited from Request: timeout
RequestOptions #
Settings for one remote operation: Its deadline
Methods document what their deadline covers beyond these rules. Effect operations are cancelled by interrupting their fiber
interface RequestOptionstimeoutoptional#Ms -
Total milliseconds for this call, an integer from 1 through 2,147,483,647
For a bot client's REST calls it covers local queueing, rate-limit waits, retries and HTTP, and defaults to the client's
rest, 30,000 unless configured. Calls outside a bot client's REST settings, such as standalone webhook clients, OAuth, instance discovery and gateway counts, default to 30,000. Owned cleanup is awaited afterward, so the call can finish later than this deadline.default Timeout Ms number
TimeoutOptions #
Timeout-only request settings
A timeout is provider audit metadata, not a stored Guild field
interface TimeoutOptions extends AuditedRequestOptionsinterface TimeoutOptions
extends AuditedRequestOptionstimeoutoptional#Reason -
Optional timeout audit metadata
Null or omission sends no meaningful reason. A string must contain 1–512 UTF-16 code units after U+000C and U+202E removal and surrounding-whitespace trimming. The original string is sent unchanged
string | null
Inherited from Audited: audit, timeout
WebhookMessageOperationOptions #
Request settings for fetching, editing or deleting a message that a webhook client sent
interface WebhookMessageOperationOptions extends RequestOptionsinterface WebhookMessageOperationOptions
extends RequestOptionsInherited from Request: timeout
Re-Exports#
Declared in JavaScript & TypeScript and documented there. Import them from @neontechspace/fluxerly/effect as well
Connection#Recovery Options - Retry timing for shards that lost an established session
Gateway#Options - Optional gateway settings: Malformed-dispatch handling and the fields sent in each new session's Identify
Instance#Options - Connect a client to a selected Fluxer server instead of the hosted default
Operation#Signal - The AbortSignal members used by default-API operations
Pagination#Query - Read a Fluxer list one page at a time through an iterator or Effect Stream
Rest#Options - Tune how many REST requests one client runs and queues, and the deadline an operation gets when it omits
timeoutMs Run#Bot Options - Configure how
runstopsBot Timeout#State Options - Settings for
members.timeout State Transport#Options - Replace the HTTP and WebSocket implementations one client uses, or the User-Agent it sends
Web#Socket Like - The subset of a ws WebSocket that the gateway uses
Web#Socket Options - Options the gateway passes to a custom WebSocket factory for each connection it opens