65 symbols from @neontechspace/fluxerly/effect
Interfaces#
Channels#
Read or change community channels and permission overrides, or request gateway member counts
HTTP methods return Effects and do not connect the gateway. The REST rules below exclude fetch, which requires gateway readiness and has its own documented contract
interface ChannelsDM operations are outside this API contract. Supply decimal community-channel IDs. ID-targeted writes do not prefetch or verify their community-channel type
Requests share the client's REST or upload slots across all assigned shards, four per local shard by default, up to 64 (rest).
Attachment-download slots are separate, four by default (rest).
Both pools together allow 256 waiting requests or 4 MiB of queued JSON by default (rest and rest)
Total deadline defaults to the client's rest, 30,000 ms unless configured, including queue waits, retries and rate-limit waits. Reads retry transport failures and HTTP 500/502/503/504 at most twice.
Writes retry only confirmed 429 responses. Permission, input, 404 and malformed-response failures do not retry
Sending a channel write removes the written channel from the enabled channel cache, with its threads when the write deletes the channel or converts its type,
and with the forum posts that apply a tag it removes, as delete and an edit with available can, because Fluxer drops removed tags from posts without a thread update.
A write to a category, or one that names a community, such as create or reorder, removes that community's cached channels. A write to a channel the cache does not hold removes every cached channel, because its community is unknown.
Input failures before dispatch leave the cache unchanged, and a write rejected after dispatch removes the same entries. The SDK does not fetch channels automatically after a write.
The follow, create, edit, delete, reorder, permission-overwrite and forum-tag mutations accept Audited. Read operations reject audit
Operation inputs are copied when the Effect executes and later caller mutations are not observed. Permission bits are bigint values encoded as decimal JSON strings. Fluxer enforces channel permissions and grant restrictions. Targeted overwrite operations require ManageRoles for role and member targets
Expected failures use Channel or Client. Interruption and defects retain Cause after owned cleanup
create#
Create a supported community channel and return its frozen server snapshot
Fluxer chooses the initial position. Omitting permission inherits the selected parent category's overwrites. An empty [] creates no explicit overwrites, which does not make a channel private. Explicit overwrites use Fluxer's required feature opt-in for ViewChannelMembers. Unless the bot has Administrator, each overwrite can allow only permissions the bot has in the parent category, or in the community when there is no parent, and Fluxer answers missing otherwise. Denies are not checked. Use permission to see beforehand which bits Fluxer would refuse. Each allow and deny mask must be from 0n through 9_223_372_036_854_775_807n, and invalid masks fail before dispatch. The example denies ViewChannel to everyone and grants access to the named bot. The application manages the created channel afterward. After an unknown outcome, use fetch before deciding whether to create again. The result does not confirm gateway delivery
create(
guildId: string,
input: ChannelCreate,
options?: AuditedRequestOptions
): Effect<GuildChannel, ChannelOperationFailure>create(
guildId: string,
input: ChannelCreate,
options?: AuditedRequestOptions
): Effect<
GuildChannel,
ChannelOperationFailure
>Channel and Channel create a channel that holds posts instead of messages. Besides the shared
settings, they accept available, default, default, default, flags and the two
thread defaults, and a forum channel also accepts default. Text and announcement channels accept only
the thread defaults default and default. A setting that the channel type
does not accept fails locally.
Fluxer rejects forum and media channels in a community where threads are not active, and ignores the two thread
defaults on text and announcement channels there. The result of a forum or media creation lists the stored tags,
whose IDs Fluxer assigns
Parameters
guildId -
string input-
ChannelCreate optionsoptional-
AuditedRequestOptions
- Fails with
import { ChannelType, Permissions, type Client } from "@neontechspace/fluxerly/effect"
export const channelExample = (client: Client, guildId: string, botId: string) =>
client.channels.create(guildId, {
type: ChannelType.Text,
name: "private-support",
permissionOverwrites: [
{ id: guildId, type: "role", allow: 0n, deny: Permissions.ViewChannel },
{ id: botId, type: "member", allow: Permissions.ViewChannel | Permissions.SendMessages, deny: 0n },
],
})
createForumTag #
Add one tag to a forum or media channel and return the frozen updated channel
Fluxer requires ManageChannels, assigns the tag's ID, and rejects a tag whose name another tag of the channel already uses, a custom emoji that the community does not have, and a channel that already has 20 tags. Find the new tag by name in the result's available. Fluxer applies the tag like a channel edit, so it emits a Channel Update and an audit-log entry. The SDK reads nothing first, so a channel that is not a forum or media channel fails with Fluxer's rejection. After an unknown outcome, fetch the channel before adding the tag again, because the name is already taken when the first attempt applied
createForumTag(
channelId: string,
input: ForumTagInput,
options?: AuditedRequestOptions
): Effect<
GuildForumChannel | GuildMediaChannel,
ChannelOperationFailure
>createForumTag(
channelId: string,
input: ForumTagInput,
options?: AuditedRequestOptions
): Effect<
| GuildForumChannel
| GuildMediaChannel,
ChannelOperationFailure
>Parameters
channelId -
string input-
ForumTagInput optionsoptional-
AuditedRequestOptions
delete#
Delete a community channel, succeeding with no value after HTTP 204
No gateway event is awaited and no prior channel existence is proven. The SDK does not fetch the ID first. Fluxer deletes the channel's invites, webhooks, attachments and messages, and detaches a category's children, before it deletes the channel itself. A channel that still exists after a failure may already have lost any of these. A lost response or timeout after dispatch can leave it deleted
delete(
channelId: string,
options?: AuditedRequestOptions
): Effect<void, ChannelOperationFailure>delete(
channelId: string,
options?: AuditedRequestOptions
): Effect<
void,
ChannelOperationFailure
>Parameters
channelId -
string optionsoptional-
AuditedRequestOptions
- Returns
Effect<void, ChannelOperationFailure>- Fails with
deleteForumTag #
Delete one tag from a forum or media channel and return the frozen updated channel
Posts that carried the tag stop showing it. Fluxer requires ManageChannels and rejects a tag ID that the channel does not have, which includes a tag that an earlier call already deleted, and the deletion of the last tag that is not moderated while the channel has Channel. The call is otherwise an available edit, as create describes
deleteForumTag(
channelId: string,
tagId: string,
options?: AuditedRequestOptions
): Effect<
GuildForumChannel | GuildMediaChannel,
ChannelOperationFailure
>deleteForumTag(
channelId: string,
tagId: string,
options?: AuditedRequestOptions
): Effect<
| GuildForumChannel
| GuildMediaChannel,
ChannelOperationFailure
>Parameters
channelId -
string tagId -
string optionsoptional-
AuditedRequestOptions
edit#
Change only the supplied channel settings and return the frozen server snapshot
An empty input or unknown field fails locally. Use reorder to change a parent or position. Supply type to convert between Text and Announcement, alone or with other settings. Fluxer requires ManageChannels and rejects converting a text channel that receives follows with CHANNEL_HAS_FOLLOWED_CHANNELS. Converting Announcement to Text queues asynchronous follower removal. Fluxer emits a complete Channel Update with the new type, which replaces the cached observation before handlers run. This call does not await gateway delivery or follower removal. Omitted permission keeps the old list, and [] clears it. Each replacement allow and deny mask must be from 0n through 9_223_372_036_854_775_807n. Explicit replacement handles setting and clearing ViewChannelMembers through Fluxer's required feature opt-in. Unless the bot has Administrator, each changed overwrite can allow, or stop denying, only permissions the bot has in this channel, and Fluxer answers missing otherwise. Use permission to see beforehand which bits Fluxer would refuse. On a category, a permission change also writes each child whose overwrites matched the category's old ones, in separate writes. Fluxer offers no way to leave a child out, and permission shows which children match. A failure can leave some children with the old overwrites. A retry may skip them, because Fluxer selects children by comparing with the category's overwrites at the time of that call, so fetch the children again to check. The thread defaults and the forum settings apply to the channel types named on each field. The SDK cannot see the channel's type, so Fluxer ignores a setting that does not belong to it. The available list replaces every tag of a forum or media channel, so channels, edit and delete are the safer way to change one tag. Pass a received channel's available back to keep all its tags
edit(
channelId: string,
input: ChannelEdit,
options?: AuditedRequestOptions
): Effect<GuildChannel, ChannelOperationFailure>edit(
channelId: string,
input: ChannelEdit,
options?: AuditedRequestOptions
): Effect<
GuildChannel,
ChannelOperationFailure
>Parameters
channelId -
string input-
ChannelEdit optionsoptional-
AuditedRequestOptions
- Fails with
editForumTag #
Replace one tag of a forum or media channel and return the frozen updated channel
This is a full replacement: A moderated value or emoji that the input leaves out becomes false or none instead of keeping its old value, so read the tag first to change only one of its settings. The tag keeps its ID and the posts that carry it. Fluxer requires ManageChannels and rejects a tag ID that the channel does not have, a name that another tag already uses, and a change that would leave a channel with Channel without a tag that is not moderated. The call is otherwise an available edit, as create describes
editForumTag(
channelId: string,
tagId: string,
input: ForumTagInput,
options?: AuditedRequestOptions
): Effect<
GuildForumChannel | GuildMediaChannel,
ChannelOperationFailure
>editForumTag(
channelId: string,
tagId: string,
input: ForumTagInput,
options?: AuditedRequestOptions
): Effect<
| GuildForumChannel
| GuildMediaChannel,
ChannelOperationFailure
>Parameters
channelId -
string tagId -
string input-
ForumTagInput optionsoptional-
AuditedRequestOptions
fetch#
Fetch a community channel by decimal ID and return a frozen snapshot
The ID can name a thread or a forum post, which returns a thread shape, so compare type or use is before reading fields that only some shapes have. A thread has no permission overwrites of its own. A private-channel response fails with a typed response error. Permission overwrites describe explicit settings, not inherited or effective permissions. This neither connects the gateway nor populates a complete community-channel list
fetch(
channelId: string,
options?: RequestOptions
): Effect<GuildChannel, ChannelOperationFailure>fetch(
channelId: string,
options?: RequestOptions
): Effect<
GuildChannel,
ChannelOperationFailure
>Parameters
channelId -
string optionsoptional-
RequestOptions
- Fails with
fetchAll #
Fetch the community channels currently visible to the bot, without pagination
The returned list is a point-in-time snapshot, not a subscription or completeness guarantee. It never includes threads, which Fluxer lists separately: Use threads for the active ones. No members, roles, private channels or missing overwrite targets are fetched
fetchAll(
guildId: string,
options?: RequestOptions
): Effect<readonly GuildChannel[], ChannelOperationFailure>fetchAll(
guildId: string,
options?: RequestOptions
): Effect<
readonly GuildChannel[],
ChannelOperationFailure
>Parameters
guildId -
string optionsoptional-
RequestOptions
- Returns
Effect<readonly GuildChannel[], ChannelOperationFailure>Effect< readonly GuildChannel[], ChannelOperationFailure >- Fails with
fetchFollowerStats #
Fetch frozen channel and distinct community follower counts for a viewable announcement channel
Fluxer can cache these counts for up to 60 seconds, so they need not include the latest follow changes. This does not populate channel caches or subscribe to changes. The audit option is not supported
fetchFollowerStats(
channelId: string,
options?: RequestOptions
): Effect<ChannelFollowerStats, ChannelOperationFailure>fetchFollowerStats(
channelId: string,
options?: RequestOptions
): Effect<
ChannelFollowerStats,
ChannelOperationFailure
>Parameters
channelId -
string optionsoptional-
RequestOptions
fetchMemberCounts #
Request fresh member counts for 1–25 channels in one community over the connected gateway
Use distinct positive decimal channel IDs without leading zeros, no greater than "9223372036854775807". The community ID must satisfy the same bound. The IDs are copied when execution starts
fetchMemberCounts(
guildId: string,
channelIds: readonly string[],
options?: RequestOptions
): Effect<ChannelMemberCountsResult, CountOperationFailure>fetchMemberCounts(
guildId: string,
channelIds: readonly string[],
options?: RequestOptions
): Effect<
ChannelMemberCountsResult,
CountOperationFailure
>The community must have a ready shard assigned to this client, or the call fails with not instead of listing omitted channels.
Fluxer requires ViewChannel and ViewChannelMembers.
The result has frozen counts and omitted in requested order.
Omission means unavailable, not zero, and does not explain access or other causes
The guilds method's four shared gateway slots, default 30,000 ms deadline and failure rules apply.
There is no waiting queue for request slots, implicit connection, REST fallback, cache write or retry.
Commands may wait for gateway pacing, and a full internal command queue fails with busy.
Only a gap on this community's shard fails the request.
Counts are separate visibility-filtered observations, not a subscription or a cross-channel snapshot.
Cancellation or deadline expiry withdraws an unsent command and releases local request capacity.
Work already sent to Fluxer cannot be withdrawn
Parameters
guildId -
string channelIds -
readonly string[] optionsoptional-
RequestOptions
follow#
Follow an announcement channel into the supplied community text channel and return frozen source and webhook IDs
The source must be viewable, have type Announcement and belong to a community with announcements enabled. The target must have type Text, with ViewChannel and ManageWebhooks on that channel plus community-level ManageWebhooks. Fluxer enforces webhook capacity and rejects duplicate source-to-target follows
follow(
channelId: string,
input: ChannelFollowInput,
options?: AuditedRequestOptions
): Effect<FollowedChannel, ChannelOperationFailure>follow(
channelId: string,
input: ChannelFollowInput,
options?: AuditedRequestOptions
): Effect<
FollowedChannel,
ChannelOperationFailure
>An adult source requires an adult target. A content-warning source requires an adult or content-warning target.
These settings include inherited category and community restrictions, checked by Fluxer without an SDK prefetch.
Success creates a channel-follower webhook and emits Webhooks Update for the target.
Fluxer also attempts a ChannelFollowAdd notice in the target, but a notice failure does not fail the follow.
Neither gateway delivery nor notice creation is confirmed by this result.
Use client with the returned webhook to stop following
The audit option is consumed by the created webhook's audit entry.
A lost or malformed response can leave the follow created and is never resent automatically.
Inspect the target's webhooks before retrying an unknown outcome
Parameters
channelId -
string input-
ChannelFollowInput optionsoptional-
AuditedRequestOptions
get#
Look up a community channel in the enabled cache, without an HTTP request or a connection
The result is undefined when caching is disabled or the entry is absent, expired or evicted. The result can be a thread, forum channel or media channel, so compare type or use is before reading fields that only some shapes have. A hit may be stale and becomes more recently used without extending expiry. Use fetch for a remote read. An invalid ID is misuse: The default API throws Channel with reason input and the native API dies with it. A closing or closed client has no cache, so the result is undefined
get(channelId: string): Effect<GuildChannel | undefined>get(
channelId: string
): Effect<GuildChannel | undefined>Parameters
channelId -
string
- Returns
Effect<GuildChannel | undefined>
removePermissionOverwrite #
Remove one explicit permission overwrite by decimal role or member target ID
Other overwrites remain unchanged. HTTP 204 succeeds with no value. Fluxer requires ManageRoles. Unless the bot has Administrator, it can remove an overwrite only when it has every permission that the overwrite denies in this channel, and Fluxer answers missing otherwise. To check beforehand, call permission with the overwrite as current and undefined as next. On a category, Fluxer writes the category first and then each child whose overwrites matched the category's old ones, in separate writes. Fluxer offers no way to leave a child out, and permission shows which children match. A failure can leave some children with the old overwrites. A retry may skip them, because Fluxer selects children by comparing with the category's overwrites at the time of that call, so fetch the children again to check. An unknown outcome needs an explicit follow-up read
removePermissionOverwrite(
channelId: string,
targetId: string,
options?: AuditedRequestOptions
): Effect<void, ChannelOperationFailure>removePermissionOverwrite(
channelId: string,
targetId: string,
options?: AuditedRequestOptions
): Effect<
void,
ChannelOperationFailure
>Parameters
channelId -
string targetId -
string optionsoptional-
AuditedRequestOptions
- Returns
Effect<void, ChannelOperationFailure>- Fails with
reorder#
Submit community-channel moves, succeeding with no value after HTTP 204
Fluxer applies moves sequentially and may normalize positions. The sync option copies the destination category's overwrites, and applies only to a move into another category. Fluxer copies them after each move, so a failed copy leaves that channel moved without them. Unless the bot has Administrator, the copied overwrites can allow, or stop denying, only permissions the bot has in the moved channel, and the copy fails with missing otherwise. Use permission to see beforehand which bits Fluxer would refuse. A bulk channel event can arrive before that copy finishes. Failures can leave partial movement because this is not a transaction, and the error does not list the moves that finished. Use fetch afterward when final order matters, and after a failure to read the actual order and parents before sending moves again. The Communities & permissions guide shows how to keep the failure while reading them. Fluxer currently accepts audit on this route without retaining it in an audit entry. No reordered list is invented locally
reorder(
guildId: string,
positions: readonly ChannelPosition[],
options?: AuditedRequestOptions
): Effect<void, ChannelOperationFailure>reorder(
guildId: string,
positions:
readonly ChannelPosition[],
options?: AuditedRequestOptions
): Effect<
void,
ChannelOperationFailure
>Parameters
guildId -
string positions-
readonly ChannelPosition[] optionsoptional-
AuditedRequestOptions
- Returns
Effect<void, ChannelOperationFailure>- Fails with
setPermissionOverwrite #
Replace one explicit role or member permission overwrite
Supply the target ID and raw bigint allow and deny flags. Each mask must be from 0n through 9_223_372_036_854_775_807n, and larger received masks cannot be written unchanged. HTTP 204 succeeds with no value. Fluxer requires ManageRoles and uses a feature opt-in to set or clear ViewChannelMembers. Unless the bot has Administrator, the overwrite can allow, or stop denying, only permissions the bot has in this channel, and Fluxer answers missing otherwise. To see beforehand which bits Fluxer would refuse, pass permission the current overwrite, the new one and the bot's bits in this channel, from permissions with a channel or from permissions. On a category, Fluxer writes the category first and then each child whose overwrites matched the category's old ones, in separate writes. Fluxer offers no way to leave a child out, and permission shows which children match. A failure can leave some children with the old overwrites. A retry may skip them, because Fluxer selects children by comparing with the category's overwrites at the time of that call, so fetch the children again to check. No target fetch or inherited-permission calculation is performed
setPermissionOverwrite(
channelId: string,
input: PermissionOverwrite,
options?: AuditedRequestOptions
): Effect<void, ChannelOperationFailure>setPermissionOverwrite(
channelId: string,
input: PermissionOverwrite,
options?: AuditedRequestOptions
): Effect<
void,
ChannelOperationFailure
>Parameters
channelId -
string input-
PermissionOverwrite optionsoptional-
AuditedRequestOptions
- Returns
Effect<void, ChannelOperationFailure>- Fails with
Threads#
Create threads and forum posts, change, list and search threads, and manage thread members
HTTP methods return Effects and do not connect the gateway. Bots can use threads in every community where Fluxer enables them, without a capability setting. Read a thread with channels, delete it with channels and send to it with messages and its ID
interface Threads<M extends MessageCore = Message>interface Threads<
M extends MessageCore = Message
>Supply decimal IDs. Thread requests share this client's REST slots and queue limits with the other HTTP methods.
Total deadline defaults to the client's rest, 30,000 ms unless configured, including queue waits,
retries and rate-limit waits. Reads retry transport failures and HTTP 500/502/503/504 at most twice.
Writes retry only confirmed 429 responses, and no write is followed by an automatic confirmation fetch
Manage Threads is an elevated permission.
In a community whose mfa is Guild, an action that needs it fails with api two, unless the bot owns the community or its application owner has two-factor authentication enabled.
The create, create, create and edit methods accept Audited, and the other methods
reject audit. The fetch list enters the enabled channel cache, while archived pages, search results,
forum posts and member reads do not. The edit, join, leave, add and remove methods remove their thread
from the enabled channel cache
Operation inputs are copied when the Effect executes. Expected failures use Channel, whose operation
names the threads method, or Client. Interruption and defects retain Cause after owned cleanup
addMember #
Add a community member who can view the parent channel to a thread, succeeding with no value after HTTP 204
Adding a current member also succeeds, and otherwise Fluxer posts a RecipientAdd notice in the thread. Fluxer requires Send Messages In Threads, plus Manage Threads in a locked thread and in a private thread that is not invitable, unless the added member can manage threads. An archived thread accepts no new members
addMember(
threadId: string,
userId: string,
options?: RequestOptions
): Effect<void, ChannelOperationFailure>addMember(
threadId: string,
userId: string,
options?: RequestOptions
): Effect<
void,
ChannelOperationFailure
>Parameters
threadId -
string userId -
string optionsoptional-
RequestOptions
- Returns
Effect<void, ChannelOperationFailure>- Fails with
create#
Create a thread that is not attached to a message in a text or announcement channel, and return its frozen snapshot
The bot becomes the thread's first member, and Fluxer posts a ThreadCreated notice in the parent channel for a public or announcement thread. Fluxer requires Create Public Threads, or Create Private Threads for a private thread. Use create in a forum or media channel. A lost response can leave the thread created, and the SDK never resends it
create(
channelId: string,
input: ThreadCreate,
options?: AuditedRequestOptions
): Effect<GuildThreadChannel, ChannelOperationFailure>create(
channelId: string,
input: ThreadCreate,
options?: AuditedRequestOptions
): Effect<
GuildThreadChannel,
ChannelOperationFailure
>Parameters
channelId -
string input-
ThreadCreate optionsoptional-
AuditedRequestOptions
- Returns
Effect<GuildThreadChannel, ChannelOperationFailure>Effect< GuildThreadChannel, ChannelOperationFailure >- Fails with
import { Effect } from "effect"
import { ChannelType, ThreadAutoArchiveMinutes, type Client } from "@neontechspace/fluxerly/effect"
export const threadExample = (client: Client, channelId: string) =>
client.threads
.create(channelId, {
name: "Release planning",
type: ChannelType.PrivateThread,
autoArchiveMinutes: ThreadAutoArchiveMinutes.OneDay,
})
.pipe(Effect.flatMap((thread) => client.messages.send(thread.id, "Planning starts here")))
createFromMessage #
Start a public thread on an existing message and return its frozen snapshot
The thread takes the message's ID, and the message gains Message. Only a default message or a reply in a text or announcement channel can start a thread, and only one. In an announcement channel the thread is an announcement thread. Fluxer posts a ThreadCreated notice in the parent channel unless the message is among its five newest messages. Fluxer requires Create Public Threads and Read Message History. A lost response can leave the thread created, and the SDK never resends it. After an unknown outcome, channels(message) shows whether the thread exists
createFromMessage(
message: MessageReference,
input: ThreadFromMessageCreate,
options?: AuditedRequestOptions
): Effect<GuildThreadChannel, ChannelOperationFailure>createFromMessage(
message: MessageReference,
input: ThreadFromMessageCreate,
options?: AuditedRequestOptions
): Effect<
GuildThreadChannel,
ChannelOperationFailure
>Parameters
message-
MessageReference input-
ThreadFromMessageCreate optionsoptional-
AuditedRequestOptions
createPost #
Create a post in a forum or media channel, a public thread with its first message, and return both frozen
Files in the message are sent inline as multipart form data in the same request, never through presigned uploads, under messages's attachment rules and the client's upload budget. Fluxer requires Send Messages in the channel plus the permissions the message content needs, and applies the channel's tag rules. When the first message fails, Fluxer removes the new post again. A lost response can leave the post created, and the SDK never resends it
createPost(
channelId: string,
input: ForumPostCreate,
options?: AuditedRequestOptions
): Effect<ForumPost<M>, ChannelOperationFailure>createPost(
channelId: string,
input: ForumPostCreate,
options?: AuditedRequestOptions
): Effect<
ForumPost<M>,
ChannelOperationFailure
>Parameters
channelId -
string input-
ForumPostCreate optionsoptional-
AuditedRequestOptions
- Returns
Effect<ForumPost<M>, ChannelOperationFailure>Effect< ForumPost<M>, ChannelOperationFailure >- Fails with
edit#
Change only the supplied thread settings and return the frozen thread
It uses the route and rate limit of channels. Thread describes which changes the thread's creator may make and which need Manage Threads
edit(
threadId: string,
input: ThreadEdit,
options?: AuditedRequestOptions
): Effect<GuildThreadChannel, ChannelOperationFailure>edit(
threadId: string,
input: ThreadEdit,
options?: AuditedRequestOptions
): Effect<
GuildThreadChannel,
ChannelOperationFailure
>Parameters
threadId -
string input-
ThreadEdit optionsoptional-
AuditedRequestOptions
fetchActive #
Fetch every active thread the bot can view in a community, newest first, as one frozen list
A private thread appears when the bot joined it or can manage threads in its parent channel. Each thread the bot joined has membership set
fetchActive(
guildId: string,
options?: RequestOptions
): Effect<readonly GuildThreadChannel[], ChannelOperationFailure>fetchActive(
guildId: string,
options?: RequestOptions
): Effect<
readonly GuildThreadChannel[],
ChannelOperationFailure
>Parameters
guildId -
string optionsoptional-
RequestOptions
- Returns
Effect<readonly GuildThreadChannel[], ChannelOperationFailure>Effect< readonly GuildThreadChannel[], ChannelOperationFailure >- Fails with
fetchArchived #
Fetch one frozen page of archived threads of a text, announcement, forum or media channel, as Archived selects
Scopes "public" and "private" list the most recently archived first, and "joined" lists the newest threads first. Each thread the bot joined has membership set. Fluxer requires Read Message History, plus Manage Threads for scope "private"
fetchArchived(
channelId: string,
query?: ArchivedThreadQuery,
options?: RequestOptions
): Effect<ArchivedThreadPage, ChannelOperationFailure>fetchArchived(
channelId: string,
query?: ArchivedThreadQuery,
options?: RequestOptions
): Effect<
ArchivedThreadPage,
ChannelOperationFailure
>Parameters
channelId -
string queryoptional-
ArchivedThreadQuery optionsoptional-
RequestOptions
fetchMember #
Fetch one thread member as a frozen Thread
A user who is not a member fails with UNKNOWN_THREAD_MEMBER. With with, member holds the user's community membership while the user has one. Its community comes from the channel cache when the thread is cached there, otherwise from one extra channel read that shares the deadline and whose failure fails this call
fetchMember(
threadId: string,
userId: string,
query?: ThreadMemberQuery,
options?: RequestOptions
): Effect<ThreadMember, ChannelOperationFailure>fetchMember(
threadId: string,
userId: string,
query?: ThreadMemberQuery,
options?: RequestOptions
): Effect<
ThreadMember,
ChannelOperationFailure
>Parameters
threadId -
string userId -
string queryoptional-
ThreadMemberQuery optionsoptional-
RequestOptions
- Fails with
fetchMembers #
Fetch one page of thread members in ascending user ID order, as frozen Thread values
With with, each member holds the user's community membership while the user has one, with the community resolved as fetch describes
fetchMembers(
threadId: string,
query?: ThreadMemberPageQuery,
options?: RequestOptions
): Effect<readonly ThreadMember[], ChannelOperationFailure>fetchMembers(
threadId: string,
query?: ThreadMemberPageQuery,
options?: RequestOptions
): Effect<
readonly ThreadMember[],
ChannelOperationFailure
>Parameters
threadId -
string queryoptional-
ThreadMemberPageQuery optionsoptional-
RequestOptions
- Returns
Effect<readonly ThreadMember[], ChannelOperationFailure>Effect< readonly ThreadMember[], ChannelOperationFailure >- Fails with
iterateMembers #
Read thread members in ascending user ID order, buffering one page and never prefetching
The max option is required. The page option defaults to 100 and accepts 1–100, max defaults to the pages max needs at page plus 100, and timeout applies to each page. An empty page or max ends the scan. Invalid traversal input, a stalled cursor or reaching the page budget fails with Pagination, and remote failures keep threads's errors. With with, one consumption resolves the thread's community once, as fetch describes. Each consumption is independent, and client closure releases the page and fails the next pull
iterateMembers(
threadId: string,
query: ThreadMemberIterationQuery,
options?: RequestOptions
): Stream<ThreadMember, ChannelOperationFailure | PaginationError>iterateMembers(
threadId: string,
query:
ThreadMemberIterationQuery,
options?: RequestOptions
): Stream<
ThreadMember,
| ChannelOperationFailure
| PaginationError
>Parameters
threadId -
string optionsoptional-
RequestOptions
- Returns
Stream<ThreadMember, ChannelOperationFailure | PaginationError>Stream< ThreadMember, | ChannelOperationFailure | PaginationError >- Fails with
The returned Stream reads pages only while it is consumed. Failures end the Stream in its error channel. Interruption waits for request cleanup, and ending consumption releases the buffered page
join#
Add the bot to a thread, succeeding with no value after HTTP 204
Joining a thread the bot already belongs to also succeeds. An archived thread cannot be joined, and a locked one needs Manage Threads
join(
threadId: string,
options?: RequestOptions
): Effect<void, ChannelOperationFailure>join(
threadId: string,
options?: RequestOptions
): Effect<
void,
ChannelOperationFailure
>Parameters
threadId -
string optionsoptional-
RequestOptions
- Returns
Effect<void, ChannelOperationFailure>- Fails with
leave#
Remove the bot from a thread, succeeding with no value after HTTP 204
An archived thread cannot be left, and Fluxer rejects a bot that is not a member with UNKNOWN_THREAD_MEMBER
leave(
threadId: string,
options?: RequestOptions
): Effect<void, ChannelOperationFailure>leave(
threadId: string,
options?: RequestOptions
): Effect<
void,
ChannelOperationFailure
>Parameters
threadId -
string optionsoptional-
RequestOptions
- Returns
Effect<void, ChannelOperationFailure>- Fails with
removeMember #
Remove a member from a thread, succeeding with no value after HTTP 204, and Fluxer posts a RecipientRemove notice in the thread
Removing the bot's own ID works like leave. Fluxer requires Manage Threads unless the bot created the private thread. A user who is not a member fails with UNKNOWN_THREAD_MEMBER, and an archived thread cannot change
removeMember(
threadId: string,
userId: string,
options?: RequestOptions
): Effect<void, ChannelOperationFailure>removeMember(
threadId: string,
userId: string,
options?: RequestOptions
): Effect<
void,
ChannelOperationFailure
>Parameters
threadId -
string userId -
string optionsoptional-
RequestOptions
- Returns
Effect<void, ChannelOperationFailure>- Fails with
search#
Search the threads of a text, announcement, forum or media channel by name, tags and state, and return one frozen page
Fluxer requires Read Message History. While Fluxer builds the community's search index it answers HTTP 202 with code SEARCH_INDEX_NOT_READY, which this method returns as an indexing page without retrying. Any other HTTP 202 answer fails with reason response. While Fluxer's search service is turned off, the call fails with reason rejected and api FEATURE_TEMPORARILY_DISABLED
search(
channelId: string,
query?: ThreadSearchQuery,
options?: RequestOptions
): Effect<ThreadSearchPage<M>, ChannelOperationFailure>search(
channelId: string,
query?: ThreadSearchQuery,
options?: RequestOptions
): Effect<
ThreadSearchPage<M>,
ChannelOperationFailure
>Parameters
channelId -
string queryoptional-
ThreadSearchQuery optionsoptional-
RequestOptions
- Returns
Effect<ThreadSearchPage<M>, ChannelOperationFailure>Effect< ThreadSearchPage<M>, ChannelOperationFailure >- Fails with
Re-Exports#
Declared in JavaScript & TypeScript and documented there. Import them from @neontechspace/fluxerly/effect as well
is#Thread Channel - Whether a community channel is a thread of any type
Channel#Flags - Known bits in the flags of a thread, forum channel or media channel
Channel#Type - Choose what a new community channel does: Text messages, announcements, voice calls, a category that groups channels, or a link
Forum#Layout - Layouts in which clients show the posts of a forum channel by default
Forum#Sort Order - Orders in which clients list the posts of a forum or media channel by default
Thread#Auto Archive Minutes - Inactivity periods, in minutes, after which Fluxer archives a thread
Announcement#Channel Create - Creates an announcement channel with the same settings as a text channel
Archived#Thread Page - One frozen page of archived threads
Archived#Thread Query - Select one page of archived threads of a channel
Category#Channel Create - Create a category to group community channels
Channel#Create Base - Settings shared by new text, announcement, voice, category and link channels
Channel#Edit - Change an existing community channel's settings without replacing the channel
Channel#Follow Input - Subscribe a text channel to messages published from an announcement channel
Channel#Follower Stats - A frozen count of channels and communities following one announcement channel
Channel#Member Count - Visible member totals for one requested channel, with the guild ID supplied by the gateway response
Channel#Member Counts Result - Results from one community's requested channel counts, ordered to match the requested channel IDs
Channel#Position - Move or reorder one community channel with
channels.reorder Followed#Channel - A confirmed announcement-channel follow, returned as a frozen value
Forum#Channel Create - Creates a forum channel, which holds posts instead of messages
Forum#Channel Create Base - Settings shared by new forum and media channels
Forum#Default Reaction - The reaction that clients show on each post of a forum or media channel
Forum#Default Reaction Input - The reaction that clients show on each post of a forum or media channel
Forum#Post - A post created with
threads: Its thread and its first message, both frozen.create Post Forum#Post Create - A new post in a forum or media channel, created with
threads.create Post Forum#Tag Input - Settings of one tag that posts in a forum or media channel can carry
Guild#Announcement Channel - A community announcement channel, selected by
type === ChannelType .Announcement Guild#Announcement Thread Channel - A thread inside an announcement channel, selected by
type === ChannelType .Announcement Thread Guild#Category Channel - A grouping parent for community channels, selected by
type === ChannelType .Category Guild#Channel Base - Fields every community channel shares, whatever its type
Guild#Forum Channel - A forum channel, selected by
type === ChannelType .Forum Guild#Forum Channel Base - Fields shared by forum and media channels, which hold posts and no messages of their own
Guild#Link Channel - A channel that points to an external URL, selected by
type === ChannelType .Link Guild#Media Channel - A media channel, a forum channel that can hide media download options, selected by
type === ChannelType .Media Guild#Private Thread Channel - A private thread inside a text channel, selected by
type === ChannelType .Private Thread Guild#Public Thread Channel - A public thread inside a text channel, or a post inside a forum or media channel, selected by
type === ChannelType .Public Thread Guild#Text Channel - A community text conversation, selected by
type === ChannelType .Text Guild#Text Channel Base - Message and topic fields shared by community text and announcement channels
Guild#Thread Channel Base - Fields every thread shares, whatever its type
Guild#Unknown Channel - A community channel of a type this SDK version does not know, such as a type Fluxer adds later, selected by
type === "unknown" Guild#Voice Channel - A community voice-call channel, selected by
type === ChannelType .Voice Link#Channel Create - Create a community channel that points readers to a URL
Media#Channel Create - Creates a media channel, a forum channel that can hide media download options
Text#Channel Create - Creates a text channel
Thread#Create - Settings for a new thread in a text or announcement channel, created with
threads.create Thread#Edit - Change an existing thread or post with
threads.edit Thread#From Message Create - Settings for a public thread started on an existing message with
threads.create From Message Thread#Member - One member of a thread
Thread#Member Iteration Query - Limits and starting point for
threads, reading thread members in ascending user ID order.iterate Members Thread#Member Page Query - Select one page of thread members, in ascending user ID order
Thread#Member Query - Options for reading one thread member with
threads.fetch Member Thread#Membership - The bot's own membership in a thread, as Fluxer reports it beside the thread
Thread#Parent Defaults - Default settings for the threads that start inside a text, announcement, forum or media channel
Thread#Search Indexing Page - Successful search response while Fluxer still builds the community's search index
Thread#Search Query - Filters and paging for one
threadsrequest in a text, announcement, forum or media channel.search Thread#Search Results Page - Search results once Fluxer's index can answer
Voice#Channel Create - Creates a voice channel
Archived#Thread Scope - Which archived threads
threadslists: Public threads, private threads, or only the private threads the bot joined.fetch Archived Channel#Create - One supported community-channel creation request, with Fluxer positioning a new channel itself
Forum#Post Message - The first message of a forum or media post: The content, embeds, files and stickers of
messages, with.send allowedand flagsMentions Guild#Channel - Settings and identity of a community channel returned by a read or gateway event, as one shape per channel type
Guild#Thread Channel - A thread: A channel inside a text, announcement, forum or media channel that holds its own messages
Thread#Search Page - Successful outcome of one
threadsrequest.search