28 symbols from @neontechspace/fluxerly
Functions#
createWebhookClient #
Create a client that uses one webhook's token rather than bot authentication
Pass { id, token } or the credentials returned by a bot client's webhooks. Creation is synchronous, validates locally and makes no request. It copies the credential into a separate reference that hides the token when displayed. Reuse one client per credential to share its request limits and rate waits. The default instance is hosted Fluxer. A self-hosted instance can be selected explicitly. No token store or gateway is created. Always await shutdown when finished, or declare the client with await using as in the example. Invalid settings throw Configuration. Unexpected creation failures throw Sdk. A throwing option getter or reveal uses code application with the thrown value as its cause
createWebhookClient(options: WebhookClientOptions): WebhookClientcreateWebhookClient(
options: WebhookClientOptions
): WebhookClientParameters
options-
WebhookClientOptions
- Returns
WebhookClient
import { createWebhookClient } from "@neontechspace/fluxerly"
export async function webhookExample(id, token) {
await using webhook = createWebhookClient({ id, token })
const message = await webhook.send({ content: "Deploying…" })
return message.isErr() ? message : await webhook.editMessage(message.value.id, { content: "Deployed" })
}
import { createWebhookClient } from "@neontechspace/fluxerly"
export async function webhookExample(id: string, token: string) {
await using webhook = createWebhookClient({ id, token })
const message = await webhook.send({ content: "Deploying…" })
return message.isErr() ? message : await webhook.editMessage(message.value.id, { content: "Deployed" })
}
Variables#
WebhookType #
Select a received webhook's shape by comparing its type with these constants
A future Fluxer kind arrives as Unknown with type "unknown" and its number in raw
const WebhookType: Readonly<{ … }>Interfaces#
ChannelFollowerWebhook #
A webhook that delivers published messages from a followed announcement channel, selected by type === Webhook
Manage it with a bot client's webhooks and webhooks. It can be renamed or moved to a text channel in the same community, but its avatar cannot be changed. Deleting it unfollows the source. It has no exposed token and cannot be used with create
interface ChannelFollowerWebhook extends WebhookBaseinterface ChannelFollowerWebhook
extends WebhookBasesourceoptional#Channel -
Followed channel while it exists and the original creator can view it
Absence does not prove deletion
WebhookSourceChannel sourceoptional#Guild -
Source community while it exists and the original creator can view it
Absence does not prove deletion
WebhookSourceGuild type#-
Always
WebhookType .Channel Follower 2
Inherited from Webhook: avatar, channel, guild, id, name
CreatedWebhook #
Result of creating a webhook, including the secret needed to use it without a bot token
interface CreatedWebhookcredentials#-
Secret-bearing object for
createWebhook Client Closing a client does not erase this separate object
WebhookCredentials webhook#-
Frozen incoming webhook details, without the required token held separately in credentials
IncomingWebhook
IncomingWebhook #
A webhook that accepts token-authenticated operations, selected by type === Webhook
Its metadata contains no token. Creation returns separate Webhook for create
interface IncomingWebhook extends WebhookBaseinterface IncomingWebhook
extends WebhookBasetype#-
Always
WebhookType .Incoming 1
Inherited from Webhook: avatar, channel, guild, id, name
Invite#
An invite link and the destination details Fluxer returned to this caller
These returned details are frozen (read-only). Fetching them does not accept the invite or change membership, and the SDK does not keep them. Codes can grant access to the destination and should only be shared with intended recipients. The reported counts and expiry do not guarantee that someone can join later
interface Invitechannel#-
nameoptional-
Destination channel name
Null means no name, omission means Fluxer did not supply it
string | null
code#-
Provider code, not a full URL
The SDK never includes it in errors or diagnostics
string expiresoptional#At -
ISO 8601 expiry
Null means no expiry, omission means unavailable
string | null guildoptional#-
Present for community invites only
Not a full guild snapshot
id-
Decimal ID of the community this invitation leads to
string name-
Community name returned with this invitation
string
presenceoptional#Count -
Observed presence count, available for community invites
number temporary#-
Whether Fluxer treats membership gained through this invite as temporary
boolean type#-
Community invite or invitation to an existing group DM
"group" | "guild" url#-
Invite URL built from the selected instance's discovered invite base and an encoded code, ready to share with intended recipients
Does not check expiry or joinability. Not a credential-safe value for diagnostics or public logs
string
InviteCreate #
Set how long an invite lasts, how many times it can be used and whether Fluxer may reuse an existing code
Creating an invite does not join the recipient or create the destination. Omission requests a new code with unlimited uses that expires after one day. Fluxer enforces destination access, invite permissions and capacity
interface InviteCreateexport function inviteExample(client, channelId) {
return client.invites.create(channelId)
}
export function shareInviteExample(invite) {
return { content: invite.url }
}
import type { Client } from "@neontechspace/fluxerly"
export function inviteExample(client: Client, channelId: string) {
return client.invites.create(channelId)
}
export function shareInviteExample(invite: import("@neontechspace/fluxerly").Invite) {
return { content: invite.url }
}
maxoptional#Age Seconds -
Lifetime in seconds, integer 0–604800
Default 86400. Zero requests no expiry
number maxoptional#Uses -
Maximum uses, integer 0–100
Default zero means unlimited uses until expiry
number temporaryoptional#-
Default false
True requests temporary community membership, which Fluxer can remove after disconnect
boolean uniqueoptional#-
Default true requests a new code
False permits Fluxer to reuse a matching existing invite
boolean
InviteMetadata #
Invite details returned by creation and management lists, including creation time and use limits
Use these observations to inspect or reconcile created codes, not to predict whether a future join succeeds. The SDK does not cache invite codes or track later uses
interface InviteMetadata extends Inviteinterface InviteMetadata
extends Invitecreated#At -
ISO 8601 creation time
string maxoptional#Age Seconds -
Configured lifetime in seconds
Zero means no expiry. Fluxer omits this for group invites
number max#Uses -
Zero means unlimited uses until expiry
number uses#-
Observed uses, which may change immediately
number
Inherited from Invite: channel, code, expires, guild, inviter, member, presence, temporary, type, url
Invites#
Inspect, create, list and revoke invite codes with the bot's credentials
No gateway connection or invite cache is needed. Fluxer checks destination visibility, invite permissions and capacity. Shared guild request limits and deadlines apply. Eligible reads retry at most twice. Writes retry only confirmed HTTP 429 rejections
interface InvitesExpected failures return Guild or Client.
Abort returns Cancelled after cleanup.
Unexpected failures reject with Sdk.
A lost write response can leave the invite change applied.
Check remote state before retrying
create#
Create an invite for an accessible channel, including an existing group direct message
Defaults are a new code, 86,400 seconds, unlimited uses and non-temporary membership. The result is invite metadata. The SDK does not send the code, create a group or add members. Cancellation cannot revoke an invite that was already created. After an unknown outcome, list the destination's invites before deciding whether to create again
create(
channelId: string,
input?: InviteCreate,
options?: AuditedRequestOptions
): ResultAsync<
InviteMetadata,
ConfigurationError | GuildOperationFailure | CancelledError
>create(
channelId: string,
input?: InviteCreate,
options?: AuditedRequestOptions
): ResultAsync<
InviteMetadata,
| ConfigurationError
| GuildOperationFailure
| CancelledError
>Parameters
channelId -
string inputoptional-
InviteCreate optionsoptional-
AuditedRequestOptions
- Returns
ResultAsync< InviteMetadata, ConfigurationError | GuildOperationFailure | CancelledError >ResultAsync< InviteMetadata, | ConfigurationError | GuildOperationFailure | CancelledError >
delete#
Revoke an invite code, succeeding with no value after HTTP 204
Fluxer checks creator or management permissions. Existing members remain. A missing code is an error, not proof a previous delete succeeded
delete(code: string, options?: AuditedRequestOptions): ResultAsync<
void,
ConfigurationError | GuildOperationFailure | CancelledError
>delete(
code: string,
options?: AuditedRequestOptions
): ResultAsync<
void,
| ConfigurationError
| GuildOperationFailure
| CancelledError
>Parameters
code-
string optionsoptional-
AuditedRequestOptions
- Returns
ResultAsync< void, ConfigurationError | GuildOperationFailure | CancelledError >ResultAsync< void, | ConfigurationError | GuildOperationFailure | CancelledError >
fetch#
Look up an invite code without using it or joining its destination
Pass the code, not its full URL. Expired, revoked or inaccessible codes fail remotely. Fluxer may normalize the case of a vanity code
fetch(code: string, options?: RequestOptions): ResultAsync<
Invite,
ConfigurationError | GuildOperationFailure | CancelledError
>fetch(
code: string,
options?: RequestOptions
): ResultAsync<
Invite,
| ConfigurationError
| GuildOperationFailure
| CancelledError
>Parameters
code-
string optionsoptional-
RequestOptions
- Returns
ResultAsync< Invite, ConfigurationError | GuildOperationFailure | CancelledError >ResultAsync< Invite, | ConfigurationError | GuildOperationFailure | CancelledError >
fetchForChannel #
List a channel's management-visible invites in Fluxer's order
Channel permissions determine access. Concurrent changes can make the list stale, so it is not a stable snapshot
fetchForChannel(
channelId: string,
options?: RequestOptions
): ResultAsync<
readonly InviteMetadata[],
ConfigurationError | GuildOperationFailure | CancelledError
>fetchForChannel(
channelId: string,
options?: RequestOptions
): ResultAsync<
readonly InviteMetadata[],
| ConfigurationError
| GuildOperationFailure
| CancelledError
>Parameters
channelId -
string optionsoptional-
RequestOptions
- Returns
ResultAsync< readonly InviteMetadata[], ConfigurationError | GuildOperationFailure | CancelledError >ResultAsync< readonly InviteMetadata[], | ConfigurationError | GuildOperationFailure | CancelledError >
fetchForGuild #
List a community's management-visible invites with ManageGuild permission
The community's vanity invite is excluded
fetchForGuild(
guildId: string,
options?: RequestOptions
): ResultAsync<
readonly InviteMetadata[],
ConfigurationError | GuildOperationFailure | CancelledError
>fetchForGuild(
guildId: string,
options?: RequestOptions
): ResultAsync<
readonly InviteMetadata[],
| ConfigurationError
| GuildOperationFailure
| CancelledError
>Parameters
guildId -
string optionsoptional-
RequestOptions
- Returns
ResultAsync< readonly InviteMetadata[], ConfigurationError | GuildOperationFailure | CancelledError >ResultAsync< readonly InviteMetadata[], | ConfigurationError | GuildOperationFailure | CancelledError >
UnknownWebhook #
A webhook kind this SDK version does not know, selected by type === "unknown"
Its raw preserves Fluxer's number and any supplied source snapshots remain readable. No known Webhook constant matches this shape, and no token credentials are inferred
interface UnknownWebhook
extends WebhookBase, Omit<ChannelFollowerWebhook, "type">interface UnknownWebhook
extends WebhookBase, Omit<
ChannelFollowerWebhook,
"type"
>raw#Type -
Numeric webhook kind Fluxer sent, outside the known
WebhookconstantsType number type#-
Always "unknown"
"unknown"
Inherited from Webhook: avatar, channel, guild, id, name
Inherited from Channel: source, source
WebhookBase #
Identity, appearance and destination shared by every received webhook kind, without credentials
interface WebhookBaseavatar#-
Identifier for the webhook's avatar image, not a complete URL
Null means no custom avatar
string | null id#-
Webhook identifier, kept as a decimal string to avoid JavaScript number rounding
string type#-
A
Webhookconstant, or "unknown" for a kind this SDK version does not knowType Compare it to select the matching shape
"unknown" | 2 | 1
WebhookClient #
Send and manage messages with one incoming webhook's token, without a bot token or gateway
Follower webhooks have no exposed token and Fluxer rejects their token-authenticated operations with UNKNOWN_WEBHOOK. Create this with create and always await shutdown when finished
interface WebhookClient extends AsyncDisposableinterface WebhookClient
extends AsyncDisposableNo cache or persistent token store is created, and other clients' caches are not updated.
Calls start immediately and return ResultAsync for expected successes and failures.
The default 30,000 ms total deadline includes capacity, rate-limit, retry and HTTP waits.
Confirmed HTTP 429 responses use this client's shared rate-limit state as described on Client.
Abort cancels only the operation and waits for request and body cleanup, without reversing remote changes.
Errors include safe categories and status, not token-bearing paths or response bodies.
Successful JSON is capped at 16 MiB before parsing, not total memory.
A failed response after sending a write leaves an uncertain result and is not retried automatically.
Unexpected SDK or cleanup failures reject with Sdk.
Cleanup failure stops retries and keeps safe details of any accompanying operation failure or cancellation
[asyncDispose] #
Shut down this client and wait for cleanup, as await using does at the end of a block
Unexpected cleanup failures reject with Sdk, as shutdown does
[asyncDispose](): Promise<void>- Returns
Promise<void>
delete#
Delete this webhook remotely using its token, succeeding after HTTP 204
This does not close the client or release its local credential reference. Later requests normally fail with not because the token was revoked. Call shutdown separately to release the client's local resources
delete(options?: RequestOptions): ResultAsync<
void,
ConfigurationError | WebhookOperationFailure | CancelledError
>delete(
options?: RequestOptions
): ResultAsync<
void,
| ConfigurationError
| WebhookOperationFailure
| CancelledError
>Parameters
optionsoptional-
RequestOptions
- Returns
ResultAsync< void, ConfigurationError | WebhookOperationFailure | CancelledError >ResultAsync< void, | ConfigurationError | WebhookOperationFailure | CancelledError >
deleteMessage #
Delete this webhook's message, succeeding with no value after HTTP 204
For a message in a thread, including a forum post, set options to the thread's ID. Success does not prove the message previously existed. A failure with an unknown outcome can leave the message deleted
deleteMessage(
messageId: string,
options?: WebhookMessageOperationOptions
): ResultAsync<
void,
ConfigurationError | WebhookOperationFailure | CancelledError
>deleteMessage(
messageId: string,
options?:
WebhookMessageOperationOptions
): ResultAsync<
void,
| ConfigurationError
| WebhookOperationFailure
| CancelledError
>Parameters
messageId -
string optionsoptional-
WebhookMessageOperationOptions
- Returns
ResultAsync< void, ConfigurationError | WebhookOperationFailure | CancelledError >ResultAsync< void, | ConfigurationError | WebhookOperationFailure | CancelledError >
edit#
Change this webhook's name or avatar using its token and return metadata without credentials
To move it to another channel, use a bot client's webhooks. A failed or cancelled write can still have applied. This method does not close the client
edit(
input: WebhookTokenEdit,
options?: RequestOptions
): ResultAsync<
IncomingWebhook,
ConfigurationError | WebhookOperationFailure | CancelledError
>edit(
input: WebhookTokenEdit,
options?: RequestOptions
): ResultAsync<
IncomingWebhook,
| ConfigurationError
| WebhookOperationFailure
| CancelledError
>Parameters
input-
WebhookTokenEdit optionsoptional-
RequestOptions
- Returns
ResultAsync< IncomingWebhook, ConfigurationError | WebhookOperationFailure | CancelledError >ResultAsync< IncomingWebhook, | ConfigurationError | WebhookOperationFailure | CancelledError >
editMessage #
Change this webhook's message and return its updated snapshot
A plain string replaces only the text, as shorthand for { content }. Omitted fields stay unchanged. Mentions default off and attachments cannot be replaced. A flags-only edit replaces only Message and Message, and 0 clears them. Crossposted, IsCrosspost and SourceMessageDeleted are server-managed. Those bits and VoiceMessage fail locally before dispatch. Embed input cannot resolve existing file references. For a message in a thread, including a forum post, set options to the thread's ID
editMessage(
messageId: string,
input: string | WebhookMessageEdit,
options?: WebhookMessageOperationOptions
): ResultAsync<
Message,
ConfigurationError | WebhookOperationFailure | CancelledError
>editMessage(
messageId: string,
input:
| string | WebhookMessageEdit,
options?:
WebhookMessageOperationOptions
): ResultAsync<
Message,
| ConfigurationError
| WebhookOperationFailure
| CancelledError
>Parameters
messageId -
string input-
string | WebhookMessageEdit optionsoptional-
WebhookMessageOperationOptions
- Returns
ResultAsync< Message, ConfigurationError | WebhookOperationFailure | CancelledError >ResultAsync< Message, | ConfigurationError | WebhookOperationFailure | CancelledError >
fetch#
Fetch this incoming webhook's current metadata using its token, not bot authentication
Creator and private fields are not retained
fetch(options?: RequestOptions): ResultAsync<
IncomingWebhook,
ConfigurationError | WebhookOperationFailure | CancelledError
>fetch(
options?: RequestOptions
): ResultAsync<
IncomingWebhook,
| ConfigurationError
| WebhookOperationFailure
| CancelledError
>Parameters
optionsoptional-
RequestOptions
- Returns
ResultAsync< IncomingWebhook, ConfigurationError | WebhookOperationFailure | CancelledError >ResultAsync< IncomingWebhook, | ConfigurationError | WebhookOperationFailure | CancelledError >
fetchMessage #
Fetch a message authored by this webhook in its current channel, using a decimal message ID
For a message in a thread, including a forum post, set options to the thread's ID. Eligible transient read failures have bounded retries
fetchMessage(
messageId: string,
options?: WebhookMessageOperationOptions
): ResultAsync<
Message,
ConfigurationError | WebhookOperationFailure | CancelledError
>fetchMessage(
messageId: string,
options?:
WebhookMessageOperationOptions
): ResultAsync<
Message,
| ConfigurationError
| WebhookOperationFailure
| CancelledError
>Parameters
messageId -
string optionsoptional-
WebhookMessageOperationOptions
- Returns
ResultAsync< Message, ConfigurationError | WebhookOperationFailure | CancelledError >ResultAsync< Message, | ConfigurationError | WebhookOperationFailure | CancelledError >
send#
Send a webhook message and return the created message after Fluxer's HTTP response
A plain string sends only that text, as shorthand for { content }. The SDK uses wait=true, and mentions are disabled by default. A supplied nonce requests best-effort duplicate suppression for five minutes, not exactly-once delivery. Without a nonce, none is sent unless a forward source supplies one, and a nonce on both the message and its forward source fails before dispatch. Reply references can include files. Forward references preserve only the source snapshot and reject new content or uploads
send(
input: string | WebhookMessageInput,
options?: RequestOptions
): ResultAsync<
Message,
ConfigurationError | WebhookOperationFailure | CancelledError
>send(
input:
| string | WebhookMessageInput,
options?: RequestOptions
): ResultAsync<
Message,
| ConfigurationError
| WebhookOperationFailure
| CancelledError
>Set thread to post into an existing thread. In a forum or media channel, set thread, with optional
applied, to start a new post instead. The result is then the post's first message, whose channel is the
new post's ID. See Webhook for the rules that the SDK checks before dispatch
Each attachment supplies data bytes, a sized Blob or File source, or a finite stream with its exact size.
Metadata and data bytes are copied when execution starts, before waiting.
File and stream sources are read when the multipart upload begins, without copying or spooling.
Keep file data stable, and supply a fresh stream for each operation because a stream is consumed at most once and must deliver exactly its declared size.
Cleanup cancels unfinished readers and awaits lock release, without closing caller paths or FileHandles.
Multipart file uploads are streamed with a maximum of 50 MiB per file and share the configured upload-byte budget.
An attachment:// image or thumbnail URL must match one new upload whose filename maps to an image or video MIME type.
The flags input accepts only Message and Message.
Crossposted, IsCrosspost and SourceMessageDeleted are server-managed.
Those bits and VoiceMessage fail locally before dispatch
A failure with an unknown outcome can leave the message posted and is never replayed automatically.
A confirmed inline HTTP 429 can replay copied data bytes, but file and stream inputs fail with rate without being reopened or reread
Parameters
input-
string | WebhookMessageInput optionsoptional-
RequestOptions
- Returns
ResultAsync< Message, ConfigurationError | WebhookOperationFailure | CancelledError >ResultAsync< Message, | ConfigurationError | WebhookOperationFailure | CancelledError >
shutdown#
Permanently stop this local client, reject new work, cancel active work and await transport cleanup
The client's token reference is released, but the remote webhook and caller-held credentials remain. Concurrent calls wait for the same pending cleanup. No expected failure is returned
shutdown(): ResultAsync<void, never>- Returns
ResultAsync<void, never>
Unexpected cleanup failures reject with Sdk
WebhookCreate #
Settings for a webhook that will post messages to the channel selected in the create call
Fields are sampled once when create starts, then validated and encoded from that snapshot
interface WebhookCreateWebhookCredentials #
The secret returned when an incoming webhook is created, kept separate from its public details
Pass this object to create, or call reveal to save the secret in the application's own secure storage. The SDK does not save the token to disk. Anyone with the ID and token can use this webhook's token-authenticated operations
interface WebhookCredentialsrevealToken #
Return the token as plain text for secure storage or transfer
Never log the returned string
revealToken(): string- Returns
string
WebhookEdit #
Changes to an existing webhook made through a bot client's webhooks operation
Supply at least one setting. Omitted settings stay unchanged. Moving the destination channel requires bot authentication and cannot be done by a token-only webhook client. Follower webhooks can be renamed or moved, but Fluxer rejects an avatar change with field avatar and code INVALID_FORMAT. A move emits Webhooks Update for the old and new channel. The SDK does not synthesize those events. Fields are sampled once when edit starts, then validated and encoded from that snapshot
interface WebhookEditavataroptional#-
Base64 image data URI, or null to remove the avatar
Follower webhooks reject any supplied avatar change
string | null channeloptional#Id -
Move future messages within the same community, subject to Fluxer's permissions
Followers require a text channel, while incoming webhooks allow text, voice or announcement channels
string nameoptional#-
New default sender name, 1–80 UTF-16 code units after U+000C and U+202E removal and surrounding-whitespace trimming
The original string is sent unchanged
string
WebhookForumPostOptions #
Settings for starting a new post in a forum or media channel through a webhook
The webhook must belong to that forum or media channel, and Fluxer rejects thread for any other channel. Set them only on a new message, not on a reply or forward
interface WebhookForumPostOptionsappliedoptional#Tag Ids -
IDs of the tags to apply to the new post, at most 5
This needs
thread. Fluxer rejects an ID that the channel does not have, a moderated tag because a webhook cannot manage threads, and a post with no tag when the channel hasName ChannelFlags .Require Tag readonly string[] threadoptional#Name -
Name of the new post, 1–100 UTF-16 code units after U+000C and U+202E removal and surrounding-whitespace trimming
The original string is sent unchanged. The message becomes the first message of the new post, and the result is that message, whose
channelis the new post's ID. Fluxer needs this orId threadto place a message in a forum or media channel, and it cannot be combined withId threadId string
WebhookForwardReference #
interface WebhookForwardReferencesource#-
Source message and optional attachment/embed selections
Fluxer copies the message without a separate SDK fetch. A source nonce is used only when the message has no top-level nonce. Supplying both fails locally, even if equal
ForwardMessageInput type#-
Select forwarding rather than a reply with newly written content
"forward"
WebhookMessageEdit #
Changes to a message previously sent by this webhook
Supply content, embeds or flags. Omitted values stay unchanged, while empty text or an empty embed array clears that part. This operation cannot upload or replace attachments
interface WebhookMessageEditallowedoptional#Mentions -
Which mentions in the edited message may notify people
Notifications are disabled by default for this edit
AllowedMentions contentoptional#-
New message text, or an empty string to remove the existing text
string embedsoptional#-
New rich-message cards as plain objects or
Embedinstances, or an empty array to remove the existing embedsBuilder readonly (EmbedInput | EmbedBuilder)[] flagsoptional#-
Replace only
MessageandFlags .Suppress Embeds MessageFlags .Suppress Notifications Omit to preserve them, or use zero to clear both. Crossposted, IsCrosspost and SourceMessageDeleted are server-managed. Those bits and VoiceMessage fail locally before dispatch
number
WebhookReplyReference #
interface WebhookReplyReferenceWebhookSourceChannel #
A frozen snapshot of a followed announcement channel
Fluxer supplies it only while the source exists and the webhook's original creator can view it. Missing source metadata does not prove the source was deleted
interface WebhookSourceChannelWebhookSourceGuild #
A frozen snapshot of the community that owns a followed announcement channel
Fluxer supplies it only while the source exists and the webhook's original creator can view it. Missing source metadata does not prove the source was deleted
interface WebhookSourceGuildWebhookTokenEdit #
Change an incoming webhook's default name or avatar through its token-only client
Supply at least one setting. Omitted settings stay unchanged, and moving channels requires a bot client instead. Fields are sampled once when edit starts, then validated and encoded from that snapshot
interface WebhookTokenEditWebhooks#
Manage webhooks with this bot's credentials, without connecting the gateway
Use create for a separate client that sends using a webhook's own token. Metadata excludes tokens. There is no webhook cache or hidden credential storage. The default total deadline, rest (30,000 ms unless configured), includes capacity, rate-limit and retry waits. Eligible reads have bounded retries. Writes retry only confirmed rate-limit rejection. Success JSON is limited to 16 MiB before parsing, not total memory. Malformed or larger successes return reason response. After dispatch, a failed response can leave the write applied and is not retried automatically. Abort returns Cancelled after cleanup. Unexpected failures reject with Sdk. Client shutdown rejects new work and waits for active request cleanup. Separate clients do not coordinate rate limits
interface Webhookscreate#
Create an incoming webhook in a text, voice or announcement channel using the bot's permissions
The result separates metadata from redacted credentials, which expose the token only through reveal. Credentials passed to create must remain private. An unknown outcome may have left the webhook created
create(
channelId: string,
input: WebhookCreate,
options?: AuditedRequestOptions
): ResultAsync<
CreatedWebhook,
ConfigurationError | WebhookOperationFailure | CancelledError
>create(
channelId: string,
input: WebhookCreate,
options?: AuditedRequestOptions
): ResultAsync<
CreatedWebhook,
| ConfigurationError
| WebhookOperationFailure
| CancelledError
>Parameters
channelId -
string input-
WebhookCreate optionsoptional-
AuditedRequestOptions
- Returns
ResultAsync< CreatedWebhook, ConfigurationError | WebhookOperationFailure | CancelledError >ResultAsync< CreatedWebhook, | ConfigurationError | WebhookOperationFailure | CancelledError >
delete#
Delete an incoming webhook and revoke its credential, or delete a follower webhook to unfollow its source
Existing webhook messages remain. Fluxer emits Webhooks Update for the destination channel. The SDK does not synthesize that event. A failure does not restore a deleted follow or revoked credential
delete(id: string, options?: AuditedRequestOptions): ResultAsync<
void,
ConfigurationError | WebhookOperationFailure | CancelledError
>delete(
id: string,
options?: AuditedRequestOptions
): ResultAsync<
void,
| ConfigurationError
| WebhookOperationFailure
| CancelledError
>Parameters
id-
string optionsoptional-
AuditedRequestOptions
- Returns
ResultAsync< void, ConfigurationError | WebhookOperationFailure | CancelledError >ResultAsync< void, | ConfigurationError | WebhookOperationFailure | CancelledError >
edit#
Change the supplied incoming or follower webhook settings, including its destination channel
Followers can be renamed or moved to a text channel in the same community, but an avatar change fails with field avatar and Fluxer code INVALID_FORMAT. Incoming webhooks allow text, voice or announcement destinations. Moving emits Webhooks Update for the old and new channel. The SDK does not synthesize those events. Returned metadata excludes credentials. A failed response does not guarantee the changes were rolled back
edit(
id: string,
input: WebhookEdit,
options?: AuditedRequestOptions
): ResultAsync<
Webhook,
ConfigurationError | WebhookOperationFailure | CancelledError
>edit(
id: string,
input: WebhookEdit,
options?: AuditedRequestOptions
): ResultAsync<
Webhook,
| ConfigurationError
| WebhookOperationFailure
| CancelledError
>Parameters
id-
string input-
WebhookEdit optionsoptional-
AuditedRequestOptions
- Returns
ResultAsync< Webhook, ConfigurationError | WebhookOperationFailure | CancelledError >ResultAsync< Webhook, | ConfigurationError | WebhookOperationFailure | CancelledError >
fetch#
Fetch incoming, follower or unknown-kind metadata by decimal ID, discarding any returned token
Follower sources are present only while they exist and the original creator can view them. Missing source metadata does not prove deletion. A missing webhook fails with reason not
fetch(id: string, options?: AuditedRequestOptions): ResultAsync<
Webhook,
ConfigurationError | WebhookOperationFailure | CancelledError
>fetch(
id: string,
options?: AuditedRequestOptions
): ResultAsync<
Webhook,
| ConfigurationError
| WebhookOperationFailure
| CancelledError
>Parameters
id-
string optionsoptional-
AuditedRequestOptions
- Returns
ResultAsync< Webhook, ConfigurationError | WebhookOperationFailure | CancelledError >ResultAsync< Webhook, | ConfigurationError | WebhookOperationFailure | CancelledError >
fetchForChannel #
List the channel's accessible incoming, follower and unknown-kind webhook metadata without pagination
fetchForChannel(
channelId: string,
options?: AuditedRequestOptions
): ResultAsync<
readonly Webhook[],
ConfigurationError | WebhookOperationFailure | CancelledError
>fetchForChannel(
channelId: string,
options?: AuditedRequestOptions
): ResultAsync<
readonly Webhook[],
| ConfigurationError
| WebhookOperationFailure
| CancelledError
>Parameters
channelId -
string optionsoptional-
AuditedRequestOptions
- Returns
ResultAsync< readonly Webhook[], ConfigurationError | WebhookOperationFailure | CancelledError >ResultAsync< readonly Webhook[], | ConfigurationError | WebhookOperationFailure | CancelledError >
fetchForGuild #
List the community's accessible incoming, follower and unknown-kind webhook metadata
Fluxer permissions determine visibility. Concurrent changes mean this is not a stable snapshot
fetchForGuild(
guildId: string,
options?: AuditedRequestOptions
): ResultAsync<
readonly Webhook[],
ConfigurationError | WebhookOperationFailure | CancelledError
>fetchForGuild(
guildId: string,
options?: AuditedRequestOptions
): ResultAsync<
readonly Webhook[],
| ConfigurationError
| WebhookOperationFailure
| CancelledError
>Parameters
guildId -
string optionsoptional-
AuditedRequestOptions
- Returns
ResultAsync< readonly Webhook[], ConfigurationError | WebhookOperationFailure | CancelledError >ResultAsync< readonly Webhook[], | ConfigurationError | WebhookOperationFailure | CancelledError >
Type Aliases#
Webhook#
A frozen snapshot of a webhook's kind, appearance and destination when Fluxer last returned it
Compare type with Webhook to select the incoming or channel follower shape, and handle "unknown" for future kinds. Metadata contains no token and does not update after remote changes
type Webhook =
IncomingWebhook | ChannelFollowerWebhook | UnknownWebhooktype Webhook =
| IncomingWebhook
| ChannelFollowerWebhook
| UnknownWebhookWebhookClientOptions #
Credentials and limits for create
Supply an incoming webhook's ID/token pair from secure storage or the credentials object returned by webhook creation. Follower webhooks expose no token and cannot be executed by a webhook client. Creating the client validates and copies these values locally. It does not send a request or prove the credentials work
type WebhookClientOptions =
& (
| { readonly id: string; readonly token: string }
| WebhookCredentials)
& {
readonly instance?: InstanceOptions
readonly logging?: LoggingOptions
readonly uploadMaxBytes?: number
}type WebhookClientOptions =
& (
| {
readonly id: string
readonly token: string
}
| WebhookCredentials)
& {
readonly instance?:
InstanceOptions
readonly logging?:
LoggingOptions
readonly uploadMaxBytes?:
number
}WebhookMessageInput #
A message to send through a webhook client, using the webhook's token rather than a bot token
For a new message, supply text, embeds, uploads or stickers and omit message. For a reply, add a reply reference and write the content or attachments normally. For a forward, supply only a forward reference and optional nonce, sender, flags or mention overrides. Forwards cannot also contain new text, embeds, stickers or uploads. Fluxer rejects missing or cross-channel reply/forward targets. New messages do not require the destination channel ID. Fluxer never sends a webhook message as text-to-speech, so a tts property fails with reason input before dispatch, like any other unknown property
type WebhookMessageInput =
| MessageBody
& WebhookMessageOptions
& WebhookForumPostOptions
& { readonly messageReference?: WebhookReplyReference }
| WebhookMessageOptions
& { readonly messageReference: WebhookForwardReference }type WebhookMessageInput =
| MessageBody
& WebhookMessageOptions
& WebhookForumPostOptions
& {
readonly messageReference?:
WebhookReplyReference
}
| WebhookMessageOptions
& {
readonly messageReference:
WebhookForwardReference
}To post into a thread, set thread. To start a new post in a forum or media channel, set thread and optionally
applied on a new message. A webhook in a forum or media channel needs one of thread and thread, and the
SDK rejects a message that sets both. A reply or forward cannot start a post, because the new post holds no message
to refer to, so thread with a message fails before dispatch
WebhookMessageOptions #
Delivery settings shared by new, reply and forward webhook messages
type WebhookMessageOptions = { … }allowedoptional#Mentions -
Which mentions may notify people
By default, mention text does not enable notifications
AllowedMentions avataroptional#Url -
Override the avatar for this message only
Use an HTTP(S) URL without credentials, at most 8,192 characters, fetched by Fluxer
string flagsoptional#-
Message behavior flags from
MessageFlags Only SuppressEmbeds and SuppressNotifications are writable, and omission uses Fluxer's default. Crossposted, IsCrosspost and SourceMessageDeleted are server-managed. Those bits and VoiceMessage fail locally before dispatch
number nonceoptional#-
Application-chosen correlation nonce, a string of 1–32 UTF-16 code units or a nonnegative safe integer encoded as a decimal string
Omission sends no nonce, unless the forward source supplies one. Supplying both locations fails locally. For five minutes after saving a message, Fluxer tries to suppress another send through this webhook with the same nonce. This does not guarantee exactly-once delivery
MessageNonce threadoptional#Id -
Decimal ID of a thread in the webhook's channel, sent as the thread_id query parameter so the message goes to that thread instead of the channel
Fluxer rejects a thread that belongs to another channel, and a forum or media channel needs either this or
thread. It cannot be combined withName threadName string usernameoptional#-
Override the sender name for this message only, using 1–80 UTF-16 code units after U+000C and U+202E removal and surrounding-whitespace trimming
The original string is sent unchanged
string
WebhookMessageReference #
Choose a reply with new content or a forward copied from an existing message when calling webhook
type WebhookMessageReference =
WebhookReplyReference | WebhookForwardReferencetype WebhookMessageReference =
| WebhookReplyReference
| WebhookForwardReference