65 symbols from @neontechspace/fluxerly
Functions#
isThreadChannel #
Whether a community channel is a thread of any type
Any other value, including undefined, returns false
isThreadChannel(
channel: GuildChannel | undefined
): channel is GuildThreadChannelisThreadChannel(
channel: GuildChannel | undefined
): channel is GuildThreadChannelParameters
channel-
GuildChannel | undefined
- Returns
channel is GuildThreadChannel
import { isThreadChannel } from "@neontechspace/fluxerly"
export function parentOf(channel) {
return isThreadChannel(channel) ? channel.parentId : undefined
}
import { isThreadChannel, type GuildChannel } from "@neontechspace/fluxerly"
export function parentOf(channel: GuildChannel) {
return isThreadChannel(channel) ? channel.parentId : undefined
}
Variables#
ChannelFlags #
Known bits in the flags of a thread, forum channel or media channel
Test a bit with bitwise AND, such as ((. Received flags keep bits this SDK version does not name
const ChannelFlags: Readonly<{ … }>ChannelType #
Choose what a new community channel does: Text messages, announcements, voice calls, a category that groups channels, or a link
Received channels use the same constants in Guild, including threads, forum channels and media channels. A future Fluxer type that this SDK version does not know arrives as a Guild, whose type is "unknown" and whose raw keeps the number
const ChannelType: Readonly<{ … }>Announcement#-
5 Announcement#Thread -
10 Forum#-
A channel that holds posts, each a public thread with its own first message, and no messages of its own
15 Private#Thread -
12 Public#Thread -
A thread inside a text, forum or media channel, visible to everyone who can view that channel
Every post in a forum or media channel is a public thread
11 Text#-
A community text conversation
0
ForumLayout #
Layouts in which clients show the posts of a forum channel by default
Media channels have no layout setting. A received default keeps a value this SDK version does not name
const ForumLayout: Readonly<{ … }>ForumSortOrder #
Orders in which clients list the posts of a forum or media channel by default
A received default keeps a value this SDK version does not name
const ForumSortOrder: Readonly<{ … }>ThreadAutoArchiveMinutes #
Inactivity periods, in minutes, after which Fluxer archives a thread
The period counts from the later of the thread's last message and its archive. A new thread uses ThreeDays unless its creation sets another value, and Fluxer does not apply a parent channel's default to it
const ThreadAutoArchiveMinutes: Readonly<{ … }>const ThreadAutoArchiveMinutes: Readonly<
{ … }
>Interfaces#
AnnouncementChannelCreate #
interface AnnouncementChannelCreate
extends ChannelCreateBase, ThreadParentDefaultsinterface AnnouncementChannelCreate
extends ChannelCreateBase, ThreadParentDefaultsInherited from Channel: bitrate, content, content, name, nsfw, nsfw, parent, permission, rate, topic, url, user, voice
Inherited from Thread: default, default
ArchivedThreadPage #
One frozen page of archived threads
Each thread the bot joined has membership set
interface ArchivedThreadPagehas#More -
Whether Fluxer may have more threads after this page
Pass the last thread's
archive, or its ID for "Timestamp joined", as before to read the next pagePrivate boolean threads#-
Archived threads in the order Fluxer listed them
readonly GuildThreadChannel[]
ArchivedThreadQuery #
Select one page of archived threads of a channel
Unknown keys fail locally
interface ArchivedThreadQuerybeforeoptional#-
Start before this cursor, excluding it
For "public" and "private" it is an ISO 8601 timestamp with a timezone, compared with the archive time. For "
joined" it is a decimal thread ID. Omit it for the first pagePrivate string limitoptional#-
Maximum threads in the page, an integer from 2 through 100, default 50
number scopeoptional#-
Threads to list, default "public"
The scopes "private" and "
joined" work only in a text channel, and "private" needs Manage ThreadsPrivate ArchivedThreadScope
CategoryChannelCreate #
Create a category to group community channels
interface CategoryChannelCreate extends ChannelCreateBaseinterface CategoryChannelCreate
extends ChannelCreateBaseInherited from Channel: bitrate, content, content, name, nsfw, nsfw, parent, permission, rate, topic, url, user, voice
ChannelCreateBase #
Settings shared by new text, announcement, voice, category and link channels
Supply the matching Channel type. Fluxer decides which settings apply to that channel type and enforces permissions. Omitted permission inherit from the parent category, while [] requests none. Unknown input keys fail locally. The encoded request body must fit within 4,194,304 bytes
interface ChannelCreateBasebitrateoptional#-
Voice audio bitrate in bits per second, integer 8,000–384,000 or null, default 64,000 for voice channels
Fluxer clamps the requested value to the community's enabled bitrate tier. Read the returned channel for the applied value
number | null contentoptional#Warning Level -
0 inherits the content-warning level, 1 requests a channel content warning
number contentoptional#Warning Text -
Warning shown before viewing content, with 0–200 raw UTF-16 code units and null inheriting
No text normalization is applied before validation
string | null name#-
Channel name
Raw input may contain at most 10,000 UTF-16 code units. For validation, Fluxer's general-name rules remove U+000C and U+202E, trim surrounding whitespace, strip provider-defined invisible characters, normalize whitespace and collapse its runs, then require 1–100 UTF-16 code units. The SDK sends the original string without lowercasing or hyphenating it
string nsfwoptional#-
Adult-content setting using Fluxer's older NSFW field
True marks the channel adult-only, while false inherits the parent category or community setting like omission. Use
nsfwfalse to mark it not adult-only. When both are present,Override nsfwwinsOverride boolean nsfwoptional#Override -
Explicit adult-content override, with null inheriting
boolean | null permissionoptional#Overwrites -
Explicit overrides, omitted to inherit a parent category and [] to create no overrides
readonly PermissionOverwrite[] rateoptional#Limit Per User -
Delay between a user's messages in seconds, integer 0–21,600 or null
Zero disables slowmode
number | null topicoptional#-
Description shown for the channel, 1–1,024 UTF-16 code units after U+000C and U+202E removal and surrounding-whitespace trimming, or null to clear
The original string is sent unchanged
string | null urloptional#-
Absolute URL for a link channel, or null to clear
The SDK does not open or fetch the URL
string | null useroptional#Limit -
Maximum voice users from 0 through 99, with 0 unlimited and the voice default
number | null
ChannelEdit #
Change an existing community channel's settings without replacing the channel
Omitted fields stay unchanged. The permission list replaces the whole explicit list, so include entries that must stay. Use channels to move a channel between categories or change its order. Unknown keys and an empty patch fail locally. Fluxer checks channel-type compatibility and permissions after local validation
interface ChannelEditavailableoptional#Tags -
Replace the complete tag list of a forum or media channel, at most 20 tags
Fluxer rejects two tags with the same name. Entries with an id keep that tag, entries without one add a tag, and a tag left out is deleted. Use
channels,.create Forum Tag editandForum Tag deleteto change one tag without sending the list. Fluxer ignores this setting for another channel typeForum Tag readonly ForumTagInput[] bitrateoptional#-
Voice bitrate in bits per second, integer 8,000–384,000, or null
Fluxer clamps the requested value to the community's enabled bitrate tier. Read the returned channel for the applied value
number | null contentoptional#Warning Level -
0 inherits the content-warning level, 1 requests a channel content warning
number contentoptional#Warning Text -
Warning text with 0–200 raw UTF-16 code units, with null inheriting
No text normalization is applied before validation
string | null defaultoptional#Auto Archive Minutes -
Auto-archive period in minutes that a text, announcement, forum or media channel stores for its threads: One of the
Threadvalues, or null to clear itAuto Archive Minutes Fluxer stores the value but does not apply it to a new thread. Fluxer ignores it for another channel type, and on a text or announcement channel in a community where threads are not active
number | null defaultoptional#Forum Layout -
Default post layout of a forum channel, a
ForumvalueLayout Null sets
Forum. Fluxer ignores it for a media channel and for another channel typeLayout .Default number | null defaultoptional#Reaction Emoji -
Reaction that clients show on each post of a forum or media channel, or null for none
Fluxer ignores it for another channel type
ForumDefaultReactionInput | null defaultoptional#Sort Order -
Default post order of a forum or media channel, a
Forumvalue, or null for noneSort Order Fluxer ignores it for another channel type
number | null defaultoptional#Tag Setting -
How a post search of a forum or media channel matches several tags by default: "match_some" finds posts with any of them and "match_all" only posts with all of them
Null sets "match_some". Fluxer ignores it for another channel type
"match_some" | "match_all" | null defaultoptional#Thread Rate Limit Per User -
Slowmode delay in seconds that a new thread in a text, announcement, forum or media channel copies when its creation sets none, an integer from 0 through 21,600, or null to clear it
Fluxer ignores it for another channel type, and on a text or announcement channel in a community where threads are not active
number | null flagsoptional#-
Flags of a forum or media channel, replacing all of them: Include
Channelto keep it requiredFlags .Require Tag RequireTag needs at least one tag that is not moderated, and
Channelis valid on a media channel only. Fluxer checks both against the channel, and any other bit fails locally. Fluxer ignores this setting for another channel typeFlags .Hide Media Download Options number nameoptional#-
Channel name
Raw input may contain at most 10,000 UTF-16 code units. For validation, Fluxer's general-name rules remove U+000C and U+202E, trim surrounding whitespace, strip provider-defined invisible characters, normalize whitespace and collapse its runs, then require 1–100 UTF-16 code units. The SDK sends the original string without lowercasing or hyphenating it
string nsfwoptional#-
Adult-content setting using Fluxer's older NSFW field
True marks the channel adult-only, while false and null restore inheritance from the parent category or community. Use
nsfwfalse to mark it not adult-only. When both are present,Override nsfwwinsOverride boolean | null nsfwoptional#Override -
Explicit adult-content override, with null inheriting
boolean | null permissionoptional#Overwrites -
Replace all explicit overwrites, with [] clearing them and omission preserving them
readonly PermissionOverwrite[] rateoptional#Limit Per User -
Delay between a user's messages in seconds, integer 0–21,600, or null
Zero disables slowmode
number | null rtcoptional#Region -
Voice region ID of 1–64 UTF-16 code units after U+000C and U+202E removal and surrounding-whitespace trimming, with null selecting automatic routing
The original string is sent unchanged
string | null topicoptional#-
Channel description, 1–1,024 UTF-16 code units after U+000C and U+202E removal and surrounding-whitespace trimming, or null to clear
A forum or media channel allows up to 4,096 code units, which Fluxer checks against the channel's type. The original string is sent unchanged
string | null typeoptional#-
Convert between Text (0) and Announcement (5), alone or with other settings
Omission preserves the type. Other values fail locally. 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, replacing any cached observation before handlers run. The edit does not await that event or follower removal
0 | 5 urloptional#-
Absolute link-channel URL, or null to clear
No URL is fetched by this request
string | null useroptional#Limit -
Maximum voice users, integer 0–99, or null
Zero requests unlimited users
number | null voiceoptional#Connection Limit -
Maximum simultaneous voice connections per user, integer 1–100, or null
number | null
ChannelFollowInput #
Subscribe a text channel to messages published from an announcement channel
Fluxer validates the source, target and permissions without an SDK prefetch
interface ChannelFollowInputtarget#Channel Id -
Decimal ID of the receiving community text channel, whose type must be
ChannelType .Text string
ChannelFollowerStats #
A frozen count of channels and communities following one announcement channel
Fluxer can cache these counts for up to 60 seconds. They are not live subscriptions
interface ChannelFollowerStatsChannelMemberCount #
Visible member totals for one requested channel, with the guild ID supplied by the gateway response
Counts concern this channel's visibility, not the full community membership
interface ChannelMemberCount extends GuildCountinterface ChannelMemberCount
extends GuildCountchannel#Id -
Requested channel ID as a positive decimal string with no leading zeroes, no greater than 9223372036854775807
string member#Count -
number
Inherited from Guild: guild
ChannelMemberCountsResult #
Results from one community's requested channel counts, ordered to match the requested channel IDs
The omitted field lists requested IDs for which Fluxer returned no count. The SDK does not substitute zero or infer why. A community assigned to an unowned or unready shard fails the call with not instead
interface ChannelMemberCountsResultcounts#-
Frozen count entries in the caller's requested channel-ID order
readonly ChannelMemberCount[]
ChannelPosition #
Move or reorder one community channel with channels
Channels left out of the request are not explicit targets. Fluxer applies entries in order, so the requested position may not be the final position if another change happens at the same time
interface ChannelPositionparentoptional#Id -
New parent category, with null moving to the top level and omission preserving the parent
string | null positionoptional#-
Nonnegative requested sibling position
number precedingoptional#Sibling Id -
Sibling directly preceding this channel, with null placing it first
string | null syncoptional#Permissions On Move -
Copy destination overwrites only when moving into a new category, default false and no sync for the same parent
boolean
Channels#
Read, create and change community channels, with optional local cache lookup
Use direct for private conversations instead. Most methods use HTTP without a gateway connection. The fetch method requires a ready gateway
interface ChannelsSupply decimal community-channel IDs.
ID-based writes do not fetch first to verify channel type.
Requests share the client's REST or upload slots across 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).
The default deadline, rest (30,000 ms unless configured), includes capacity, rate-limit and retry waits.
Eligible reads retry transport and HTTP 500, 502, 503 or 504 failures at most twice
Writes retry only confirmed HTTP 429 rejection.
Input, permission, not-found and malformed responses do not retry
Inputs are copied when called.
Permission values use bigint and are sent as decimal JSON strings.
Fluxer enforces permissions and restrictions on granting flags.
Targeted role and member overwrites require ManageRoles.
A dispatched channel change removes the written channel from the enabled channel cache, with its threads when the change 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 change to a category, or one that names a community, such as create or reorder, removes that community's cached channels.
A change to a channel the cache does not hold removes every cached channel, because its community is unknown.
Local input failure before dispatch preserves the cache, and a change rejected after dispatch removes the same entries.
No write is followed by an automatic confirmation fetch.
The follow, create, edit, delete, reorder, permission-overwrite and forum-tag mutations accept a raw audit reason through
Audited. Read operations reject audit instead of sending a meaningless header.
Expected failures return Channel or Client.
Abort returns Cancelled after cleanup.
Unexpected failures reject with Sdk
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
): ResultAsync<
GuildChannel,
ChannelOperationFailure | ConfigurationError | CancelledError
>create(
guildId: string,
input: ChannelCreate,
options?: AuditedRequestOptions
): ResultAsync<
GuildChannel,
| ChannelOperationFailure
| ConfigurationError
| CancelledError
>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
- Returns
ResultAsync< GuildChannel, ChannelOperationFailure | ConfigurationError | CancelledError >ResultAsync< GuildChannel, | ChannelOperationFailure | ConfigurationError | CancelledError >
import { ChannelType, Permissions } from "@neontechspace/fluxerly"
export async function channelExample(client, guildId, botId) {
const result = await 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 },
],
})
if (result.isErr())
throw result.error
return result.value
}
import { ChannelType, Permissions, type Client } from "@neontechspace/fluxerly"
export async function channelExample(client: Client, guildId: string, botId: string) {
const result = await 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 },
],
})
if (result.isErr()) throw result.error
return result.value
}
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
): ResultAsync<
GuildForumChannel | GuildMediaChannel,
ChannelOperationFailure | ConfigurationError | CancelledError
>createForumTag(
channelId: string,
input: ForumTagInput,
options?: AuditedRequestOptions
): ResultAsync<
| GuildForumChannel
| GuildMediaChannel,
| ChannelOperationFailure
| ConfigurationError
| CancelledError
>Parameters
channelId -
string input-
ForumTagInput optionsoptional-
AuditedRequestOptions
- Returns
ResultAsync< GuildForumChannel | GuildMediaChannel, ChannelOperationFailure | ConfigurationError | CancelledError >ResultAsync< | GuildForumChannel | GuildMediaChannel, | ChannelOperationFailure | ConfigurationError | CancelledError >
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
): ResultAsync<
void,
ChannelOperationFailure | ConfigurationError | CancelledError
>delete(
channelId: string,
options?: AuditedRequestOptions
): ResultAsync<
void,
| ChannelOperationFailure
| ConfigurationError
| CancelledError
>Parameters
channelId -
string optionsoptional-
AuditedRequestOptions
- Returns
ResultAsync< void, ChannelOperationFailure | ConfigurationError | CancelledError >ResultAsync< void, | ChannelOperationFailure | ConfigurationError | CancelledError >
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
): ResultAsync<
GuildForumChannel | GuildMediaChannel,
ChannelOperationFailure | ConfigurationError | CancelledError
>deleteForumTag(
channelId: string,
tagId: string,
options?: AuditedRequestOptions
): ResultAsync<
| GuildForumChannel
| GuildMediaChannel,
| ChannelOperationFailure
| ConfigurationError
| CancelledError
>Parameters
channelId -
string tagId -
string optionsoptional-
AuditedRequestOptions
- Returns
ResultAsync< GuildForumChannel | GuildMediaChannel, ChannelOperationFailure | ConfigurationError | CancelledError >ResultAsync< | GuildForumChannel | GuildMediaChannel, | ChannelOperationFailure | ConfigurationError | CancelledError >
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
): ResultAsync<
GuildChannel,
ChannelOperationFailure | ConfigurationError | CancelledError
>edit(
channelId: string,
input: ChannelEdit,
options?: AuditedRequestOptions
): ResultAsync<
GuildChannel,
| ChannelOperationFailure
| ConfigurationError
| CancelledError
>Parameters
channelId -
string input-
ChannelEdit optionsoptional-
AuditedRequestOptions
- Returns
ResultAsync< GuildChannel, ChannelOperationFailure | ConfigurationError | CancelledError >ResultAsync< GuildChannel, | ChannelOperationFailure | ConfigurationError | CancelledError >
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
): ResultAsync<
GuildForumChannel | GuildMediaChannel,
ChannelOperationFailure | ConfigurationError | CancelledError
>editForumTag(
channelId: string,
tagId: string,
input: ForumTagInput,
options?: AuditedRequestOptions
): ResultAsync<
| GuildForumChannel
| GuildMediaChannel,
| ChannelOperationFailure
| ConfigurationError
| CancelledError
>Parameters
channelId -
string tagId -
string input-
ForumTagInput optionsoptional-
AuditedRequestOptions
- Returns
ResultAsync< GuildForumChannel | GuildMediaChannel, ChannelOperationFailure | ConfigurationError | CancelledError >ResultAsync< | GuildForumChannel | GuildMediaChannel, | ChannelOperationFailure | ConfigurationError | CancelledError >
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): ResultAsync<
GuildChannel,
ChannelOperationFailure | ConfigurationError | CancelledError
>fetch(
channelId: string,
options?: RequestOptions
): ResultAsync<
GuildChannel,
| ChannelOperationFailure
| ConfigurationError
| CancelledError
>Parameters
channelId -
string optionsoptional-
RequestOptions
- Returns
ResultAsync< GuildChannel, ChannelOperationFailure | ConfigurationError | CancelledError >ResultAsync< GuildChannel, | ChannelOperationFailure | ConfigurationError | CancelledError >
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): ResultAsync<
readonly GuildChannel[],
ChannelOperationFailure | ConfigurationError | CancelledError
>fetchAll(
guildId: string,
options?: RequestOptions
): ResultAsync<
readonly GuildChannel[],
| ChannelOperationFailure
| ConfigurationError
| CancelledError
>Parameters
guildId -
string optionsoptional-
RequestOptions
- Returns
ResultAsync< readonly GuildChannel[], ChannelOperationFailure | ConfigurationError | CancelledError >ResultAsync< readonly GuildChannel[], | ChannelOperationFailure | ConfigurationError | CancelledError >
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
): ResultAsync<
ChannelFollowerStats,
ChannelOperationFailure | ConfigurationError | CancelledError
>fetchFollowerStats(
channelId: string,
options?: RequestOptions
): ResultAsync<
ChannelFollowerStats,
| ChannelOperationFailure
| ConfigurationError
| CancelledError
>Parameters
channelId -
string optionsoptional-
RequestOptions
- Returns
ResultAsync< ChannelFollowerStats, ChannelOperationFailure | ConfigurationError | CancelledError >ResultAsync< ChannelFollowerStats, | ChannelOperationFailure | ConfigurationError | CancelledError >
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
): ResultAsync<
ChannelMemberCountsResult,
ConfigurationError | CountOperationFailure | CancelledError
>fetchMemberCounts(
guildId: string,
channelIds: readonly string[],
options?: RequestOptions
): ResultAsync<
ChannelMemberCountsResult,
| ConfigurationError
| CountOperationFailure
| CancelledError
>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
- Returns
ResultAsync< ChannelMemberCountsResult, ConfigurationError | CountOperationFailure | CancelledError >ResultAsync< ChannelMemberCountsResult, | ConfigurationError | CountOperationFailure | CancelledError >
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
): ResultAsync<
FollowedChannel,
ChannelOperationFailure | ConfigurationError | CancelledError
>follow(
channelId: string,
input: ChannelFollowInput,
options?: AuditedRequestOptions
): ResultAsync<
FollowedChannel,
| ChannelOperationFailure
| ConfigurationError
| CancelledError
>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
- Returns
ResultAsync< FollowedChannel, ChannelOperationFailure | ConfigurationError | CancelledError >ResultAsync< FollowedChannel, | ChannelOperationFailure | ConfigurationError | CancelledError >
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): GuildChannel | undefinedget(
channelId: string
): GuildChannel | undefinedParameters
channelId -
string
- Returns
GuildChannel | undefined
Returns the value synchronously.
Unexpected failures throw Sdk
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
): ResultAsync<
void,
ChannelOperationFailure | ConfigurationError | CancelledError
>removePermissionOverwrite(
channelId: string,
targetId: string,
options?: AuditedRequestOptions
): ResultAsync<
void,
| ChannelOperationFailure
| ConfigurationError
| CancelledError
>Parameters
channelId -
string targetId -
string optionsoptional-
AuditedRequestOptions
- Returns
ResultAsync< void, ChannelOperationFailure | ConfigurationError | CancelledError >ResultAsync< void, | ChannelOperationFailure | ConfigurationError | CancelledError >
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
): ResultAsync<
void,
ChannelOperationFailure | ConfigurationError | CancelledError
>reorder(
guildId: string,
positions:
readonly ChannelPosition[],
options?: AuditedRequestOptions
): ResultAsync<
void,
| ChannelOperationFailure
| ConfigurationError
| CancelledError
>Parameters
guildId -
string positions-
readonly ChannelPosition[] optionsoptional-
AuditedRequestOptions
- Returns
ResultAsync< void, ChannelOperationFailure | ConfigurationError | CancelledError >ResultAsync< void, | ChannelOperationFailure | ConfigurationError | CancelledError >
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
): ResultAsync<
void,
ChannelOperationFailure | ConfigurationError | CancelledError
>setPermissionOverwrite(
channelId: string,
input: PermissionOverwrite,
options?: AuditedRequestOptions
): ResultAsync<
void,
| ChannelOperationFailure
| ConfigurationError
| CancelledError
>Parameters
channelId -
string input-
PermissionOverwrite optionsoptional-
AuditedRequestOptions
- Returns
ResultAsync< void, ChannelOperationFailure | ConfigurationError | CancelledError >ResultAsync< void, | ChannelOperationFailure | ConfigurationError | CancelledError >
FollowedChannel #
A confirmed announcement-channel follow, returned as a frozen value
Delete webhook through client to stop following
interface FollowedChannelForumChannelCreate #
Creates a forum channel, which holds posts instead of messages
interface ForumChannelCreate extends ForumChannelCreateBaseinterface ForumChannelCreate
extends ForumChannelCreateBasedefaultoptional#Forum Layout -
Default post layout, a
ForumvalueLayout Null sets
ForumLayout .Default number | null
Inherited from Forum: available, bitrate, content, content, default, default, default, default, default, flags, name, nsfw, nsfw, parent, permission, rate, topic, url, user, voice
ForumChannelCreateBase #
Settings shared by new forum and media channels
Supply Forum or Media. The tags, default reaction, sort order, tag setting and flags are the same as the matching Channel fields. Fluxer rejects creating a forum or media channel in a community where threads are not active (Guild is false)
interface ForumChannelCreateBase
extends ChannelCreateBase, ThreadParentDefaultsinterface ForumChannelCreateBase
extends ChannelCreateBase, ThreadParentDefaultsavailableoptional#Tags -
Tags that posts can carry, at most 20
Fluxer rejects two tags with the same name. Omission creates none
readonly ForumTagInput[] defaultoptional#Reaction Emoji -
Reaction that clients show on each post, or null for none
ForumDefaultReactionInput | null defaultoptional#Sort Order -
Default post order, a
Forumvalue, or null for noneSort Order number | null defaultoptional#Tag Setting -
How a post search matches several tags by default: "match_some" finds posts with any of them and "match_all" only posts with all of them
Null and omission leave "match_some"
"match_some" | "match_all" | null flagsoptional#-
Channel flags
Supply
Channelto make every new post carry a tag, which needs at least one tag that is not moderated. On a media channel, addFlags .Require Tag Channelto hide the download options. Any other bit fails locallyFlags .Hide Media Download Options number topicoptional#-
Posting guidelines, 1–4,096 UTF-16 code units after U+000C and U+202E removal and surrounding-whitespace trimming, or null for none
The original string is sent unchanged
string | null
Inherited from Channel: bitrate, content, content, name, nsfw, nsfw, parent, permission, rate, url, user, voice
Inherited from Thread: default, default
ForumDefaultReaction #
The reaction that clients show on each post of a forum or media channel
interface ForumDefaultReactionemoji#Name -
A Unicode emoji, or null for a custom emoji
string | null
ForumDefaultReactionInput #
The reaction that clients show on each post of a forum or media channel
Set at most one of emoji and emoji. A received Forum is also valid input
interface ForumDefaultReactionInputForumPost #
A post created with threads: Its thread and its first message, both frozen
interface ForumPost<M extends MessageCore = Message>interface ForumPost<
M extends MessageCore = Message
>message#-
The post's first message, in the thread, using the client's
messageselectionFields M thread#-
The post, a public thread whose
parentis the forum or media channelId GuildPublicThreadChannel
ForumPostCreate #
A new post in a forum or media channel, created with threads
Each post is a public thread with its own first message. Unknown keys fail locally
interface ForumPostCreateappliedoptional#Tag Ids -
IDs of the channel's forum tags to apply, at most 5 decimal strings
A channel with
Channelneeds at least one, and a moderated tag needs Manage ThreadsFlags .Require Tag readonly string[] autooptional#Archive Minutes -
Inactivity period in minutes after which Fluxer archives the post, one of the
Threadvalues, defaultAuto Archive Minutes ThreadAuto Archive Minutes .Three Days number message#-
The post's first message
Its files are uploaded in the same request as multipart form data
ForumPostMessage name#-
Post name, 1–100 UTF-16 code units after U+000C and U+202E removal and surrounding-whitespace trimming
The original string is sent unchanged
string
ForumTag #
A tag that posts in a forum or media channel can carry
interface ForumTagemoji#Name -
A Unicode emoji, or null when the tag has none
At most one of
emojiandId emojiis setName string | null
ForumTagInput #
Settings of one tag that posts in a forum or media channel can carry
Fluxer rejects a name that another tag of the channel already uses. A received Forum is also valid input
interface ForumTagInputemojioptional#Id -
Decimal ID of a custom emoji of this community, or null for none
Fluxer rejects an emoji that the community does not have. Set at most one of
emojiandId emojiName string | null emojioptional#Name -
A single Unicode emoji, or null for none, up to 64 UTF-16 code units
Fluxer rejects other text. Set at most one of
emojiandId emojiName string | null idoptional#-
Decimal ID of an existing tag, which only an entry of a channel edit's
availableuses: The entry keeps that tag and replaces its settings, while an entry without an ID adds a tagTags Fluxer rejects an ID that the channel does not have, and an ID that appears twice in the list. A new channel has no tags, so its
availablefail locally with an ID. The single-tag operations never send an ID, soTags createignores one, andForum Tag editfails locally unless it equals theForum Tag tagargumentId string moderatedoptional#-
Whether only members who can manage threads may apply or remove the tag
Omission means false
boolean name#-
Tag name, 1–50 UTF-16 code units after U+000C and U+202E removal and surrounding-whitespace trimming
The original string is sent unchanged
string
GuildAnnouncementChannel #
A community announcement channel, selected by type === Channel
It has the same message and topic fields as a text channel
interface GuildAnnouncementChannel extends GuildTextChannelBaseinterface GuildAnnouncementChannel
extends GuildTextChannelBasetype#-
Always
ChannelType .Announcement 5
Inherited from Guild: content, content, default, default, guild, id, last, last, name, nsfw, nsfw, parent, permission, position, rate, topic
GuildAnnouncementThreadChannel #
A thread inside an announcement channel, selected by type === Channel
interface GuildAnnouncementThreadChannel
extends GuildThreadChannelBaseinterface GuildAnnouncementThreadChannel
extends GuildThreadChannelBasetype#-
10
Inherited from Guild: archived, archive, auto, content, content, created, flags, guild, id, last, last, locked, member, membership, message, name, nsfw, nsfw, owner, parent, permission, position, rate, total
GuildCategoryChannel #
A grouping parent for community channels, selected by type === Channel
interface GuildCategoryChannel extends GuildChannelBaseinterface GuildCategoryChannel
extends GuildChannelBasetype#-
Always
ChannelType .Category 4
Inherited from Guild: content, content, guild, id, name, nsfw, nsfw, parent, permission, position
GuildChannelBase #
Fields every community channel shares, whatever its type
interface GuildChannelBasecontentoptional#Warning Level -
Channel content-warning override, when supplied
number contentoptional#Warning Text -
Custom content-warning text, with null inheriting
string | null nameoptional#-
Channel name, when Fluxer supplies one
string nsfwoptional#-
Effective adult-content setting from Fluxer's older NSFW field, when supplied
boolean nsfwoptional#Override -
Channel adult-content override, with null inheriting from its category then community
boolean | null parentoptional#Id -
Parent category ID, with null meaning top-level and omission meaning unavailable
string | null permissionoptional#Overwrites -
Explicit channel overwrites, not inherited or effective permissions
readonly PermissionOverwrite[] positionoptional#-
Server ordering position, not an immutable ordering guarantee
number type#-
A
Channelconstant, or "unknown" for a type this SDK version does not knowType Compare it to select the matching channel shape
0 | "unknown" | 2 | 4 | 16 | 5 | 10 | 12 | 11 | 15 | 998| 0 | "unknown" | 2 | 4 | 16 | 5 | 10 | 12 | 11 | 15 | 998
GuildForumChannel #
A forum channel, selected by type === Channel
interface GuildForumChannel extends GuildForumChannelBaseinterface GuildForumChannel
extends GuildForumChannelBasedefaultoptional#Forum Layout -
Default post layout, such as
ForumLayout .List number type#-
Always
ChannelType .Forum 15
Inherited from Guild: available, content, content, default, default, default, default, default, flags, guild, id, last, name, nsfw, nsfw, parent, permission, position, rate, topic
GuildForumChannelBase #
Fields shared by forum and media channels, which hold posts and no messages of their own
Fluxer leaves the post settings out of some payloads, such as the guild event, so each of them is optional and absence means unavailable rather than a default
interface GuildForumChannelBase extends GuildChannelBaseinterface GuildForumChannelBase
extends GuildChannelBasedefaultoptional#Auto Archive Minutes -
Stored default auto-archive period for posts, in minutes, with null meaning none is set
Fluxer does not apply it to a new post
number | null defaultoptional#Reaction Emoji -
Reaction that clients show on each post, with null meaning none
ForumDefaultReaction | null defaultoptional#Sort Order -
Default post order, such as
Forum, with null meaning none is setSort Order .Latest Activity number | null defaultoptional#Tag Setting -
Default tag matching of a post search, "match_some" or "match_all"
Another string Fluxer adds later is kept
string defaultoptional#Thread Rate Limit Per User -
Slowmode delay in seconds that a new post copies when its creation sets none
number flagsoptional#-
Channel flags, such as
ChannelFlags .Require Tag Unrecognized bits are kept
number lastoptional#Message Id -
ID of the newest post, with null meaning the channel never had one
string | null topicoptional#-
Posting guidelines, with null meaning none
string | null
Inherited from Guild: content, content, guild, id, name, nsfw, nsfw, parent, permission, position
GuildLinkChannel #
A channel that points to an external URL, selected by type === Channel
interface GuildLinkChannel extends GuildChannelBaseinterface GuildLinkChannel
extends GuildChannelBasetype#-
Always
ChannelType .Link 998 urloptional#-
Link URL, with null clearing it and omission meaning unavailable
string | null
Inherited from Guild: content, content, guild, id, name, nsfw, nsfw, parent, permission, position
GuildMediaChannel #
A media channel, a forum channel that can hide media download options, selected by type === Channel
interface GuildMediaChannel extends GuildForumChannelBaseinterface GuildMediaChannel
extends GuildForumChannelBasetype#-
Always
ChannelType .Media 16
Inherited from Guild: available, content, content, default, default, default, default, default, flags, guild, id, last, name, nsfw, nsfw, parent, permission, position, rate, topic
GuildPrivateThreadChannel #
A private thread inside a text channel, selected by type === Channel
interface GuildPrivateThreadChannel extends GuildThreadChannelBaseinterface GuildPrivateThreadChannel
extends GuildThreadChannelBasetype#-
Always
ChannelType .Private Thread 12
Inherited from Guild: archived, archive, auto, content, content, created, flags, guild, id, last, last, locked, member, membership, message, name, nsfw, nsfw, owner, parent, permission, position, rate, total
GuildPublicThreadChannel #
A public thread inside a text channel, or a post inside a forum or media channel, selected by type === Channel
interface GuildPublicThreadChannel extends GuildThreadChannelBaseinterface GuildPublicThreadChannel
extends GuildThreadChannelBaseappliedoptional#Tag Ids -
IDs of the forum tags applied to a forum or media post, at most 5
Absent on a thread in a text channel
readonly string[] type#-
Always
ChannelType .Public Thread 11
Inherited from Guild: archived, archive, auto, content, content, created, flags, guild, id, last, last, locked, member, membership, message, name, nsfw, nsfw, owner, parent, permission, position, rate, total
GuildTextChannel #
A community text conversation, selected by type === Channel
interface GuildTextChannel extends GuildTextChannelBaseinterface GuildTextChannel
extends GuildTextChannelBasetype#-
Always
ChannelType .Text 0
Inherited from Guild: content, content, default, default, guild, id, last, last, name, nsfw, nsfw, parent, permission, position, rate, topic
GuildTextChannelBase #
Message and topic fields shared by community text and announcement channels
interface GuildTextChannelBase extends GuildChannelBaseinterface GuildTextChannelBase
extends GuildChannelBasedefaultoptional#Auto Archive Minutes -
Stored default auto-archive period for threads in this channel, in minutes, such as
ThreadAuto Archive Minutes .One Day Fluxer sends it only when one is stored, and does not apply it to a new thread
number | null defaultoptional#Thread Rate Limit Per User -
Slowmode delay in seconds that a new thread in this channel copies when its creation sets none
Fluxer sends it only when one is stored
number lastoptional#Pin Timestamp -
ISO 8601 last-pin time, with null meaning no pins
string | null rateoptional#Limit Per User -
Slowmode delay in seconds
number topicoptional#-
Topic, with null clearing it and omission meaning unavailable
string | null
Inherited from Guild: content, content, guild, id, name, nsfw, nsfw, parent, permission, position
GuildThreadChannelBase #
Fields every thread shares, whatever its type
A thread has no permission overwrites of its own, because Fluxer computes its permissions from the parent channel
interface GuildThreadChannelBase extends GuildChannelBaseinterface GuildThreadChannelBase
extends GuildChannelBasearchived#-
Whether the thread is archived
An archived thread accepts no new members, reactions, pins or edits, and a message sent to it unarchives it
boolean archive#Timestamp -
ISO 8601 time the thread was last archived, unarchived or given a new
autoArchive Minutes It equals
createduntil the first of those changesAt string auto#Archive Minutes -
Inactivity period in minutes after which Fluxer archives the thread, such as
ThreadAuto Archive Minutes .Three Days number created#At -
ISO 8601 time the thread was created
string flagsoptional#-
Thread flags
Only
Channelcan be set, and only on a forum or media post. Unrecognized bits are keptFlags .Pinned number lastoptional#Pin Timestamp -
ISO 8601 last-pin time, with null meaning nothing was ever pinned
string | null membershipoptional#-
The bot's own membership, present when Fluxer reports that the bot is a member
Absence does not prove that the bot is not a member, because some reads leave it out
ThreadMembership messageoptional#Count -
Messages in the thread, excluding the first message of a forum post and deleted messages
number name#-
Thread name
string parent#Id -
Decimal ID of the text, announcement, forum or media channel that holds the thread, never a category
string rateoptional#Limit Per User -
Slowmode delay in seconds
number totaloptional#Message Sent -
Messages ever sent in the thread, excluding the first message of a forum post
Deleting a message does not lower it
number type#-
One of the three thread types
Each received shape has its own literal discriminant
10 | 11 | 12
Inherited from Guild: content, content, guild, id, nsfw, nsfw, permission, position
GuildUnknownChannel #
A community channel of a type this SDK version does not know, such as a type Fluxer adds later, selected by type === "unknown"
No Channel constant equals "unknown", so a Channel comparison always excludes this shape, and raw keeps the number Fluxer sent. The common optional fields of text, voice and link channels stay readable, so the channel remains usable without a type-specific shape. A later SDK version that knows the type returns the matching shape instead
interface GuildUnknownChannel
extends GuildChannelBase, Omit<
GuildTextChannelBase,
| "type" | "defaultAutoArchiveMinutes"
| "defaultThreadRateLimitPerUser"
>, Omit<
GuildVoiceChannel, "type"
>, Omit<GuildLinkChannel, "type">interface GuildUnknownChannel
extends GuildChannelBase, Omit<
GuildTextChannelBase,
| "type"
| "defaultAutoArchiveMinutes"
| "defaultThreadRateLimitPerUser"
>, Omit<
GuildVoiceChannel, "type"
>, Omit<GuildLinkChannel, "type">raw#Type -
Numeric channel type Fluxer sent, outside the known
ChannelconstantsType number type#-
Always "unknown"
"unknown"
Inherited from Guild: bitrate, rtc, user, voice
Inherited from Guild: content, content, guild, id, name, nsfw, nsfw, parent, permission, position
Inherited from Guild: last, last, rate, topic
Inherited from Guild: url
GuildVoiceChannel #
A community voice-call channel, selected by type === Channel
interface GuildVoiceChannel extends GuildChannelBaseinterface GuildVoiceChannel
extends GuildChannelBasebitrateoptional#-
Voice bitrate in bits per second, with null meaning no voice setting
number | null lastoptional#Message Id -
string | null type#-
Always
ChannelType .Voice 2 useroptional#Limit -
Voice user limit, with null meaning no voice setting
number | null voiceoptional#Connection Limit -
Voice connections permitted per user, with null meaning no voice setting
number | null
Inherited from Guild: content, content, guild, id, name, nsfw, nsfw, parent, permission, position
LinkChannelCreate #
Create a community channel that points readers to a URL
interface LinkChannelCreate extends ChannelCreateBaseinterface LinkChannelCreate
extends ChannelCreateBaseInherited from Channel: bitrate, content, content, name, nsfw, nsfw, parent, permission, rate, topic, url, user, voice
MediaChannelCreate #
Creates a media channel, a forum channel that can hide media download options
It has no layout setting
interface MediaChannelCreate extends ForumChannelCreateBaseinterface MediaChannelCreate
extends ForumChannelCreateBaseInherited from Forum: available, bitrate, content, content, default, default, default, default, default, flags, name, nsfw, nsfw, parent, permission, rate, topic, url, user, voice
TextChannelCreate #
Creates a text channel
interface TextChannelCreate
extends ChannelCreateBase, ThreadParentDefaultsinterface TextChannelCreate
extends ChannelCreateBase, ThreadParentDefaultsInherited from Channel: bitrate, content, content, name, nsfw, nsfw, parent, permission, rate, topic, url, user, voice
Inherited from Thread: default, default
ThreadCreate #
Settings for a new thread in a text or announcement channel, created with threads
Use threads to start a thread on an existing message, and threads in a forum or media channel. Unknown keys fail locally
interface ThreadCreateautooptional#Archive Minutes -
Inactivity period in minutes after which Fluxer archives the thread, one of the
Threadvalues, defaultAuto Archive Minutes ThreadAuto Archive Minutes .Three Days number invitableoptional#-
Whether members who cannot manage threads may add other such members, default true
Accepted only with type
ChannelType .Private Thread boolean name#-
Thread name, 1–100 UTF-16 code units after U+000C and U+202E removal and surrounding-whitespace trimming
The original string is sent unchanged
string rateoptional#Limit Per User -
Slowmode delay in seconds, an integer from 0 through 21,600
Omission copies the parent channel's
defaultThread Rate Limit Per User number typeoptional#-
Thread type, default
ChannelType .Public Thread A private thread is possible only in a text channel. In an announcement channel Fluxer creates an announcement thread for PublicThread or AnnouncementThread, and rejects AnnouncementThread in a text channel
10 | 12 | 11
ThreadEdit #
Change an existing thread or post with threads
Omitted fields stay unchanged, and an empty input or an unknown key fails locally. Fluxer lets the thread's creator rename it, archive it, lock it and change auto, invitable and applied, while unlocking, rate, pinned and moderated tags need Manage Threads. In a locked thread every change needs Manage Threads, and an archived thread accepts only a change that also sets archived to false
interface ThreadEditappliedoptional#Tag Ids -
Replace the tags of a forum or media post with these tag IDs, at most 5 decimal strings, with [] removing every tag
Fluxer rejects it on a public thread in a text channel and ignores it on private and announcement threads
readonly string[] archivedoptional#-
Archive the thread with true, or unarchive it with false
boolean autooptional#Archive Minutes -
Inactivity period in minutes after which Fluxer archives the thread, one of the
ThreadvaluesAuto Archive Minutes A change restarts the period at
archiveTimestamp number invitableoptional#-
Whether members who cannot manage threads may add other such members
Fluxer ignores it on threads that are not private
boolean nameoptional#-
Thread name, 1–100 UTF-16 code units after U+000C and U+202E removal and surrounding-whitespace trimming
The original string is sent unchanged
string pinnedoptional#-
Pin a forum or media post with true, or unpin it with false, by setting
ChannelFlags .Pinned A channel holds at most one pinned post. Fluxer rejects true on any other thread
boolean rateoptional#Limit Per User -
Slowmode delay in seconds, an integer from 0 through 21,600
Zero disables slowmode
number
ThreadFromMessageCreate #
Settings for a public thread started on an existing message with threads
The thread takes the message's ID, and a message can start only one thread. Unknown keys fail locally
interface ThreadFromMessageCreateautooptional#Archive Minutes -
Inactivity period in minutes after which Fluxer archives the thread, one of the
Threadvalues, defaultAuto Archive Minutes ThreadAuto Archive Minutes .Three Days number name#-
Thread name, 1–100 UTF-16 code units after U+000C and U+202E removal and surrounding-whitespace trimming
The original string is sent unchanged
string
ThreadMember #
One member of a thread
The object is frozen and does not update when the membership changes
interface ThreadMemberThreadMemberIterationQuery #
Limits and starting point for threads, reading thread members in ascending user ID order
The page option defaults to 100 with a range of 1 through 100
interface ThreadMemberIterationQuery extends UserIterationQueryinterface ThreadMemberIterationQuery
extends UserIterationQueryInherited from User: after, max, max, page
ThreadMemberPageQuery #
interface ThreadMemberPageQuery extends ThreadMemberQueryinterface ThreadMemberPageQuery
extends ThreadMemberQueryafteroptional#-
string
Inherited from Thread: with
ThreadMemberQuery #
Options for reading one thread member with threads
Unknown keys fail locally
interface ThreadMemberQuerywithoptional#Member -
Also read the user's community membership into
Thread, default falseMember .member The member is decoded with the thread's community, which the SDK takes from the channel cache when the thread is cached there and otherwise reads with one extra channel request inside the same deadline
boolean
ThreadMembership #
The bot's own membership in a thread, as Fluxer reports it beside the thread
A thread read, a thread list or an event only describes this membership at that moment
interface ThreadMembershipThreadParentDefaults #
Default settings for the threads that start inside a text, announcement, forum or media channel
Where threads are not active for a community (Guild is false), Fluxer ignores both settings on a text or announcement channel
interface ThreadParentDefaultsdefaultoptional#Auto Archive Minutes -
Auto-archive period in minutes that the channel stores for its threads: One of the
Threadvalues, or null to clear itAuto Archive Minutes Fluxer stores the value but does not apply it to a new thread, which uses
Threadunless its creation sets another periodAuto Archive Minutes .Three Days number | null
ThreadSearchIndexingPage #
Successful search response while Fluxer still builds the community's search index
Fluxer answers HTTP 202 and starts building it. Retry later with another explicit search, which the SDK never sends by itself
interface ThreadSearchIndexingPageindexing#-
True distinguishes this response from a
ThreadSearch Results Page true
ThreadSearchQuery #
Filters and paging for one threads request in a text, announcement, forum or media channel
Fluxer searches an index that can lag behind recent changes. The bot sees public threads, private threads it joined and, with Manage Threads, every private thread. Unknown keys and invalid values fail locally
interface ThreadSearchQueryarchivedoptional#-
True for only archived threads, false for only active threads
Omit it for both
boolean limitoptional#-
Maximum threads in the page, an integer from 1 through 25, default 25
number nameoptional#-
Text to look for in thread names, at most 100 UTF-16 code units
Omit it to match every name
string offsetoptional#-
Matching threads to skip, an integer from 0 through 9,975, default 0
number sortoptional#By -
Result order, default "last_message_time"
"relevance" | "last_message_time" | "archive_time" | "creation_time"| "relevance" | "last_message_time" | "archive_time" | "creation_time" sortoptional#Order -
Ascending or descending result order, default "desc"
"desc" | "asc" tagoptional#Ids -
Forum tag IDs to filter by, at most 20 decimal strings
A tag the channel no longer has matches no thread
readonly string[] tagoptional#Setting -
How
tagmatch: "match_some" for any tag, "match_all" for every tagIds Defaults to the channel's
default, otherwise "match_some"Tag Setting "match_some" | "match_all"
ThreadSearchResultsPage #
Search results once Fluxer's index can answer
The page and its threads and messages are frozen
interface ThreadSearchResultsPage<M extends MessageCore = Message>interface ThreadSearchResultsPage<
M extends MessageCore = Message
>first#Messages -
The first message of each returned post in a forum or media channel, using the client's
messageselectionFields Its
channelis the post's ID, and a post whose first message is gone has none. Empty in other channelsId readonly M[] has#More -
Whether more matching threads follow this page, read by raising offset
boolean indexing#-
False distinguishes this response from an indexing response
false threads#-
Matching threads in result order
Each thread the bot joined has membership set
readonly GuildThreadChannel[] total#-
Number of matching threads Fluxer reported with this response, which can change between requests
number
Threads#
Create threads and forum posts, change, list and search threads, and manage thread members
Every method uses HTTP without a gateway connection. Methods returning ResultAsync start immediately, while iterate starts reading when iteration begins. 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. Requests share the client's REST slots and queue limits.
The default deadline, rest (30,000 ms unless configured), includes capacity, rate-limit and retry waits.
Eligible reads retry transport and HTTP 500, 502, 503 or 504 failures at most twice.
Writes retry only confirmed HTTP 429 rejection, 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 a raw audit reason through
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.
Inputs are copied when called.
Expected failures return Channel, whose operation names the threads method, or Client.
Abort returns Cancelled after cleanup.
Unexpected failures reject with Sdk
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
): ResultAsync<
void,
ChannelOperationFailure | ConfigurationError | CancelledError
>addMember(
threadId: string,
userId: string,
options?: RequestOptions
): ResultAsync<
void,
| ChannelOperationFailure
| ConfigurationError
| CancelledError
>Parameters
threadId -
string userId -
string optionsoptional-
RequestOptions
- Returns
ResultAsync< void, ChannelOperationFailure | ConfigurationError | CancelledError >ResultAsync< void, | ChannelOperationFailure | ConfigurationError | CancelledError >
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
): ResultAsync<
GuildThreadChannel,
ChannelOperationFailure | ConfigurationError | CancelledError
>create(
channelId: string,
input: ThreadCreate,
options?: AuditedRequestOptions
): ResultAsync<
GuildThreadChannel,
| ChannelOperationFailure
| ConfigurationError
| CancelledError
>Parameters
channelId -
string input-
ThreadCreate optionsoptional-
AuditedRequestOptions
- Returns
ResultAsync< GuildThreadChannel, ChannelOperationFailure | ConfigurationError | CancelledError >ResultAsync< GuildThreadChannel, | ChannelOperationFailure | ConfigurationError | CancelledError >
import { ChannelType, ThreadAutoArchiveMinutes } from "@neontechspace/fluxerly"
export async function threadExample(client, channelId) {
const thread = await client.threads.create(channelId, {
name: "Release planning",
type: ChannelType.PrivateThread,
autoArchiveMinutes: ThreadAutoArchiveMinutes.OneDay,
})
if (thread.isErr())
throw thread.error
return client.messages.send(thread.value.id, "Planning starts here")
}
import { ChannelType, ThreadAutoArchiveMinutes, type Client } from "@neontechspace/fluxerly"
export async function threadExample(client: Client, channelId: string) {
const thread = await client.threads.create(channelId, {
name: "Release planning",
type: ChannelType.PrivateThread,
autoArchiveMinutes: ThreadAutoArchiveMinutes.OneDay,
})
if (thread.isErr()) throw thread.error
return client.messages.send(thread.value.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
): ResultAsync<
GuildThreadChannel,
ChannelOperationFailure | ConfigurationError | CancelledError
>createFromMessage(
message: MessageReference,
input: ThreadFromMessageCreate,
options?: AuditedRequestOptions
): ResultAsync<
GuildThreadChannel,
| ChannelOperationFailure
| ConfigurationError
| CancelledError
>Parameters
message-
MessageReference input-
ThreadFromMessageCreate optionsoptional-
AuditedRequestOptions
- Returns
ResultAsync< GuildThreadChannel, ChannelOperationFailure | ConfigurationError | CancelledError >ResultAsync< GuildThreadChannel, | ChannelOperationFailure | ConfigurationError | CancelledError >
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
): ResultAsync<
ForumPost<M>,
ChannelOperationFailure | ConfigurationError | CancelledError
>createPost(
channelId: string,
input: ForumPostCreate,
options?: AuditedRequestOptions
): ResultAsync<
ForumPost<M>,
| ChannelOperationFailure
| ConfigurationError
| CancelledError
>Parameters
channelId -
string input-
ForumPostCreate optionsoptional-
AuditedRequestOptions
- Returns
ResultAsync< ForumPost<M>, ChannelOperationFailure | ConfigurationError | CancelledError >ResultAsync< ForumPost<M>, | ChannelOperationFailure | ConfigurationError | CancelledError >
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
): ResultAsync<
GuildThreadChannel,
ChannelOperationFailure | ConfigurationError | CancelledError
>edit(
threadId: string,
input: ThreadEdit,
options?: AuditedRequestOptions
): ResultAsync<
GuildThreadChannel,
| ChannelOperationFailure
| ConfigurationError
| CancelledError
>Parameters
threadId -
string input-
ThreadEdit optionsoptional-
AuditedRequestOptions
- Returns
ResultAsync< GuildThreadChannel, ChannelOperationFailure | ConfigurationError | CancelledError >ResultAsync< GuildThreadChannel, | ChannelOperationFailure | ConfigurationError | CancelledError >
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): ResultAsync<
readonly GuildThreadChannel[],
ChannelOperationFailure | ConfigurationError | CancelledError
>fetchActive(
guildId: string,
options?: RequestOptions
): ResultAsync<
readonly GuildThreadChannel[],
| ChannelOperationFailure
| ConfigurationError
| CancelledError
>Parameters
guildId -
string optionsoptional-
RequestOptions
- Returns
ResultAsync< readonly GuildThreadChannel[], ChannelOperationFailure | ConfigurationError | CancelledError >ResultAsync< readonly GuildThreadChannel[], | ChannelOperationFailure | ConfigurationError | CancelledError >
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
): ResultAsync<
ArchivedThreadPage,
ChannelOperationFailure | ConfigurationError | CancelledError
>fetchArchived(
channelId: string,
query?: ArchivedThreadQuery,
options?: RequestOptions
): ResultAsync<
ArchivedThreadPage,
| ChannelOperationFailure
| ConfigurationError
| CancelledError
>Parameters
channelId -
string queryoptional-
ArchivedThreadQuery optionsoptional-
RequestOptions
- Returns
ResultAsync< ArchivedThreadPage, ChannelOperationFailure | ConfigurationError | CancelledError >ResultAsync< ArchivedThreadPage, | ChannelOperationFailure | ConfigurationError | CancelledError >
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
): ResultAsync<
ThreadMember,
ChannelOperationFailure | ConfigurationError | CancelledError
>fetchMember(
threadId: string,
userId: string,
query?: ThreadMemberQuery,
options?: RequestOptions
): ResultAsync<
ThreadMember,
| ChannelOperationFailure
| ConfigurationError
| CancelledError
>Parameters
threadId -
string userId -
string queryoptional-
ThreadMemberQuery optionsoptional-
RequestOptions
- Returns
ResultAsync< ThreadMember, ChannelOperationFailure | ConfigurationError | CancelledError >ResultAsync< ThreadMember, | ChannelOperationFailure | ConfigurationError | CancelledError >
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
): ResultAsync<
readonly ThreadMember[],
ChannelOperationFailure | ConfigurationError | CancelledError
>fetchMembers(
threadId: string,
query?: ThreadMemberPageQuery,
options?: RequestOptions
): ResultAsync<
readonly ThreadMember[],
| ChannelOperationFailure
| ConfigurationError
| CancelledError
>Parameters
threadId -
string queryoptional-
ThreadMemberPageQuery optionsoptional-
RequestOptions
- Returns
ResultAsync< readonly ThreadMember[], ChannelOperationFailure | ConfigurationError | CancelledError >ResultAsync< readonly ThreadMember[], | ChannelOperationFailure | ConfigurationError | CancelledError >
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
): AsyncIterable<
Result<
ThreadMember,
| ChannelOperationFailure | PaginationError
| ConfigurationError | CancelledError
>
>iterateMembers(
threadId: string,
query:
ThreadMemberIterationQuery,
options?: RequestOptions
): AsyncIterable<
Result<
ThreadMember,
| ChannelOperationFailure
| PaginationError
| ConfigurationError
| CancelledError
>
>Parameters
threadId -
string optionsoptional-
RequestOptions
- Returns
AsyncIterable< Result< ThreadMember, | ChannelOperationFailure | PaginationError | ConfigurationError | CancelledError > >AsyncIterable< Result< ThreadMember, | ChannelOperationFailure | PaginationError | ConfigurationError | CancelledError > >
Consume the iterable with a for await loop, which starts the first request. An expected failure yields one Err and ends iteration. Breaking the loop releases the buffered page. Abort interrupts pending request work and waits for cleanup
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): ResultAsync<
void,
ChannelOperationFailure | ConfigurationError | CancelledError
>join(
threadId: string,
options?: RequestOptions
): ResultAsync<
void,
| ChannelOperationFailure
| ConfigurationError
| CancelledError
>Parameters
threadId -
string optionsoptional-
RequestOptions
- Returns
ResultAsync< void, ChannelOperationFailure | ConfigurationError | CancelledError >ResultAsync< void, | ChannelOperationFailure | ConfigurationError | CancelledError >
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): ResultAsync<
void,
ChannelOperationFailure | ConfigurationError | CancelledError
>leave(
threadId: string,
options?: RequestOptions
): ResultAsync<
void,
| ChannelOperationFailure
| ConfigurationError
| CancelledError
>Parameters
threadId -
string optionsoptional-
RequestOptions
- Returns
ResultAsync< void, ChannelOperationFailure | ConfigurationError | CancelledError >ResultAsync< void, | ChannelOperationFailure | ConfigurationError | CancelledError >
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
): ResultAsync<
void,
ChannelOperationFailure | ConfigurationError | CancelledError
>removeMember(
threadId: string,
userId: string,
options?: RequestOptions
): ResultAsync<
void,
| ChannelOperationFailure
| ConfigurationError
| CancelledError
>Parameters
threadId -
string userId -
string optionsoptional-
RequestOptions
- Returns
ResultAsync< void, ChannelOperationFailure | ConfigurationError | CancelledError >ResultAsync< void, | ChannelOperationFailure | ConfigurationError | CancelledError >
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
): ResultAsync<
ThreadSearchPage<M>,
ChannelOperationFailure | ConfigurationError | CancelledError
>search(
channelId: string,
query?: ThreadSearchQuery,
options?: RequestOptions
): ResultAsync<
ThreadSearchPage<M>,
| ChannelOperationFailure
| ConfigurationError
| CancelledError
>Parameters
channelId -
string queryoptional-
ThreadSearchQuery optionsoptional-
RequestOptions
- Returns
ResultAsync< ThreadSearchPage<M>, ChannelOperationFailure | ConfigurationError | CancelledError >ResultAsync< ThreadSearchPage<M>, | ChannelOperationFailure | ConfigurationError | CancelledError >
VoiceChannelCreate #
Creates a voice channel
interface VoiceChannelCreate extends ChannelCreateBaseinterface VoiceChannelCreate
extends ChannelCreateBaseInherited from Channel: bitrate, content, content, name, nsfw, nsfw, parent, permission, rate, topic, url, user, voice
Type Aliases#
ArchivedThreadScope #
Which archived threads threads lists: Public threads, private threads, or only the private threads the bot joined
type ArchivedThreadScope = "public" | "private" | "joinedPrivate"type ArchivedThreadScope =
| "public" | "private"
| "joinedPrivate"ChannelCreate #
One supported community-channel creation request, with Fluxer positioning a new channel itself
type ChannelCreate =
| TextChannelCreate | AnnouncementChannelCreate
| VoiceChannelCreate | CategoryChannelCreate | LinkChannelCreate
| ForumChannelCreate | MediaChannelCreatetype ChannelCreate =
| TextChannelCreate
| AnnouncementChannelCreate
| VoiceChannelCreate
| CategoryChannelCreate
| LinkChannelCreate
| ForumChannelCreate
| MediaChannelCreateForumPostMessage #
The first message of a forum or media post: The content, embeds, files and stickers of messages, with allowed and flags
A post's first message cannot reply to another message, and has no nonce or text-to-speech setting
type ForumPostMessage =
MessageBody & Pick<MessageInput, "allowedMentions" | "flags">type ForumPostMessage =
& MessageBody
& Pick<
MessageInput,
"allowedMentions" | "flags"
>GuildChannel #
Settings and identity of a community channel returned by a read or gateway event, as one shape per channel type
Compare type with Channel constants to narrow to exactly one shape, such as channel before reading bitrate. Threads, forum channels and media channels have their own shapes, and is selects every thread type at once. A type this SDK version does not know is a Guild with type "unknown", its Fluxer number in raw and the common optional text, voice and link fields, so a switch on type that also handles "unknown" is exhaustive. The object is frozen and does not update when the channel changes. Optional fields may be unavailable rather than set to their creation defaults. This excludes private conversations, which use Direct
type GuildChannel =
| GuildTextChannel | GuildAnnouncementChannel
| GuildVoiceChannel | GuildCategoryChannel
| GuildAnnouncementThreadChannel | GuildPublicThreadChannel
| GuildPrivateThreadChannel | GuildForumChannel
| GuildMediaChannel | GuildLinkChannel | GuildUnknownChanneltype GuildChannel =
| GuildTextChannel
| GuildAnnouncementChannel
| GuildVoiceChannel
| GuildCategoryChannel
| GuildAnnouncementThreadChannel
| GuildPublicThreadChannel
| GuildPrivateThreadChannel
| GuildForumChannel
| GuildMediaChannel
| GuildLinkChannel
| GuildUnknownChannelGuildThreadChannel #
A thread: A channel inside a text, announcement, forum or media channel that holds its own messages
Compare type with Channel constants to narrow to one thread shape, or use is to tell threads from other community channels. The object is frozen and does not update when the thread changes
type GuildThreadChannel =
| GuildAnnouncementThreadChannel | GuildPublicThreadChannel
| GuildPrivateThreadChanneltype GuildThreadChannel =
| GuildAnnouncementThreadChannel
| GuildPublicThreadChannel
| GuildPrivateThreadChannelThreadSearchPage #
Successful outcome of one threads request
Check indexing before reading results
type ThreadSearchPage<M extends MessageCore = Message> =
ThreadSearchIndexingPage | ThreadSearchResultsPage<M>type ThreadSearchPage<
M extends MessageCore = Message
> =
| ThreadSearchIndexingPage
| ThreadSearchResultsPage<M>