On This Page

Guilds and Members

77 symbols from @neontechspace/fluxerly

Variables#

AuditLogActions#

Event categories for filtering a community's audit log, such as role changes, bans or invite creation

Pass a value as AuditLogQuery.actionType. These values describe recorded administrative actions, not gateway events

const AuditLogActions: Readonly<{ … }>
BotAdd#

A bot was added to the community

28
ChannelCreate#

A community channel was created

10
ChannelDelete#

A community channel was deleted

12
ChannelOverwriteCreate#

A channel-specific role or member permission overwrite was added

13
ChannelOverwriteDelete#

A channel-specific permission overwrite was removed

15
ChannelOverwriteUpdate#

An existing channel-specific permission overwrite changed

14
ChannelUpdate#

A community channel's settings changed

11
EmojiCreate#

A custom community emoji was created

60
EmojiDelete#

A custom community emoji was deleted

62
EmojiUpdate#

A custom community emoji's metadata changed

61
GuildUpdate#

Community-wide settings changed

1
InviteCreate#

An invitation code was created

40
InviteDelete#

An invitation code was revoked

42
InviteUpdate#

An existing invitation's settings changed

41
MemberBanAdd#

An account was banned from the community

22
MemberBanRemove#

An account's community ban was lifted

23
MemberDisconnect#

A member was disconnected from voice

27
MemberKick#

A member was removed from the community without a ban

20
MemberMove#

A member was moved between voice channels

26
MemberPrune#

A bulk membership-pruning action was recorded

21
MemberRoleUpdate#

A member's assigned roles changed

The entry's changes hold one change with key roles, whose oldValue and newValue are the member's full role ID lists before and after, as decimal strings. The added roles are those in newValue that oldValue lacks, and the removed roles are those in oldValue that newValue lacks. Fluxer records the same roles change on a MemberUpdate entry that changes the roles together with other settings

25
MemberUpdate#

A member's community-specific settings or moderation state changed, which can include a roles change as MemberRoleUpdate describes

24
MessageBulkDelete#

A bulk message-deletion action was recorded

73
MessageDelete#

A message deletion was recorded, potentially with a consolidated count

72
MessagePin#

A message was pinned

74
MessageUnpin#

A message was unpinned

75
RoleCreate#

A community role was created

30
RoleDelete#

A community role was deleted

32
RoleUpdate#

A community role's settings changed

31
StickerCreate#

A custom community sticker was created

90
StickerDelete#

A custom community sticker was deleted

92
StickerUpdate#

A custom community sticker's metadata changed

91
ThreadCreate#

A thread was created

110
ThreadDelete#

A thread was deleted

112
ThreadUpdate#

A thread's settings changed

111
WebhookCreate#

A webhook was created

50
WebhookDelete#

A webhook was deleted

52
WebhookUpdate#

An existing webhook's settings changed

51

DiscoveryCategories#

Named category IDs for listing a community in Fluxer's public community directory

Pass a value as categoryId to discovery.apply, discovery.edit or discovery.search. These categories concern public community listings, not instance endpoint discovery

const DiscoveryCategories: Readonly<{ … }>const DiscoveryCategories: Readonly<
  { … }
>
AnimeAndManga#

Category for anime and manga communities

6
ContentCreator#

Category for communities centered on content creators

5
Education#

Category for educational communities

3
Entertainment#

Category for entertainment communities

2
Gaming#

Category for gaming communities

0
MoviesAndTv#

Category for movie and television communities

7
Music#

Category for music communities

1
Other#

Category for communities outside the named categories

8
ScienceAndTechnology#

Category for science and technology communities

4

GuildContentWarningLevels#

Choose the community-wide warning policy through GuildEdit.contentWarningLevel

const GuildContentWarningLevels: Readonly<{ … }>const GuildContentWarningLevels: Readonly<
  { … }
>
ContentWarning#

Request a community-wide content warning

1
Inherit#

Use the inherited warning policy

0

GuildDefaultMessageNotifications#

Set the initial notification preference for new community members through GuildEdit.defaultMessageNotifications

Existing members can keep their own notification preferences

const GuildDefaultMessageNotifications: Readonly<{ … }>const GuildDefaultMessageNotifications: Readonly<
  { … }
>
AllMessages#

Notify for all messages by default

0
OnlyMentions#

Notify only when mentioned by default

1

GuildExplicitContentFilters#

Choose whose uploaded media Fluxer filters for explicit content through GuildEdit.explicitContentFilter

const GuildExplicitContentFilters: Readonly<{ … }>const GuildExplicitContentFilters: Readonly<
  { … }
>
AllMembers#

Apply filtering to all members

2
Disabled#

Do not enable this filtering policy

0
MembersWithoutRoles#

Apply filtering to members without assigned roles

1

GuildFeatureToggles#

Optional community behaviors that a bot with ManageGuild can replace through GuildEdit.featureToggles

Supply the complete desired set, not just toggles to add. Cloning must be enabled on the source community

const GuildFeatureToggles: Readonly<{ … }>const GuildFeatureToggles: Readonly<
  { … }
>
CloneEmojiEnabled#

Allow eligible callers to clone this community's emoji into another community

"CLONE_EMOJI_ENABLED"
CloneStickerEnabled#

Allow eligible callers to clone this community's stickers into another community

"CLONE_STICKER_ENABLED"
DetachedBanner#

Display the community banner in a separate section below the community header in the Fluxer app

"DETACHED_BANNER"
HideOwnerCrown#

Hide the community owner's crown indicator

"HIDE_OWNER_CROWN"
InvitesDisabled#

Disable community invitations

"INVITES_DISABLED"
TextChannelFlexibleNames#

Permit flexible text-channel names

Disabling this can sanitize existing channel names

"TEXT_CHANNEL_FLEXIBLE_NAMES"
VisitsEnabled#

Let people visit the community without joining it

Fluxer enables this for new communities

"VISITS_ENABLED"

GuildMemberJoinSourceTypes#

Fluxer's known sources for a community membership recorded by the indexed member-search service

const GuildMemberJoinSourceTypes: Readonly<{ … }>const GuildMemberJoinSourceTypes: Readonly<
  { … }
>
AdminForceAdd#

The member was added by an administrator

4
BotInvite#

The bot was added through a bot installation invitation

3
Creator#

The member created the community

0
Discovery#

The member joined through the public community directory

6
InstantInvite#

The member joined through a regular invitation code

1
VanityUrl#

The member joined through the community's custom invitation code

2

GuildMemberProfileFlags#

Known Fluxer community-profile bit flags

Other nonnegative 32-bit bits can be observed for forward compatibility

const GuildMemberProfileFlags: Readonly<{ … }>const GuildMemberProfileFlags: Readonly<
  { … }
>
AvatarUnset#

Mark the community-profile avatar as explicitly unset

1
BannerUnset#

Mark the community-profile banner as explicitly unset

2

GuildMfaLevels#

Values of Guild.mfaLevel, the community's two-factor requirement for moderation permissions

Only the community owner can change it in Fluxer, and GuildEdit does not change it. The owner is exempt, and a bot follows the two-factor enrolment of the account that owns its application

const GuildMfaLevels: Readonly<{ … }>

See https://github.com/fluxerapp/fluxer/blob/597116a0b4bf3a212789bdebe7f284babc33b445/packages/constants/src/GuildConstants.ts

Elevated#

Moderation permissions work only for the owner and for callers with two-factor authentication enabled

Other callers receive apiError.code twoFactorRequired

1
None#

No two-factor requirement for moderation permissions

0

GuildSplashCardAlignments#

Position the card over the invite splash image through GuildEdit.splashCardAlignment

const GuildSplashCardAlignments: Readonly<{ … }>const GuildSplashCardAlignments: Readonly<
  { … }
>
Center#

Center the invitation card over its background image

0
Left#

Place the invitation card on the left side of its background image

1
Right#

Place the invitation card on the right side of its background image

2

GuildSystemChannelFlags#

Suppress selected automatic messages in a community's system channel through GuildEdit.systemChannelFlags

const GuildSystemChannelFlags: Readonly<{ … }>const GuildSystemChannelFlags: Readonly<
  { … }
>
SuppressJoinNotifications#

Hide automatic member-join notifications

1

GuildVerificationLevels#

Values for the verification policy required before members can participate in a community

Use GuildEdit.verificationLevel to request a level. Fluxer enforces the account requirements for each level. Fluxer's verification check exempts the community owner, bots and members with assigned roles. Discoverable communities enforce at least Low even when the stored setting is None. These describe the verification check only, not all requirements for sending messages or joining voice

const GuildVerificationLevels: Readonly<{ … }>const GuildVerificationLevels: Readonly<
  { … }
>

See https://github.com/fluxerapp/fluxer/blob/597116a0b4bf3a212789bdebe7f284babc33b445/fluxer_api/src/api/utils/GuildVerificationUtils.ts

High#

Require Medium and, when join time is available, at least ten minutes of community membership

3
Low#

Require a verified email address for members who are not exempt

1
Medium#

Require Low and an account at least five minutes old

2
None#

No community-level verification requirement, except that discoverable communities still enforce Low

0

MemberMentionPreferences#

Fluxer's per-community reply-mention preferences

const MemberMentionPreferences: Readonly<{ … }>const MemberMentionPreferences: Readonly<
  { … }
>
NoPreference#

Express no preference about mentions on replies

0
PreferMention#

Prefer replies to mention this member

1
PreferNoMention#

Prefer replies not to mention this member

2

Interfaces#

AuditLogChange#

Before-and-after information for one field recorded by an audit entry

Inspect key to identify the setting, then oldValue and newValue for the recorded values. An omitted side is unavailable, not equivalent to null or an unchanged value

interface AuditLogChange
key#

Provider-defined field key, including future field names

string
newValue optional#

Value after the change

Omission is distinct from null

AuditLogChangeValue
oldValue optional#

Value before the change

Omission is distinct from null

AuditLogChangeValue

AuditLogEntry#

One recorded administrative action in a community, with any available actor, target, reason and changed settings

The record is frozen. Fetch current resources when a decision depends on their present state. The targetId field can contain an invite code, and reason can contain caller-authored text. Treat both as potentially sensitive

interface AuditLogEntry
actionType#

Recorded Fluxer action, compared with AuditLogActions values

An action Fluxer adds later keeps its number here

number
changes optional#

Changed fields, omitted when the action recorded none

readonly AuditLogChange[]
id#

Decimal audit-entry ID

string
options optional#

Action-specific context, omitted when no published option applies

AuditLogOptions
reason optional#

Recorded audit reason, omitted when the action had none

string
targetId optional#

Affected entity ID or invite code when Fluxer supplied one, not necessarily a decimal ID

string | null
userId optional#

Acting user ID when Fluxer supplied one

"0" is the Fluxer system user, which records a member removal, ban or ban removal that Fluxer staff made and, as a GuildUpdate, an invite pause that Fluxer places, lifts or lets expire

string | null

AuditLogIterationQueryBase#

Settings for reading filtered audit entries from newest to oldest, with explicit limits

interface AuditLogIterationQueryBase extends PaginationQueryinterface AuditLogIterationQueryBase
  extends PaginationQuery
before optional#

Exclusive decimal audit-entry cursor selecting older entries

string

Inherited from PaginationQuery: maxItems, maxPages, pageSize

AuditLogOptions#

Extra details for an audit record, such as the destination channel or number of affected items

Context fields remain absent when Fluxer did not supply them. Their meaning depends on the entry's actionType

interface AuditLogOptions
channelId optional#

Decimal channel ID relevant to the action

string
count optional#

Number of affected entities, including a consolidated deletion count

number
deleteMemberDays optional#

Legacy whole-day deletion value recorded for a member ban

string
deleteMessagesMs optional#

Milliseconds of recent messages deleted for a member ban, in the unit of BanInput deleteMessagesMs

Present only when Fluxer recorded a positive duration. The value is rounded to whole milliseconds. A source duration whose milliseconds are not a safe integer rejects the REST page or is a malformed gateway dispatch

number
id optional#

Decimal overwrite target or other action-specific ID

string
integrationType optional#

Provider integration-type value

number
inviterId optional#

Decimal ID of an invite creator

string
maxAgeSeconds optional#

Configured invite lifetime in seconds

number
maxUses optional#

Configured maximum invite uses

number
membersRemoved optional#

Number of memberships removed by a prune action

number
messageId optional#

Decimal message ID relevant to the action

string
roleName optional#

Role name recorded by an applicable action

string
temporary optional#

Whether the applicable recorded entity is temporary

boolean
type optional#

Channel or permission-overwrite type recorded by an applicable action

number
uses optional#

Invite use count recorded by an applicable action

number

AuditLogPage#

One filtered page of administrative records, with public user, token-free webhook and thread details used by that page

Match an entry's userId against users when Fluxer supplied that account. The related resources describe this page only. They do not update the cache or list every community user, webhook and thread

interface AuditLogPage
entries#

Entries in descending entry-ID order for filtered requests

readonly AuditLogEntry[]
threads#

Snapshots of the threads that this page's thread actions target and that still exist, without a cache write

Match an entry's targetId against their IDs. Empty when Fluxer listed none

readonly GuildThreadChannel[]
users#

Public user snapshots referenced by this page, without a user-cache write

readonly User[]
webhooks#

Token-free webhook snapshots referenced by this page

readonly AuditLogWebhook[]

AuditLogPermissionsDiff#

Permission names added or removed by a recorded role change

interface AuditLogPermissionsDiff
added#

Permission names added by the change

readonly string[]
removed#

Permission names removed by the change

readonly string[]

AuditLogQueryBase#

Common settings for one filtered remote audit-log page request

interface AuditLogQueryBase
actionType optional#

Action filter

Omit only with userId: Fluxer rewrites unfiltered message-delete records

AuditLogActionType
after optional#

Audit-entry ID for reading newer entries, excluding the entry itself

Cannot be combined with before

string
before optional#

Audit-entry ID for reading older entries, excluding the entry itself

Cannot be combined with after

string
limit optional#

Maximum returned entries, 1–100, default 50

number
userId optional#

Acting-user filter

Omit only with actionType: Fluxer rewrites unfiltered message-delete records

string

AuditLogWebhook#

Frozen, token-free webhook metadata accompanying an audit-log page

interface AuditLogWebhook
avatarHash optional#

Webhook avatar hash, or null when Fluxer supplied none

string | null
channelId optional#

Decimal destination channel ID, or null when Fluxer supplied none

string | null
guildId optional#

Decimal owning guild ID, or null when Fluxer supplied none

string | null
id#

Decimal webhook ID

string
name#

Webhook display name

string
type#

Fluxer webhook type: 1 incoming or 2 channel follower

1 | 2

AuditLogs#

Read a community's audit log with ViewAuditLog permission, without connecting the gateway

The fetchPage method starts immediately. The iterate method reads pages only when the loop requests them. The SDK does not cache audit records or create a permanent archive. Guilds' shared request limits, deadlines and eligible read retries apply. Input, permission and malformed-response failures return GuildOperationError. Abort waits for cleanup and returns CancelledError. Closing clients return ClientClosedError. Unexpected failures reject with SdkDefect. Records can change independently between reads

interface AuditLogs

fetchPage#

Fetch one filtered audit page with referenced users and webhook metadata that excludes tokens

Supply cursors and filters in AuditLogQuery. A deletion duration that cannot be represented as safe integer milliseconds fails with reason response, without returning a partial page. The returned page is frozen and remains in memory while the caller retains it

fetchPage(
    guildId: string,
    query: AuditLogQuery,
    options?: RequestOptions
): ResultAsync<
    AuditLogPage,
    ConfigurationError | GuildOperationFailure | CancelledError
>fetchPage(
  guildId: string,
  query: AuditLogQuery,
  options?: RequestOptions
): ResultAsync<
  AuditLogPage,
  | ConfigurationError
  | GuildOperationFailure
  | CancelledError
>

Parameters

guildId
string
options optional
RequestOptions

iterate#

Read filtered audit entries newest first, buffering one page and never prefetching

The maxItems option is required. The pageSize option defaults to 50 and accepts 1–100, maxPages defaults to the pages maxItems needs at pageSize plus 100, and timeoutMs applies to each page. An empty page or maxItems ends the scan, not a short page. Invalid traversal input, a stalled cursor or reaching the page budget fails with PaginationError. Remote failures keep auditLogs.fetchPage's errors. Deletion durations are rounded to whole milliseconds, and one whose milliseconds are not a safe integer fails its page before that page's entries are delivered. Each consumption is independent, and client closure releases the page and fails the next pull. Already delivered entries remain with the caller, and concurrent changes can prevent a complete scan. Use fetchPage instead to also receive referenced users or webhooks

iterate(
    guildId: string,
    query: AuditLogIterationQuery,
    options?: RequestOptions
): AsyncIterable<
    Result<
        AuditLogEntry,
        | PaginationError | ConfigurationError
        | GuildOperationFailure | CancelledError
    >
>iterate(
  guildId: string,
  query: AuditLogIterationQuery,
  options?: RequestOptions
): AsyncIterable<
  Result<
    AuditLogEntry,
    | PaginationError
    | ConfigurationError
    | GuildOperationFailure
    | CancelledError
  >
>

Parameters

guildId
string
options optional
RequestOptions

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

BanInput#

Ban an account from a community permanently or for a provider-managed duration, optionally deleting recent messages

The server owns expiry and any requested deletion job. Removing or expiring a ban does not restore membership or deleted messages

interface BanInput
deleteMessagesMs optional#

How far back to delete the user's recent messages, in milliseconds and whole seconds, 0–604,800,000 (seven days), default 0

Destructive asynchronous server job, separate from ban completion and not undone by unbanning

number
durationMs optional#

Ban length in milliseconds, in whole seconds: 0 or omitted for a permanent ban, or 60,000–63,072,000,000 (two years) for a provider-managed temporary ban

A value with a millisecond part is rejected as input naming input.durationMs. A duration command argument with wholeSeconds: true, min: 60_000 and max: 63_072_000_000 can be passed unchanged. Expiry does not rejoin the user. No SDK timer or automatic unban request is created. Provider database TTL expiry need not emit guildBanRemove. Reconcile with members.fetchBans rather than waiting for that event

number
reason optional#

Stored ban reason, up to 512 UTF-16 code units after U+000C and U+202E removal and surrounding-whitespace trimming

The original string is sent unchanged. Omit to use auditReason when supplied, otherwise no reason

string

DeletedMessageMember#

The author's community membership as Fluxer attached it to a message deletion, with the account fields left out

Fluxer removes the member's user from it, so it has no username or bot flag, and the SDK takes the community from the deletion's guildId and the account from its authorId. It is a frozen observation read from the community's state when Fluxer dispatched the deletion. It is neither a complete GuildMember nor written to the member cache, so it never refreshes or replaces a cached member

interface DeletedMessageMember
    extends Omit<GuildMember, "username" | "isBot">interface DeletedMessageMember
  extends Omit<
    GuildMember,
    "username" | "isBot"
  >

Inherited from GuildMember: accentColor, avatar, banner, communicationDisabledUntil, isDeafened, isMuted, joinedAt, mentionFlags, nickname, profileFlags, roleIds

Inherited from MemberReference: guildId, userId

Discovery#

Search Fluxer's public community directory and manage a community's directory application

This is separate from finding the instance's API and gateway endpoints. Calls start immediately without a gateway connection or directory cache. The default deadline, rest.defaultTimeoutMs (30,000 ms unless configured), includes request-capacity and rate-limit waits. Eligible GET failures retry at most twice

interface Discovery

Writes retry only confirmed HTTP 429 rejection. Input, HTTP and malformed-response failures return GuildOperationError. Client closure returns ClientClosedError. Abort waits for cleanup and returns CancelledError. Unexpected failures reject with SdkDefect. When the resolved instance reports discoveryEnabled false, search and the application writes fail with reason rejected, HTTP 400 and details.providerCode DISCOVERY_DISABLED. Application writes may publish or remove a listing and invalidate cached guild data. No eligibility check, approval, resubmission or joining is performed automatically. A failed write does not guarantee rollback

apply#

Submit a community's application to the public directory

ManageGuild, enabled discovery and current Fluxer eligibility are required. An existing pending or approved application fails remotely. Eligible verified or partnered communities may be approved immediately. The returned stored application does not guarantee approval or search visibility. An unknown outcome may already have submitted or published the listing. Check fetchStatus before trying again

apply(
    guildId: string,
    input: DiscoveryApplicationInput,
    options?: RequestOptions
): ResultAsync<
    DiscoveryApplication,
    ConfigurationError | GuildOperationFailure | CancelledError
>apply(
  guildId: string,
  input: DiscoveryApplicationInput,
  options?: RequestOptions
): ResultAsync<
  DiscoveryApplication,
  | ConfigurationError
  | GuildOperationFailure
  | CancelledError
>

Parameters

guildId
string
options optional
RequestOptions

edit#

Change supplied fields of a pending or approved directory application

ManageGuild and enabled discovery are required. At least one field must be supplied, and omitted fields remain unchanged. Tags use the input type's normalization and replacement rules. No old application is fetched or merged automatically. Updates to an approved listing can become public, while search-index updates can lag or partially fail

edit(
    guildId: string,
    input: DiscoveryApplicationEdit,
    options?: RequestOptions
): ResultAsync<
    DiscoveryApplication,
    ConfigurationError | GuildOperationFailure | CancelledError
>edit(
  guildId: string,
  input: DiscoveryApplicationEdit,
  options?: RequestOptions
): ResultAsync<
  DiscoveryApplication,
  | ConfigurationError
  | GuildOperationFailure
  | CancelledError
>

Parameters

guildId
string
options optional
RequestOptions

fetchCategories#

Fetch directory category IDs and Fluxer's category labels in provider order

This requires an authenticated client, not membership of a particular community or ManageGuild. No category copy is kept

fetchCategories(options?: RequestOptions): ResultAsync<
    readonly DiscoveryCategory[],
    ConfigurationError | GuildOperationFailure | CancelledError
>fetchCategories(
  options?: RequestOptions
): ResultAsync<
  readonly DiscoveryCategory[],
  | ConfigurationError
  | GuildOperationFailure
  | CancelledError
>

Parameters

options optional
RequestOptions

fetchStatus#

Fetch a community's current directory eligibility and application state

Use a decimal guild ID with ManageGuild permission. A result with eligible false can mean discovery is disabled or the member threshold is unmet, without distinguishing them. The resolved instance's discoveryEnabled value shows whether discovery is switched on. Eligibility can change before application. Reviewed or removed applications include their available reasons

fetchStatus(guildId: string, options?: RequestOptions): ResultAsync<
    DiscoveryStatus,
    ConfigurationError | GuildOperationFailure | CancelledError
>fetchStatus(
  guildId: string,
  options?: RequestOptions
): ResultAsync<
  DiscoveryStatus,
  | ConfigurationError
  | GuildOperationFailure
  | CancelledError
>

Parameters

guildId
string
options optional
RequestOptions

Fetch one page from the current public community directory

The limit option defaults to 24, and offset defaults to 0. Pages can change between reads, so offset-based scans are not a stable snapshot. This neither joins a community nor caches its directory entry, and needs no gateway connection. Eligible read failures are retried as described for this namespace

search(
    query?: DiscoverySearchQuery,
    options?: RequestOptions
): ResultAsync<
    DiscoverySearchPage,
    ConfigurationError | GuildOperationFailure | CancelledError
>search(
  query?: DiscoverySearchQuery,
  options?: RequestOptions
): ResultAsync<
  DiscoverySearchPage,
  | ConfigurationError
  | GuildOperationFailure
  | CancelledError
>

Parameters

query optional
DiscoverySearchQuery
options optional
RequestOptions

withdraw#

Withdraw a pending application or remove an approved directory listing

ManageGuild and enabled discovery are required. HTTP 204 succeeds with no value. A missing application is a remote error, not an assumed successful no-op. Fluxer removes the application record and may separately remove its feature or search entry. The community and its members remain, and the prior application is not restored. An unknown or partial outcome needs remote inspection and may require operator recovery, not blind replay

withdraw(guildId: string, options?: RequestOptions): ResultAsync<
    void,
    ConfigurationError | GuildOperationFailure | CancelledError
>withdraw(
  guildId: string,
  options?: RequestOptions
): ResultAsync<
  void,
  | ConfigurationError
  | GuildOperationFailure
  | CancelledError
>

Parameters

guildId
string
options optional
RequestOptions

DiscoveryApplication#

Current application or public listing returned by directory reads and writes

This frozen observation is not cached and includes no reviewer identities. Review and removal explanations are provider text, not fixed SDK diagnostics

interface DiscoveryApplication
appliedAt#

ISO 8601 application time

string
categoryId#

Observed provider category ID

number
description#

Observed directory description

string
guildId#

Decimal guild ID whose application was observed

string
guildNsfwLevel optional#

Provider NSFW level when supplied, null when unspecified, or an omitted field when not returned

This is not a client-computed content classification

number | null
primaryLanguage#

Observed primary language, null if absent

string | null
removalReason#

Provider removal explanation, null if absent

string | null
removedAt#

ISO 8601 removal time, null if not removed

string | null
reviewedAt#

ISO 8601 review time, null if not reviewed

string | null
reviewReason#

Provider review explanation, null if absent

string | null
status#

Provider state, currently pending, approved, rejected or removed

Future states are preserved

string
tags#

Frozen provider tags, not a mutable copy of submitted input

readonly string[]

DiscoveryApplicationInput#

Describe a community for a public community-directory application

Pass this input to discovery.apply after checking the community's current status and eligibility. An eligible verified or partnered community can become publicly listed immediately, without a later review step. String lengths use JavaScript UTF-16 code units, so some characters count as two

interface DiscoveryApplicationInput
import { DiscoveryCategories } from "@neontechspace/fluxerly"
export function discoveryExample(client, guildId) {
    return client.discovery.fetchStatus(guildId)
}
export function discoveryCategoriesExample(client) {
    return client.discovery.fetchCategories()
}
export function submitDirectoryApplication(client, guildId) {
    return client.discovery.apply(guildId, {
        description: "A community for discussing software development",
        categoryId: DiscoveryCategories.ScienceAndTechnology,
        primaryLanguage: "en-US",
        tags: ["programming"],
    })
}
export function editDirectoryTags(client, guildId) {
    return client.discovery.edit(guildId, { tags: ["programming", "typescript"] })
}
export function withdrawDirectoryApplication(client, guildId) {
    return client.discovery.withdraw(guildId)
}
import { DiscoveryCategories, type Client } from "@neontechspace/fluxerly"
export function discoveryExample(client: Client, guildId: string) {
    return client.discovery.fetchStatus(guildId)
}
export function discoveryCategoriesExample(client: Client) {
    return client.discovery.fetchCategories()
}
export function submitDirectoryApplication(client: Client, guildId: string) {
    return client.discovery.apply(guildId, {
        description: "A community for discussing software development",
        categoryId: DiscoveryCategories.ScienceAndTechnology,
        primaryLanguage: "en-US",
        tags: ["programming"],
    })
}
export function editDirectoryTags(client: Client, guildId: string) {
    return client.discovery.edit(guildId, { tags: ["programming", "typescript"] })
}
export function withdrawDirectoryApplication(client: Client, guildId: string) {
    return client.discovery.withdraw(guildId)
}
categoryId#

Integer 0–8, selected using DiscoveryCategories or fetchCategories

number
description#

Listing description, 10–300 UTF-16 code units

Fluxer may reject moderated content

string
primaryLanguage optional#

Primary language tag such as en-US, using the provider's case-sensitive supported BCP-47 codes

Defaults to en-US on apply, with the supported set checked by Fluxer

string
tags optional#

Up to ten tags, each 2–30 UTF-16 code units before and after normalization

Entries are copied by index when the operation starts. Start each tag with a letter or digit, followed by letters, digits, spaces, hyphens, underscores, plus or ampersand. The SDK trims and lowercases tags, collapses whitespace and removes duplicates like Fluxer. Omission on apply means an empty tag list

readonly string[]

DiscoveryCategory#

A category returned by discovery.fetchCategories, with Fluxer's display name rather than an SDK-translated label

interface DiscoveryCategory
id#

Numeric provider category ID to pass as categoryId when applying or editing

number
name#

Provider-supplied display name

string

DiscoveryCategoryCount#

Frozen category match count for the current directory filters, ignoring the selected category

interface DiscoveryCategoryCount
categoryId#

Provider category ID

number
count#

Current matching community count

number

DiscoveryGuild#

Public community listing returned by discovery.search

It contains directory-visible details and approximate counts, not the full Guild object or an invitation to join. The SDK does not retain this result in the guild cache

interface DiscoveryGuild
banner#

Banner hash, or null when the directory has none

string | null
categoryId#

Provider directory category ID

number
description#

Directory description, or null when absent

string | null
features#

Provider feature names

readonly string[]
icon#

Icon hash, or null when the directory has none

string | null
id#

Decimal guild ID

string
memberCount#

Approximate directory member count

number
name#

Directory-visible community name

string
onlineCount#

Approximate directory online-member count

number
primaryLanguage#

Provider primary language, or null when absent

string | null
tags#

Frozen provider directory tags

readonly string[]
verificationLevel#

Provider verification level

number

DiscoverySearchPage#

One page of public community listings, with the offset, page limit and number of current matches

Listings can change between requests, so total does not guarantee that paging will visit every listing exactly once

interface DiscoverySearchPage
categoryCounts#

Frozen current-filter category counts, ignoring DiscoverySearchQuery.categoryId

readonly DiscoveryCategoryCount[]
guilds#

Frozen directory results in provider order

readonly DiscoveryGuild[]
limit#

Effective request page limit

number
offset#

Effective zero-based request offset

number
total#

Provider-reported matching community count, which can change immediately

number

DiscoverySearchQuery#

Filter and choose one page of public community listings with discovery.search

Omit filters to use the provider's unfiltered directory and default ordering. Pages start at a numeric offset in the current results. If listings change, later pages can skip or repeat entries

interface DiscoverySearchQuery
categoryId optional#

Provider category ID from 0 through 8

number
limit optional#

Results per page from 1 through 48, defaulting to 24

number
offset optional#

Zero-based result offset, a nonnegative safe integer defaulting to 0

number
primaryLanguage optional#

Case-sensitive language tag such as en-US, 2–35 UTF-16 code units in the accepted BCP-47-style format

string
query optional#

Free-text query of at most 100 UTF-16 code units

string
sortBy optional#

Provider ordering

Omission uses Fluxer's default ordering

"memberCount" | "relevance" | "onlineCount"| "memberCount" | "relevance"
| "onlineCount"
tag optional#

Directory tag of at most 30 UTF-16 code units

string

DiscoveryStatus#

Current listing eligibility and application state returned by discovery.fetchStatus

A community may qualify now but fail a later submission if its status changes

interface DiscoveryStatus
application#

Current application or listing, null when no record exists

DiscoveryApplication | null
eligible#

False when directory discovery is disabled (see ResolvedInstance.discoveryEnabled) or the community fails current eligibility

boolean
minMemberCount#

Provider's current minimum member count, not a local configuration setting

number

Guild#

Identity and settings of a Fluxer guild, the community that owns channels, members and roles

Reads and gateway events return frozen copies that do not update as the community changes. Optional settings may be missing. A missing value is not necessarily the default used when creating a community

interface Guild
afkChannelId optional#

AFK voice-channel ID

Null disables it, omission means unavailable

string | null
afkTimeoutSeconds optional#

Seconds before Fluxer moves inactive voice participants to the AFK channel, omission means unavailable

number
banner optional#

Banner asset hash, not an image URL

Null means no banner, omission means unavailable

string | null
contentWarningLevel optional#

Whether Fluxer displays a community-wide content warning, omission means unavailable

GuildContentWarningLevel
contentWarningText optional#

Custom community-wide warning text

Null restores Fluxer's localized default, omission means unavailable

string | null
defaultMessageNotifications optional#

Default notification level for new members, omission means unavailable

GuildDefaultMessageNotification
embedSplash optional#

Background asset hash for embedded invites

Null means no splash, omission means unavailable

string | null
explicitContentFilter optional#

Explicit-media filtering level, omission means unavailable

GuildExplicitContentFilter
features#

Feature names supplied by Fluxer, including unknown future names

ANNOUNCEMENT_CHANNELS_DISABLED is observed here, not writable through GuildEdit.featureToggles

readonly string[]
icon optional#

Icon asset hash, not an image URL

Null means no icon, omission means unavailable

string | null
id#

Decimal guild ID

string
messageHistoryCutoff optional#

ISO 8601 historical-message cutoff

Null disables history for members without Read Message History

string | null
mfaLevel optional#

Two-factor requirement for moderation permissions, omission means unavailable

While it is GuildMfaLevels.Elevated, Fluxer rejects operations that need Administrator, BanMembers, KickMembers, ManageChannels, ManageGuild, ManageMessages, ManageRoles, ManageThreads, ManageWebhooks or ModerateMembers with HTTP 400 and apiError.code twoFactorRequired, unless the bot owns the community or the account that owns its application has two-factor authentication enabled. The SDK does not know that account's enrolment, so an elevated level signals a possible rejection rather than a certain one

GuildMfaLevel
name#

Current community name

string
nsfw optional#

Whether Fluxer marks the community as adult content, omission means unavailable

boolean
ownerId#

Decimal owner user ID, not a permission decision

string
splash optional#

Background asset hash for invites

Null means no splash, omission means unavailable

string | null
splashCardAlignment optional#

Invite splash-card alignment, omission means unavailable

GuildSplashCardAlignment
systemChannelFlags optional#

System-message suppression flags, omission means unavailable

number
systemChannelId optional#

System-message channel ID

Null disables it, omission means unavailable

string | null
verificationLevel optional#

Required member-verification level, omission means unavailable

The retired level 4 from older instances decodes as High (3), matching Fluxer's legacy normalization. Other values outside 0–3 make the response malformed

GuildVerificationLevel

See https://github.com/fluxerapp/fluxer/blob/597116a0b4bf3a212789bdebe7f284babc33b445/fluxer_api/src/api/models/Guild.ts

GuildBan#

Recorded ban details returned by members.fetchBans, including available reason, moderator and expiry

This frozen observation does not establish that the ban is still active at a later time

interface GuildBan extends MemberReferenceinterface GuildBan
  extends MemberReference
bannedAt#

ISO 8601 time the ban was recorded

string
expiresAt optional#

ISO 8601 expiry, null for permanent, omitted when unavailable

Database expiry need not emit a removal event

string | null
isBot#

Omitted upstream bot flag means false

boolean
moderatorId#

Decimal user ID of the moderator

"0" is the Fluxer system user, which records a ban that Fluxer staff placed

string
reason optional#

Stored reason, preserving absent versus null

string | null
username#

Account username returned with this ban

string

Inherited from MemberReference: guildId, userId

GuildCount#

Member totals returned for one requested community by Fluxer's gateway

This frozen result is not cached and can become outdated immediately. Fluxer includes only visible members in onlineCount, so it does not count every online account

interface GuildCount
guildId#

Requested guild ID as a positive decimal string with no leading zeroes, no greater than 9223372036854775807

string
memberCount#

Member count Fluxer reported for this community, never negative

number
onlineCount#

Visible online-member count Fluxer reported for this community, never negative

number

GuildCountsResult#

Results from one explicit request for several community counts, ordered to match the requested IDs

The omittedGuildIds field lists requested IDs for which Fluxer returned no count. Do not treat an omission as zero or infer missing membership, denied access or a provider failure. A community assigned to an unowned or unready shard fails the call with notConnected instead

interface GuildCountsResult
counts#

Frozen count entries in the caller's requested guild-ID order

readonly GuildCount[]
omittedGuildIds#

Frozen requested guild IDs without a returned entry, in caller input order

readonly string[]

GuildEdit#

Change an existing community's settings through the bot client

interface GuildEdit

Omitted properties remain unchanged and null clears the applicable setting. Fluxer requires ManageGuild and can reject feature-gated assets, invalid channel types, content, discoverability or historical-cutoff values after local validation. The encoded JSON body, including data URIs, cannot exceed 4,194,304 bytes. This does not create, delete, transfer ownership of, or change MFA requirements for a community

import { GuildDefaultMessageNotifications } from "@neontechspace/fluxerly"

export function guildSettingsExample(client, guildId) {
    return client.guilds.edit(guildId, {
        defaultMessageNotifications: GuildDefaultMessageNotifications.OnlyMentions,
    })
}
export function inspectCustomInvite(client, guildId) {
    return client.guilds.fetchVanityUrl(guildId)
}
export function setCustomInvite(client, guildId, code) {
    return client.guilds.editVanityUrl(guildId, code)
}
export function removeCustomInvite(client, guildId) {
    return client.guilds.editVanityUrl(guildId, null)
}
import { GuildDefaultMessageNotifications, type Client } from "@neontechspace/fluxerly"

export function guildSettingsExample(client: Client, guildId: string) {
    return client.guilds.edit(guildId, {
        defaultMessageNotifications: GuildDefaultMessageNotifications.OnlyMentions,
    })
}
export function inspectCustomInvite(client: Client, guildId: string) {
    return client.guilds.fetchVanityUrl(guildId)
}
export function setCustomInvite(client: Client, guildId: string, code: string) {
    return client.guilds.editVanityUrl(guildId, code)
}
export function removeCustomInvite(client: Client, guildId: string) {
    return client.guilds.editVanityUrl(guildId, null)
}
afkChannelId optional#

AFK voice-channel ID, or null to disable automatic AFK moves

string | null
afkTimeoutSeconds optional#

Integer AFK timeout in seconds from 60 through 3600

number
banner optional#

Image data URI for the community banner, or null to clear it

string | null
contentWarningLevel optional#

Whether Fluxer displays a community-wide content warning before entry

GuildContentWarningLevel
contentWarningText optional#

Warning text with 0–200 raw UTF-16 code units, or null to restore Fluxer's localized default

No text normalization is applied before validation

string | null
defaultMessageNotifications optional#

Default notification level for new members

GuildDefaultMessageNotification
embedSplash optional#

Image data URI for the embedded-invite splash, or null to clear it

string | null
explicitContentFilter optional#

Explicit-media filtering level

GuildExplicitContentFilter
featureToggles optional#

Complete desired set of bot-toggleable features, replacing every prior toggle in GuildFeatureToggles

Entries are copied by index when the operation starts. Include CloneEmojiEnabled and CloneStickerEnabled to allow cloning from this community. Omitting them disables that permission. Keep them in the list when changing another toggle if cloning should remain enabled. Fluxer enables VisitsEnabled for new communities, so include it to keep visits on. Omitting it turns visits off and ends current visits. Deprecated CLONE_EMOJI_DISABLED and CLONE_STICKER_DISABLED values are rejected, not inverted or translated. Fluxer preserves its managed, unknown and deprecated observed features. Disabling TextChannelFlexibleNames makes Fluxer sanitize existing channel names, an external side effect that is not rolled back if the response is lost. The SDK conservatively invalidates retained community-channel observations when this list disables that toggle

readonly GuildFeatureToggle[]
icon optional#

Image data URI for the community icon, or null to clear it

string | null
messageHistoryCutoff optional#

ISO 8601 cutoff for members without Read Message History, or null to disable their historical access

The value needs seconds and a Z or ±hh:mm offset, may have any fraction, and is sent unchanged. Other forms and impossible calendar dates are rejected before dispatch. Fluxer rejects timestamps before community creation or in the future

string | null
name optional#

Community name, 1–100 UTF-16 code units after U+000C and U+202E removal and surrounding-whitespace trimming

Normalization is validation-only, and the original string is sent unchanged

string
nsfw optional#

Mark or unmark the community as adult content

boolean
splash optional#

Image data URI for the invite splash, or null to clear it

string | null
splashCardAlignment optional#

Invite splash-card alignment

GuildSplashCardAlignment
systemChannelFlags optional#

Bitwise combination of GuildSystemChannelFlags

Zero clears all supported suppression flags

number
systemChannelId optional#

System-message channel ID, or null to disable system messages

string | null
verificationLevel optional#

Verification required before members can participate, from None (0) through High (3)

The retired phone-verification level 4 fails locally instead of being mapped to High

GuildVerificationLevel

GuildIterationQuery#

Limits and starting point for guilds.iterate, reading the bot's community memberships in ascending community-ID order

interface GuildIterationQuery extends PaginationQueryinterface GuildIterationQuery
  extends PaginationQuery
after optional#

Start after this decimal community ID, excluding it

Omit for the first page. Repeated results caused by a removed cursor fail with PaginationError reason cursorStalled

string
withCounts optional#

Ask Fluxer to include approximate member and presence counts on each page, default false

Counts and permissions can still be omitted. An omitted summary field remains unavailable, not zero

boolean

Inherited from PaginationQuery: maxItems, maxPages, pageSize

GuildListQuery#

One remote page of the authenticated bot's community memberships

interface GuildListQuery
after optional#

Existing membership cursor after which to list

Cannot be combined with before. If the cursor membership no longer exists, Fluxer can restart the page from the beginning

string
before optional#

Existing membership cursor before which to list

Cannot be combined with after. If the cursor membership no longer exists, Fluxer can restart the page from the beginning

string
limit optional#

Page size, integer 1–200, default 200

number
withCounts optional#

Request provider-supplied approximate member and presence counts

Defaults to false. Fluxer can omit requested counts and permissions, so omitted fields remain unavailable rather than zero

boolean

GuildListSummary#

Details of one community this bot belongs to, freshly returned by the REST membership list

This is not a cached Guild and does not update a cached Guild. The permissions and approximate counts remain absent when Fluxer omits them, including provider lookup failures. Absence is not zero or a complete-membership claim

interface GuildListSummary extends Guildinterface GuildListSummary
  extends Guild
approximateMemberCount optional#

Provider-supplied approximate member count when withCounts was requested and Fluxer could obtain it

number
approximatePresenceCount optional#

Provider-supplied approximate presence count when withCounts was requested and Fluxer could obtain it

number
permissions optional#

Raw unsigned permission bits that Fluxer made available for this membership

Omission is unavailable, not zero

bigint
threadsActive#

Whether Fluxer reports that threads, forum channels and media channels are available to the caller in this community

Fluxer marks only available communities, so false also covers a list that never marks any, such as one read with an OAuth access token

boolean

Inherited from Guild: afkChannelId, afkTimeoutSeconds, banner, contentWarningLevel, contentWarningText, defaultMessageNotifications, embedSplash, explicitContentFilter, features, icon, id, messageHistoryCutoff, mfaLevel, name, nsfw, ownerId, splash, splashCardAlignment, systemChannelFlags, systemChannelId, verificationLevel

GuildMember#

A user's membership in one community, including assigned roles, community-profile settings and available moderation state

This frozen snapshot comes from REST, member-add/update events, or the member Fluxer attaches to message, reaction, typing and voice-state events. It does not update in place or calculate permissions. Account identity and community-specific customization are distinct

interface GuildMember extends MemberReferenceinterface GuildMember
  extends MemberReference
accentColor optional#

Community-profile RGB accent color, preserving absent versus null

number | null
avatar optional#

Community avatar hash, preserving absent versus null

string | null
banner optional#

Community banner hash, preserving absent versus null

string | null
communicationDisabledUntil optional#

ISO 8601 timeout expiry, null when cleared, omitted when unavailable

A past timestamp is not an active timeout

string | null
isBot#

Omitted upstream bot flags mean false

boolean
isDeafened optional#

Whether Fluxer reports this member as community-deafened, omitted when the returned member data excludes voice flags

boolean
isMuted optional#

Whether Fluxer reports this member as community-muted, omitted when the returned member data excludes voice flags

boolean
joinedAt#

ISO 8601 community join timestamp

string
mentionFlags optional#

Community reply-mention preference, preserving absent versus null

MemberMentionPreference | null
nickname optional#

Community-specific display name

Null means no nickname, omission means unavailable

string | null
profileFlags optional#

Community-profile bitfield supplied by Fluxer, preserving absent versus null

number | null
roleIds#

Roles assigned to this member

The implicit everyone role is not listed and grants are not expanded here

readonly string[]
username#

Account username

string

Inherited from MemberReference: guildId, userId

GuildVanityUrl#

The community's current custom invitation code and shareable URL, or null fields when no custom code is set

This is distinct from individually created channel invites. The SDK does not retain this frozen result or verify that a later join can succeed

interface GuildVanityUrl
code#

Lowercase custom code, or null when removed

Share only with intended recipients

string | null
url#

Invite URL built from the selected instance's discovered invite base, or null without a code

Never included in SDK diagnostics

string | null

Guilds#

Read community settings and bot memberships, or use the optional guild cache

Most operations use HTTP and do not need a gateway connection. The fetchCounts method differs because it requires a ready gateway, as described on that method

interface Guilds

Requests share the client's REST or upload slots across all assigned shards, four per local shard by default, up to 64 (rest.concurrency). Attachment-download slots are separate, four by default (rest.mediaConcurrency). Both pools together allow 256 waiting requests or 4 MiB of queued JSON by default (rest.maxQueued and rest.queuedJsonMaxBytes)

The timeoutMs option defaults to the client's rest.defaultTimeoutMs, 30,000 unless configured, for the whole request, including waits. Reads retry transport failures and HTTP 500, 502, 503 or 504 at most twice. Delays are 125–250 ms, then 250–500 ms, or a longer Retry-After. Confirmed HTTP 429 waits are separate and never reset the deadline. Input, not-found, permission and malformed-success failures are not retried

Successful JSON is limited to 16 MiB before parsing, not total memory. A write's malformed or lost response can leave the write applied, without rollback

Expected failures return GuildOperationError or ClientClosedError. Abort returns CancelledError after cleanup. Unexpected SDK or cleanup failures reject with SdkDefect

deleteOwnMessages#

Irreversibly delete this bot's entire authored message history across one community

Use a decimal guild ID. Other authors' messages are preserved, and the bot stays in the community with the same roles

deleteOwnMessages(
    guildId: string,
    options: OwnMessageDeletionOptions
): ResultAsync<
    void,
    ConfigurationError | GuildOperationFailure | CancelledError
>deleteOwnMessages(
  guildId: string,
  options:
    OwnMessageDeletionOptions
): ResultAsync<
  void,
  | ConfigurationError
  | GuildOperationFailure
  | CancelledError
>

Success follows Fluxer's empty HTTP 202 response, not a completed-job report, deletion count or gateway event. The community may still contain new or concurrent messages. Deletion can be partial and is not atomic. There is no recovery token or automatic reconciliation

Bot credentials satisfy Fluxer's extra authentication checks, called sudo checks. No extra sudo fields or audit reason are accepted. Fluxer handles attachment removal without guaranteeing physical provider-storage or CDN erasure. The default deadline, rest.defaultTimeoutMs (30,000 ms unless configured), includes capacity and rate-limit waits. Only confirmed HTTP 429 rejection retries, and a 5xx or lost response never causes a replay. After dispatch, the entire enabled message cache is cleared and older pending reads cannot restore it. No gateway events are created locally. Cancellation or closure waits for request cleanup but cannot undo deletion. Options must include confirm: true. Without it, the call fails before any request with reason input and path options.confirm. Input, capacity and HTTP failures use GuildOperationError for guilds.deleteOwnMessages

Parameters

guildId
string
export function deleteOwnMessagesExample(client, channelId) {
    return client.messages.deleteOwnMessages(channelId, { confirm: true })
}
export function deleteOwnGuildMessagesExample(client, guildId) {
    return client.guilds.deleteOwnMessages(guildId, { confirm: true })
}
import type { Client } from "@neontechspace/fluxerly"
export function deleteOwnMessagesExample(client: Client, channelId: string) {
    return client.messages.deleteOwnMessages(channelId, { confirm: true })
}
export function deleteOwnGuildMessagesExample(client: Client, guildId: string) {
    return client.guilds.deleteOwnMessages(guildId, { confirm: true })
}

edit#

Change only supplied community settings that a bot may edit

Omitted fields remain unchanged, and no old settings are fetched or merged automatically

edit(
    guildId: string,
    input: GuildEdit,
    options?: AuditedRequestOptions
): ResultAsync<
    Guild,
    ConfigurationError | GuildOperationFailure | CancelledError
>edit(
  guildId: string,
  input: GuildEdit,
  options?: AuditedRequestOptions
): ResultAsync<
  Guild,
  | ConfigurationError
  | GuildOperationFailure
  | CancelledError
>

ManageGuild is required. Fluxer checks feature restrictions and constraints beyond local GuildEdit validation. Success returns the server's observed configuration, not gateway acknowledgement. Shared guild write deadlines and cancellation cleanup apply. Dispatched writes invalidate cached guild data even when the outcome is unknown. After a lost response, fetch before deciding to retry. No rollback is guaranteed

Parameters

guildId
string
input
GuildEdit
options optional
AuditedRequestOptions

editVanityUrl#

Set a community's custom invite code, replace it, or pass null to remove it

The code must already be lowercase, 2–32 ASCII letters or digits with single internal hyphens. No automatic normalization is performed

editVanityUrl(
    guildId: string,
    code: string | null,
    options?: AuditedRequestOptions
): ResultAsync<
    GuildVanityUrl,
    ConfigurationError | GuildOperationFailure | CancelledError
>editVanityUrl(
  guildId: string,
  code: string | null,
  options?: AuditedRequestOptions
): ResultAsync<
  GuildVanityUrl,
  | ConfigurationError
  | GuildOperationFailure
  | CancelledError
>

ManageGuild is required. Setting a code also requires the community's VANITY_URL feature. Reserved or taken codes fail remotely. Changing a code releases the old code and starts a new use count, and reclaiming the old code is not guaranteed. Success returns the code and URL without a hidden use-count read, access check or gateway acknowledgement

Shared guild deadlines and cleanup apply. Only confirmed HTTP 429 rejection retries, and dispatched writes invalidate guild snapshots. After an unknown outcome, call fetchVanityUrl before deciding how to recover. Provider-side partial changes may need operator recovery and are not rolled back automatically

Parameters

guildId
string
code
string | null
options optional
AuditedRequestOptions

fetch#

Fetch a community's identity and settings by decimal ID

Fluxer requires membership. The result is a frozen snapshot. This does not fetch or keep nested members, roles or channels, or infer counts or completeness

fetch(guildId: string, options?: RequestOptions): ResultAsync<
    Guild,
    ConfigurationError | GuildOperationFailure | CancelledError
>fetch(
  guildId: string,
  options?: RequestOptions
): ResultAsync<
  Guild,
  | ConfigurationError
  | GuildOperationFailure
  | CancelledError
>

Parameters

guildId
string
options optional
RequestOptions

fetchCounts#

Request fresh, visibility-filtered counts for 1–100 communities over the connected gateway

Use distinct positive decimal IDs without leading zeros, no greater than "9223372036854775807". The IDs are copied when execution starts. Every community must belong to a ready shard assigned to this client. An unassigned or unready shard fails with notConnected, not an omitted result. The result contains frozen counts and omittedGuildIds in requested order. An omitted entry is unavailable, not zero, and does not explain why it is missing. Community counts are separate observations, not one consistent snapshot. A missing whole reply fails with timeout

fetchCounts(
    guildIds: readonly string[],
    options?: RequestOptions
): ResultAsync<
    GuildCountsResult,
    ConfigurationError | CountOperationFailure | CancelledError
>fetchCounts(
  guildIds: readonly string[],
  options?: RequestOptions
): ResultAsync<
  GuildCountsResult,
  | ConfigurationError
  | CountOperationFailure
  | CancelledError
>

One call uses one of four client-wide gateway request slots until all shard commands and replies finish. The channels.fetchMemberCounts and members.iterateChunks methods share those slots. There is no waiting queue for request slots, so excess calls fail with busy. Commands may wait for gateway pacing, and a full internal command queue also fails with busy. The default 30,000 ms deadline includes registration, commands and all reply fragments. Cancellation or deadline expiry withdraws unsent commands and immediately releases local request capacity. Fluxer also limits member and presence work, so a local slot does not guarantee a reply. Only a gateway gap on a participating shard fails with connectionLost, and late replies are ignored. No REST fallback, connection, caching, polling or retries are performed. Expected failures use CountOperationError or ClientClosedError

Parameters

guildIds
readonly string[]
options optional
RequestOptions

Abort returns CancelledError after local cleanup but cannot cancel Fluxer's dispatched work. Unexpected failures reject with SdkDefect

export async function countsExample(client, guildId, channelId) {
    const guilds = await client.guilds.fetchCounts([guildId])
    const channels = await client.channels.fetchMemberCounts(guildId, [channelId])
    return { guilds, channels }
}
import type { Client } from "@neontechspace/fluxerly"
export async function countsExample(client: Client, guildId: string, channelId: string) {
    const guilds = await client.guilds.fetchCounts([guildId])
    const channels = await client.channels.fetchMemberCounts(guildId, [channelId])
    return { guilds, channels }
}

fetchPage#

Fetch one page of communities this bot belongs to, ordered by ascending guild ID

The limit option defaults to 200 and accepts 1–200. Choose either before or after, not both. Those cursors refer to existing memberships, and if a cursor community was removed, Fluxer may restart the page. The withCounts option defaults to false. Permission bits or requested approximate counts may be omitted, and an omitted value means unavailable, not zero. The frozen summaries do not read or populate the guild cache. No gateway connection or further page traversal is performed. Shared guild deadlines, retries and failures apply. This page is not a complete membership inventory or proof of matching gateway state

fetchPage(
    query?: GuildListQuery,
    options?: RequestOptions
): ResultAsync<
    readonly GuildListSummary[],
    ConfigurationError | GuildOperationFailure | CancelledError
>fetchPage(
  query?: GuildListQuery,
  options?: RequestOptions
): ResultAsync<
  readonly GuildListSummary[],
  | ConfigurationError
  | GuildOperationFailure
  | CancelledError
>

Parameters

query optional
GuildListQuery
options optional
RequestOptions
export async function guildListExample(client) {
    const page = await client.guilds.fetchPage({ withCounts: true })
    if (page.isErr())
        return page
    return page.value.map(({ id, permissions, approximateMemberCount }) => ({ id, permissions, approximateMemberCount }))
}
import type { Client } from "@neontechspace/fluxerly"
export async function guildListExample(client: Client) {
    const page = await client.guilds.fetchPage({ withCounts: true })
    if (page.isErr()) return page
    return page.value.map(({ id, permissions, approximateMemberCount }) => ({ id, permissions, approximateMemberCount }))
}

fetchVanityUrl#

Fetch a community's custom invite code, URL and use count with ManageGuild permission

A null code and URL means the community has no custom invite. The read is remote, without a vanity cache or gateway connection. Shared guild read retries, deadline, cancellation and failure rules apply

fetchVanityUrl(
    guildId: string,
    options?: RequestOptions
): ResultAsync<
    GuildVanityUrlUsage,
    ConfigurationError | GuildOperationFailure | CancelledError
>fetchVanityUrl(
  guildId: string,
  options?: RequestOptions
): ResultAsync<
  GuildVanityUrlUsage,
  | ConfigurationError
  | GuildOperationFailure
  | CancelledError
>

Parameters

guildId
string
options optional
RequestOptions

get#

Look up a community in the enabled guild cache, without a request or gateway connection

The result is undefined when caching is disabled or the entry is absent, expired or evicted. Cached data may be stale, so use fetch for a remote read. A hit becomes more recently used without extending expiry. An invalid ID is misuse: The default API throws GuildOperationError with reason input and the native API dies with it. A closing or closed client has no cache, so the result is undefined

get(guildId: string): Guild | undefinedget(
  guildId: string
): Guild | undefined

Parameters

guildId
string
Returns
Guild | undefined

Returns the value synchronously. Unexpected failures throw SdkDefect

iterate#

Read the bot's community memberships in ascending ID order, retaining one page and never prefetching

The maxItems option is required. The pageSize option defaults to 200, maxPages defaults to the pages maxItems needs at pageSize plus 100, and timeoutMs applies to each page. Iteration ends at maxItems or an empty page, not a short page. A repeated or backward ID after a removed cursor fails with PaginationError cursorStalled before delivering that page. Other traversal failures are input and pageLimit, and remote failures keep fetchPage's error. Each consumption copies inputs independently. Client closure releases the page and fails the next pull. The withCounts option applies to every page, but missing permission bits or counts remain unavailable, not zero. No gateway connection or cache fill is needed. Already delivered communities remain with the caller, and separate pages do not guarantee a consistent inventory

iterate(
    query: GuildIterationQuery,
    options?: RequestOptions
): AsyncIterable<
    Result<
        GuildListSummary,
        | PaginationError | ConfigurationError
        | GuildOperationFailure | CancelledError
    >
>iterate(
  query: GuildIterationQuery,
  options?: RequestOptions
): AsyncIterable<
  Result<
    GuildListSummary,
    | PaginationError
    | ConfigurationError
    | GuildOperationFailure
    | CancelledError
  >
>

Parameters

options optional
RequestOptions

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

export function guildMembershipsExample(client) {
    return client.guilds.iterate({ maxItems: 1000 })
}
import type { Client } from "@neontechspace/fluxerly"
export function guildMembershipsExample(client: Client) {
    return client.guilds.iterate({ maxItems: 1000 })
}

leave#

Remove this bot from one community while preserving its authored messages

HTTP 204 completes the removal, without waiting for a gateway event. The client remains usable for other communities

leave(guildId: string, options?: RequestOptions): ResultAsync<
    void,
    ConfigurationError | GuildOperationFailure | CancelledError
>leave(
  guildId: string,
  options?: RequestOptions
): ResultAsync<
  void,
  | ConfigurationError
  | GuildOperationFailure
  | CancelledError
>

Fluxer rejects owners or restricted memberships. Only confirmed HTTP 429 rejection retries. A lost response or cancellation can leave membership removed. Check fetch or the membership list to resolve an unknown outcome. Rejoining needs separate authorization

Successful writes and writes with unknown outcomes invalidate cached guild resources and conflicting pending reads. A confirmed leave also forgets this client's selected member presences, while an unknown outcome keeps that selection. Any dispatched attempt removes this community's cached channels and clears the message cache, because messages need not identify their community. Objects already returned to the caller stay unchanged. This neither deletes the community nor shuts down the client

Parameters

guildId
string
options optional
RequestOptions

MemberChunk#

One batch yielded by members.iterateChunks, with frozen member observations and optional visible presences

Batches arrive in Fluxer's order. The SDK does not combine them into a single snapshot or store them in the member cache. Already yielded batches remain available to the application if a later batch fails

interface MemberChunk
count#

Number of batches advertised for this response, from 1 through 100

It does not prove a complete community roster

number
guildId#

Requested guild ID as a positive decimal string with no leading zeroes, no greater than 9223372036854775807

string
index#

Zero-based batch index, delivered in provider order without gaps or duplicate indices

number
members#

Up to 1,000 frozen member observations

An empty response is one batch with an empty array

readonly GuildMember[]
omittedUserIds optional#

On the final batch of an explicit user-ID request, requested IDs without a returned member, in input order

Omission does not distinguish missing membership, access restrictions or a provider-side failure

readonly string[]
presences optional#

Present only when requested, including an empty array when Fluxer supplied no visible presences

Contains only members in this batch, with the request's guild context. No live subscription is created

readonly PresenceUpdate[]

MemberChunkOptions#

Set how long a member stream can run and how many unread bytes it can hold

The SDK checks and copies these settings when consumption starts, not when the iterator or native Stream is created. One client admits one member stream across its local shards, sharing four request slots with count calls. It sends at most 12 member requests in any 11 seconds, keeping under Fluxer's limit of 12 per account in 10 seconds. The children of one supervisor keep that count together. Ending the stream early releases the SDK's local request slot but cannot stop work Fluxer has already started

interface MemberChunkOptions extends OperationOptionsinterface MemberChunkOptions
  extends OperationOptions

Aborting the signal releases local intake even while consumption is paused, not remote provider work

maxPendingBytes optional#

Maximum source-JSON bytes counted for unread batches, a positive safe integer, default 4,194,304 (4 MiB)

Includes a single batch delivered directly to a waiting reader. Overflow fails rather than dropping batches. This bounds the SDK's batch byte accounting, not total JavaScript heap, decoding overhead or caller-held batches

number
timeoutMs optional#

Total milliseconds from when the SDK accepts the request until the final batch arrives, including waits for gateway pacing, integer 1–2,147,483,647, default 30,000

Pausing consumption does not pause this deadline or the provider. No timeout applies after the full response arrives

number

Inherited from OperationOptions: signal

MemberProfileEdit#

Change this bot's nickname and community-specific profile in one community

interface MemberProfileEdit

Omitted properties are not sent and leave the provider value unchanged. Null clears the corresponding property. Fluxer can silently ignore avatar, banner, bio and accentColor when its per-community-profile customization feature is unavailable, so an HTTP success does not establish those changes. Its response does not expose bio or pronouns, leaving those fields write-only through this SDK. Fluxer performs its own image, content, verification and permission checks after this SDK validates the input shape

accentColor optional#

RGB integer from 0 through 16,777,215, or null to clear

Fluxer may silently ignore it

number | null
avatar optional#

Image data URI, or null to clear

Fluxer validates the decoded image and may silently ignore it

string | null
banner optional#

Image data URI, or null to clear

Fluxer validates the decoded image and may silently ignore it

string | null
bio optional#

Community-profile biography, 1–320 normalized UTF-16 code units, or null to clear

The response does not return it. Validation removes U+000C and U+202E and trims surrounding whitespace. The original string is sent unchanged

string | null
mentionFlags optional#

Per-community reply-mention preference, or null to clear the override

MemberMentionPreference | null
nickname optional#

Community nickname, or null to clear

A raw empty string fails. A nonempty string containing only trim whitespace is accepted as Fluxer's clear value. Otherwise, validation removes U+000C and U+202E, trims surrounding whitespace, and requires 1–32 UTF-16 code units. The original string is sent unchanged

string | null
profileFlags optional#

Nonnegative 32-bit profile bitfield, or null to clear

Known values are GuildMemberProfileFlags

number | null
pronouns optional#

Community-profile pronouns, 1–40 normalized UTF-16 code units, or null to clear

The response does not return them. Validation removes U+000C and U+202E and trims surrounding whitespace. The original string is sent unchanged

string | null

MemberQuery#

Select one REST page of community members, for example to inspect a bounded set or continue after a previous user ID

Use members.iterate for bounded multi-page traversal. A page alone is not a complete guild snapshot

interface MemberQuery
after optional#

Return user IDs greater than this decimal ID

string
limit optional#

Maximum member count, integer 1–1000, default 100

number

MemberReference#

Address one user's membership in one community for member reads and changes

The same account can have different nicknames, roles and moderation state in different communities. This contains IDs only and does not retain a client or fetch the membership

interface MemberReference
guildId#

Decimal guild ID

string
userId#

Decimal user ID

string

MemberSearchHit#

A member matched by the search index, with indexed identity, roles and available membership-source details

Call members.fetch with guildId and userId when current member details are needed. This frozen hit does not populate the member cache and cannot establish current membership or permissions

interface MemberSearchHit
discriminator#

Indexed four-digit account discriminator

string
displayName#

Indexed account-wide display name, null when absent

The display.name helper reads it

string | null
guildId#

Decimal guild ID, equal to the requested guild

string
inviterId#

Decimal inviter user ID, or null when absent or redacted because the caller lacks ManageGuild

string | null
isBot#

Indexed bot classification

boolean
joinedAtSeconds#

Indexed community-join time as a nonnegative whole Unix-second value

number
joinSourceType#

Indexed membership source, or null when absent or redacted because the caller lacks ManageGuild

GuildMemberJoinSourceType | null
nickname#

Indexed community nickname, null when absent

string | null
roleIds#

Explicit indexed role IDs, not effective permissions or the implicit everyone role

readonly string[]
sourceInviteCode#

Indexed invite code, or null when absent or redacted because the caller lacks ManageGuild

string | null
userId#

Decimal member user ID

string
username#

Indexed account username

string

MemberSearchIterationLimits#

Limit how much work members.iterateSearch may perform while reading matching indexed members

The maxItems option is required through PaginationQuery. Each consumption requests pages only as needed and yields each user at most once, but concurrent index changes can skip members. Index-building pages fail with PaginationError/indexing, and an empty page that cannot advance fails with cursorStalled rather than silently reporting completion

interface MemberSearchIterationLimits extends PaginationQueryinterface MemberSearchIterationLimits
  extends PaginationQuery
pageSize optional#

Indexed hits requested per POST, 1–100 and default 100

number

Inherited from PaginationQuery: maxItems, maxPages

MemberSearchPage#

Matching indexed members and counts from one search request

Counts and order describe a changing index, not a complete membership snapshot. When indexing is true, Fluxer accepted the request but is building the community index. Wait and issue a new page request rather than treating that empty page as completion

interface MemberSearchPage
guildId#

Decimal guild ID, equal to the requested guild

string
indexing#

Whether Fluxer reported that it is currently building this community's member index

boolean
members#

Frozen indexed hit observations

This does not admit or replace member-cache entries

readonly MemberSearchHit[]
pageResultCount#

Number of returned members in this page

number
totalResultCount#

Indexed matches observed for this request, which can change before a later offset page

number

MemberSearchQuery#

Search Fluxer's community member index by text, roles, join dates or how members joined

Search results may lag behind current membership and profile changes. They contain only search fields, not complete GuildMember objects, and do not come from the SDK cache. Fluxer requires a member-management permission for every search. Join-source and source-invite filters require ManageGuild. The SDK checks for ManageGuild before sending those filters because Fluxer would otherwise ignore them without an error. Filter arrays are copied by index when the operation starts. Timestamps use whole Unix seconds. Unknown keys and values outside the documented bounds fail locally before the POST. The provider can return an empty, non-indexing page when its search service is unavailable

interface MemberSearchQuery
export function memberSearchExample(client, guildId) {
    const page = client.members.search(guildId, { query: "alex", roleIds: ["10"] })
    const hits = client.members.iterateSearch(guildId, { isBot: false }, { maxItems: 100 })
    return { page, hits }
}
import type { Client } from "@neontechspace/fluxerly"

export function memberSearchExample(client: Client, guildId: string) {
    const page = client.members.search(guildId, { query: "alex", roleIds: ["10"] })
    const hits = client.members.iterateSearch(guildId, { isBot: false }, { maxItems: 100 })
    return { page, hits }
}
isBot optional#

Include only bot or only non-bot indexed members

boolean
joinedAtAfterSeconds optional#

Include members whose indexed community-join time is at or after this nonnegative whole Unix-second value

number
joinedAtBeforeSeconds optional#

Include members whose indexed community-join time is at or before this nonnegative whole Unix-second value

number
joinSourceTypes optional#

Require one of these indexed membership sources

At most 10 distinct values and requires ManageGuild

readonly GuildMemberJoinSourceType[]
limit optional#

Results in this offset page, 1–100, default 25

number
offset optional#

Zero-based indexed-result offset, a nonnegative safe integer, default 0

It does not mark a fixed position in an unchanging result set

number
query optional#

Text matched by Fluxer against indexed usernames, display names, nicknames, discriminators and user IDs

At most 100 UTF-16 code units

string
roleIds optional#

Require every supplied role ID

At most 10 distinct decimal role IDs. An empty list has no filtering effect

readonly string[]
sortBy optional#

Fluxer relevance or indexed join-time ordering

Omission uses indexed join time

"joinedAt" | "relevance"
sortOrder optional#

Indexed join-time direction

Omission uses descending. Fluxer ignores this when sorting by relevance

"desc" | "asc"
sourceInviteCodes optional#

Require one of these indexed invite codes

At most 10 distinct values and requires ManageGuild. Codes are never included in SDK diagnostics

readonly string[]
userCreatedAtAfterSeconds optional#

Include members whose indexed account-creation time is at or after this nonnegative whole Unix-second value

number
userCreatedAtBeforeSeconds optional#

Include members whose indexed account-creation time is at or before this nonnegative whole Unix-second value

number

Members#

Read community members, search indexed members, moderate or ban them and change role assignments

HTTP methods use Guilds' shared request limits, deadlines and failure rules. The iterateChunks method uses the connected gateway instead

interface Members

Returned members are frozen snapshots, not live objects. The cache.members setting can retain observations, without downloading the community automatically or predicting permissions

Writes retry only confirmed HTTP 429 rejection. Cancellation cannot undo a dispatched change. The setRoles, editSelf, setNickname, addRole and removeRole methods accept AuditedRequestOptions. Member reads and searches reject auditReason. Moderation methods keep their more specific audited option types

addRole#

Grant one role to a member without replacing their other roles

Use a decimal role ID, excluding the implicit everyone role. Fluxer requires ManageRoles and checks hierarchy. HTTP 204 succeeds with no value, not an event acknowledgement or proof the role was previously absent. Fluxer currently accepts auditReason on member-role add and remove routes without retaining it in an audit entry. The example collects one future reaction addition before assigning the role. It needs a connected client, an existing message in this community and a role the bot can assign, and a timeout can collect nothing. It is not a persistent reaction-role system and does not revoke roles on removal

addRole(
    member: MemberReference,
    roleId: string,
    options?: AuditedRequestOptions
): ResultAsync<
    void,
    ConfigurationError | GuildOperationFailure | CancelledError
>addRole(
  member: MemberReference,
  roleId: string,
  options?: AuditedRequestOptions
): ResultAsync<
  void,
  | ConfigurationError
  | GuildOperationFailure
  | CancelledError
>

Parameters

roleId
string
options optional
AuditedRequestOptions
import { orThrow } from "@neontechspace/fluxerly"
export async function assignRoleExample(client, message, guildId, roleId) {
    await using collector = client.messages.collectReactions(message, {
        emoji: "✅",
        // A failed assignment is returned as an Err, which ends collection like a throw
        onReaction: (reaction, signal) => client.members.addRole({ guildId, userId: reaction.userId }, roleId, { signal }),
    })
    return orThrow(await collector.result())
}
import { orThrow, type Client, type MessageReference } from "@neontechspace/fluxerly"
export async function assignRoleExample(client: Client, message: MessageReference, guildId: string, roleId: string) {
    await using collector = client.messages.collectReactions(message, {
        emoji: "✅",
        // A failed assignment is returned as an Err, which ends collection like a throw
        onReaction: (reaction, signal) =>
            client.members.addRole({ guildId, userId: reaction.userId }, roleId, { signal }),
    })
    return orThrow(await collector.result())
}

ban#

Ban a user from a community, including a user who is not currently a member

Pass decimal guildId and userId. The default ban is permanent and deletes no messages. Fluxer requires BanMembers and checks role hierarchy. In a community whose mfaLevel is GuildMfaLevels.Elevated, the call fails with reason rejected, HTTP 400 and apiError.code twoFactorRequired, unless the bot owns the community or its application owner has two-factor authentication enabled. HTTP 204 succeeds with no value, without waiting for an event

ban(
    target: MemberReference,
    input?: BanInput,
    options?: AuditedRequestOptions
): ResultAsync<
    void,
    ConfigurationError | GuildOperationFailure | CancelledError
>ban(
  target: MemberReference,
  input?: BanInput,
  options?: AuditedRequestOptions
): ResultAsync<
  void,
  | ConfigurationError
  | GuildOperationFailure
  | CancelledError
>

Only confirmed HTTP 429 rejection retries. A dispatched failure can leave the ban or queued message deletion applied. Dispatched actions invalidate the cached member even on rejection. When deleteMessagesMs is above 0, the user's cached messages are removed from every community, because cached messages need not carry a guild ID. The deletion job can finish later, so a later cache hit does not prove a message survived

Fluxer bans can also block rejoining through IP or email checks. Unbanning restores neither deleted messages nor membership. Shared guild deadlines, failures and cleanup apply, and cancellation cannot undo a dispatched ban

Parameters

input optional
BanInput
options optional
AuditedRequestOptions

clearTimeout#

Clear a member's timeout and return the HTTP member snapshot

This sends null rather than a negative duration. The timeout method's permissions, deadline, execution, cache and failure rules apply. No gateway event is awaited

clearTimeout(
    target: MemberReference,
    options?: TimeoutOptions
): ResultAsync<
    GuildMember,
    ConfigurationError | GuildOperationFailure | CancelledError
>clearTimeout(
  target: MemberReference,
  options?: TimeoutOptions
): ResultAsync<
  GuildMember,
  | ConfigurationError
  | GuildOperationFailure
  | CancelledError
>

Parameters

options optional
TimeoutOptions

disconnect#

Disconnect one observed voice connection, or all active connections if target.connectionId is omitted

MoveMembers is required. The returned member follows HTTP, without waiting for voiceStateUpdate. A repeated call can fail because the member is no longer connected. The move method's deadline, audit, permission and cache rules apply. An unknown outcome needs later observations rather than blind replay

disconnect(
    target: VoiceConnectionReference,
    options?: AuditedRequestOptions
): ResultAsync<
    GuildMember,
    ConfigurationError | GuildOperationFailure | CancelledError
>disconnect(
  target: VoiceConnectionReference,
  options?: AuditedRequestOptions
): ResultAsync<
  GuildMember,
  | ConfigurationError
  | GuildOperationFailure
  | CancelledError
>

Parameters

options optional
AuditedRequestOptions

editSelf#

Change this bot's community profile, not its global account or another member

Omitted fields stay unchanged, and null clears an override. An empty input or unknown key fails locally. Fluxer checks permissions and field-specific rate limits. Avatar, banner, bio and accentColor can be silently ignored without the community-profile entitlement. The returned member excludes bio and pronouns, so success does not prove those fields were stored. Writes with unknown outcomes or cancellation remove the affected cache entry. A definite rejection preserves the old snapshot

editSelf(
    guildId: string,
    input: MemberProfileEdit,
    options?: AuditedRequestOptions
): ResultAsync<
    GuildMember,
    ConfigurationError | GuildOperationFailure | CancelledError
>editSelf(
  guildId: string,
  input: MemberProfileEdit,
  options?: AuditedRequestOptions
): ResultAsync<
  GuildMember,
  | ConfigurationError
  | GuildOperationFailure
  | CancelledError
>

Parameters

guildId
string
options optional
AuditedRequestOptions

fetch#

Fetch one community member by decimal guildId and userId

A missing member fails with reason notFound rather than an empty result

fetch(
    member: MemberReference,
    options?: RequestOptions
): ResultAsync<
    GuildMember,
    ConfigurationError | GuildOperationFailure | CancelledError
>fetch(
  member: MemberReference,
  options?: RequestOptions
): ResultAsync<
  GuildMember,
  | ConfigurationError
  | GuildOperationFailure
  | CancelledError
>

Parameters

options optional
RequestOptions

fetchBans#

Fetch a community's current full ban list with BanMembers permission

Results are frozen. There is no ban cache, pagination or guaranteed order. Separate reads are not one consistent snapshot. Shared guild deadlines and read retries apply. A malformed response fails rather than producing a partial list

fetchBans(guildId: string, options?: RequestOptions): ResultAsync<
    readonly GuildBan[],
    ConfigurationError | GuildOperationFailure | CancelledError
>fetchBans(
  guildId: string,
  options?: RequestOptions
): ResultAsync<
  readonly GuildBan[],
  | ConfigurationError
  | GuildOperationFailure
  | CancelledError
>

Parameters

guildId
string
options optional
RequestOptions

fetchCanManage#

Check whether the bot, or the member named by options.actorUserId, is above a target member in the community's role hierarchy

Pass actorUserId to check a moderator who ran a command, such as { actorUserId: message.author.id }. The helper fetches fresh guild, actor member, target member and role data in parallel, then applies hierarchy.canManage. One default deadline, rest.defaultTimeoutMs (30,000 ms unless configured), covers those reads. Failure or cancellation waits for sibling request cleanup. No cache is read first and no helper result is retained, but underlying reads can still populate enabled resource caches. A true result covers only hierarchy using four separate observations that may change before an action. It does not check permission bits or MFA, authorize an action or perform it

fetchCanManage(
    target: MemberReference,
    options?: CanManageOptions
): ResultAsync<
    boolean,
    ConfigurationError | GuildOperationFailure | CancelledError
>fetchCanManage(
  target: MemberReference,
  options?: CanManageOptions
): ResultAsync<
  boolean,
  | ConfigurationError
  | GuildOperationFailure
  | CancelledError
>

Parameters

options optional
CanManageOptions
export const canManageExample = (client, guildId, userId) => client.members.fetchCanManage({ guildId, userId })
import type { Client } from "@neontechspace/fluxerly"
export const canManageExample = (client: Client, guildId: string, userId: string) =>
    client.members.fetchCanManage({ guildId, userId })

fetchPage#

Fetch one page of members ordered by ascending user ID

The limit option defaults to 100 and accepts 1–1,000. Use the last returned userId as after for another page. Inputs are copied when execution starts. A malformed page fails as a whole. An empty page ends a scan, but no hasMore guarantee or automatic traversal is provided. Separate pages are not one consistent membership snapshot

fetchPage(
    guildId: string,
    query?: MemberQuery,
    options?: RequestOptions
): ResultAsync<
    readonly GuildMember[],
    ConfigurationError | GuildOperationFailure | CancelledError
>fetchPage(
  guildId: string,
  query?: MemberQuery,
  options?: RequestOptions
): ResultAsync<
  readonly GuildMember[],
  | ConfigurationError
  | GuildOperationFailure
  | CancelledError
>

Parameters

guildId
string
query optional
MemberQuery
options optional
RequestOptions

fetchSelf#

Fetch this bot's membership in a community without knowing its user ID

No gateway READY event or connection is required

fetchSelf(guildId: string, options?: RequestOptions): ResultAsync<
    GuildMember,
    ConfigurationError | GuildOperationFailure | CancelledError
>fetchSelf(
  guildId: string,
  options?: RequestOptions
): ResultAsync<
  GuildMember,
  | ConfigurationError
  | GuildOperationFailure
  | CancelledError
>

Parameters

guildId
string
options optional
RequestOptions

get#

Look up a community member by decimal guildId and userId in the enabled cache, without a request

Enable cache.members to retain members, and cache.roles for local role-name lookup. Explicit fetches or later gateway events can fill those caches, including the author or actor member that Fluxer attaches to message, reaction and typing events, so a member who just spoke can be present without a request. The cache misses, stale-snapshot warnings, misuse and recency rules of guilds.get apply. The example makes no requests when rendering observed role names. A missing member gives undefined, and missing role names fall back to IDs. Observed names are not effective permissions or proof of a complete role list

get(member: MemberReference): GuildMember | undefinedget(
  member: MemberReference
): GuildMember | undefined

Parameters

Returns
GuildMember | undefined

Returns the value synchronously. Unexpected failures throw SdkDefect

export function cachedRoleNamesExample(client, target) {
    const member = client.members.get(target)
    return member?.roleIds.map(id => client.roles.get({ guildId: target.guildId, id })?.name ?? id)
}
import type { Client, MemberReference } from "@neontechspace/fluxerly"
export function cachedRoleNamesExample(client: Client, target: MemberReference) {
    const member = client.members.get(target)
    return member?.roleIds.map(id => client.roles.get({ guildId: target.guildId, id })?.name ?? id)
}

getSelf#

Look up this bot's own membership of a community by decimal guildId in the enabled member cache, without a request

The result is undefined while the bot's account ID is unknown, which READY or a successful members.fetchSelf supplies, and when cache.members is off or the member is not cached. Each guildCreate event stores the bot's own member. Those sent while a session starts list it by account ID only, and the SDK completes it from READY's account. Successful members.fetchSelf and members.fetch reads and member events store it too. The cache misses, stale-snapshot warnings and recency rules of guilds.get apply. An invalid ID is misuse: The default API throws GuildOperationError with reason input and the native API dies with it. A closing or closed client has no cache, so the result is undefined

getSelf(guildId: string): GuildMember | undefinedgetSelf(
  guildId: string
): GuildMember | undefined

Parameters

guildId
string
Returns
GuildMember | undefined

Returns the value synchronously. Unexpected failures throw SdkDefect

iterate#

Read community members by ascending user ID, without connecting the gateway or downloading the community eagerly

The maxItems option is required, and pageSize defaults to 100, and maxPages defaults to the pages maxItems needs at pageSize plus 100. Each consumption copies inputs and keeps one page, requested only when needed. An empty page or maxItems ends the scan, not a short page. The timeoutMs option applies to each fetchPage call. Remote failures keep that method's error and read retry policy. PaginationError covers input, cursorStalled and pageLimit. Client closure releases the page and fails the next pull with ClientClosedError. Delivered members remain with the caller, and an enabled cache can receive page members. No roles or permission decisions are fetched. Separate pages are not a consistent membership snapshot

iterate(
    guildId: string,
    query: UserIterationQuery,
    options?: RequestOptions
): AsyncIterable<
    Result<
        GuildMember,
        | PaginationError | ConfigurationError
        | GuildOperationFailure | CancelledError
    >
>iterate(
  guildId: string,
  query: UserIterationQuery,
  options?: RequestOptions
): AsyncIterable<
  Result<
    GuildMember,
    | PaginationError
    | ConfigurationError
    | GuildOperationFailure
    | CancelledError
  >
>

Parameters

guildId
string
options optional
RequestOptions

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

export async function paginationMembersExample(client, guildId) {
    for await (const result of client.members.iterate(guildId, { maxItems: 1000 })) {
        if (result.isErr())
            return result
        if (!result.value.isBot)
            return result
    }
    return undefined
}
import type { Client } from "@neontechspace/fluxerly"
export async function paginationMembersExample(client: Client, guildId: string) {
    for await (const result of client.members.iterate(guildId, { maxItems: 1000 })) {
        if (result.isErr()) return result
        if (!result.value.isBot) return result
    }
    return undefined
}

iterateChunks#

Request one community's members over the gateway and deliver frozen batches without accumulating a roster

Choose explicit userIds, a case-insensitive nickname, global-name or username prefix, or all: true. The community and explicit user IDs must be positive decimal strings without leading zeros, no greater than 9223372036854775807. This gateway prefix query is separate from REST member search. Each consumption copies the input and sends one request. The community must have a ready shard assigned to this client, otherwise the request fails with notConnected. Full-list mode is capped by Fluxer at 100,000 members, and Fluxer's server-enforced 30-second limit per bot and community also applies. Only one member stream runs per client, and it uses one of four client-wide gateway slots shared with counts until consumed or released. A full request-slot budget or internal command queue fails with MemberChunkError reason busy. Only a gap on this community's shard ends the stream, while work on healthy shards continues. No connection, REST fallback, cache fill, presence subscription, raw-event forwarding or retries are added

iterateChunks(
    guildId: string,
    query: MemberChunkQuery,
    options?: MemberChunkOptions
): AsyncIterable<
    Result<
        MemberChunk,
        ConfigurationError | CancelledError | MemberChunkFailure
    >
>iterateChunks(
  guildId: string,
  query: MemberChunkQuery,
  options?: MemberChunkOptions
): AsyncIterable<
  Result<
    MemberChunk,
    | ConfigurationError
    | CancelledError
    | MemberChunkFailure
  >
>

Fluxer accepts 12 member requests per account in 10 seconds and drops the rest without an answer. The SDK therefore sends at most 12 from one client in any 11 seconds and fails a further request at once with reason rateLimit and retryAfterMs, without sending it. A member request sent with gateway.send counts as well, but gateway.send never refuses one. The children of one supervisor share one count through their parent. A child that gets no answer from the parent within one second counts only its own requests and logs supervisor.memberRequestsLocal once. The count leaves out requests from other processes with the same token, and the SDK does not track Fluxer's limit of 40 requests per community in 10 seconds across all accounts. A request Fluxer drops in either case ends with reason timeout

Batches are frozen and follow provider chunk order. The SDK checks batch indices, advertised batch count, unique members and matching presence data. Successful completion means all advertised batches arrived, not a complete or atomic guild snapshot. Missing selected user IDs are listed on the final batch. Optional presence data can omit unavailable, offline or invisible users, so omission does not prove offline status

The timeoutMs option defaults to 30,000 for the whole reply, including waits for gateway pacing. Cancellation, deadline expiry or ending consumption withdraws an unsent request and releases its local slot. A request already sent to Fluxer cannot be withdrawn. The maxPendingBytes option defaults to 4 MiB of source-JSON bytes counted for unread gateway batches. This bounds the SDK's byte accounting, not total memory use. Fluxer sends batches without waiting for the reader, so slow readers can overflow. Pausing consumption does not pause intake or the deadline

Gateway loss, timeout, malformed replies or overflow drop unread batches and end with one MemberChunkError, never a silent partial success. Already delivered batches remain with the caller. Client closure releases buffers and fails with ClientClosedError. Local cleanup cannot cancel Fluxer's dispatched work. Late replies are ignored and Resume does not replay batches

Parameters

guildId
string
options optional
MemberChunkOptions

Consume the iterable with a for await loop. A terminal failure yields one Err. Abort releases intake even while paused, returning CancelledError on the next pull, and interrupts a pending next. Breaking the loop releases intake between pulls. Unexpected failures reject with SdkDefect, retaining safe combined-failure details

export async function memberChunksExample(client, guildId, handleBatch) {
    for await (const result of client.members.iterateChunks(guildId, { all: true, presences: true })) {
        if (result.isErr())
            return result
        await handleBatch(result.value)
    }
}
import type { Client, MemberChunk } from "@neontechspace/fluxerly"
export async function memberChunksExample(client: Client, guildId: string, handleBatch: (chunk: MemberChunk) => Promise<void>) {
    for await (const result of client.members.iterateChunks(guildId, { all: true, presences: true })) {
        if (result.isErr()) return result
        await handleBatch(result.value)
    }
}

iterateSearch#

Read unique indexed member-search hits with a bounded scan

The maxItems option is required. The pageSize option defaults to 100 and accepts 1–100, and maxPages defaults to the pages maxItems needs at pageSize plus 100. Each consumption copies filters and their arrays, including recognized inherited and nonenumerable fields, and keeps independent state. Pages are requested only as needed, without prefetch or full-member fetches

iterateSearch(
    guildId: string,
    filters: Omit<MemberSearchQuery, "limit">,
    limits: MemberSearchIterationLimits,
    options?: RequestOptions
): AsyncIterable<
    Result<
        MemberSearchHit,
        | PaginationError | ConfigurationError
        | GuildOperationFailure | CancelledError
    >
>iterateSearch(
  guildId: string,
  filters: Omit<
    MemberSearchQuery, "limit"
  >,
  limits:
    MemberSearchIterationLimits,
  options?: RequestOptions
): AsyncIterable<
  Result<
    MemberSearchHit,
    | PaginationError
    | ConfigurationError
    | GuildOperationFailure
    | CancelledError
  >
>

Offset advances by the number of hits received. Each user is emitted at most once, keeping at most maxItems IDs to skip duplicates. Index changes can still skip users, so the result is not a complete or consistent membership snapshot. A page with indexing true fails the scan with PaginationError reason indexing instead of ending it early. An empty page before the observed total fails with cursorStalled. Reaching maxItems is normal completion, not exhaustion. Input, pageLimit and cursorStalled are other PaginationError reasons. Each page uses search's timeout, permission precheck, retry and cache rules. Client closure releases retained state, and delivered hits remain with the caller

Parameters

guildId
string
filters
Omit<MemberSearchQuery, "limit">
options optional
RequestOptions

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

kick#

Remove a member from the community, succeeding with no value after HTTP 204

Fluxer requires KickMembers and checks hierarchy. In a community whose mfaLevel is GuildMfaLevels.Elevated, the call fails with reason rejected, HTTP 400 and apiError.code twoFactorRequired, unless the bot owns the community or its application owner has two-factor authentication enabled. This does not ban the user, restore membership automatically or wait for a removal event. Missing membership is an API error. Dispatched actions invalidate the member cache even on rejection. The timeout method's execution, deadline and failure rules apply. Writes with unknown outcomes are not replayed

kick(
    target: MemberReference,
    options?: AuditedRequestOptions
): ResultAsync<
    void,
    ConfigurationError | GuildOperationFailure | CancelledError
>kick(
  target: MemberReference,
  options?: AuditedRequestOptions
): ResultAsync<
  void,
  | ConfigurationError
  | GuildOperationFailure
  | CancelledError
>

Parameters

options optional
AuditedRequestOptions

move#

Move a member who is already in voice to a positive decimal voice-channel ID

The target.connectionId value selects one observed connection. Omit it to move every active connection for that member. Fluxer requires MoveMembers and checks hierarchy, destination visibility and permission to connect. Fluxer refuses a move into an occupied voice channel whose participants all use peer-to-peer voice, and the member stays in its current channel. The call then fails with reason rejected, HTTP 400 and details.providerCode USER_NOT_IN_VOICE even though the member is in voice. A retry fails the same way while the destination stays in peer-to-peer mode. The frozen HTTP member result means Fluxer accepted the move, not that the participant has reconnected. A voiceStateUpdate event can first show channelId null, then a new connection ID in the destination. Shared moderation deadlines, auditReason validation, confirmed HTTP 429 retries and member-cache invalidation apply. A lost response or cancellation can leave the move applied. Inspect later observations rather than retrying blindly

move(
    target: VoiceConnectionReference,
    channelId: string,
    options?: AuditedRequestOptions
): ResultAsync<
    GuildMember,
    ConfigurationError | GuildOperationFailure | CancelledError
>move(
  target: VoiceConnectionReference,
  channelId: string,
  options?: AuditedRequestOptions
): ResultAsync<
  GuildMember,
  | ConfigurationError
  | GuildOperationFailure
  | CancelledError
>

Parameters

channelId
string
options optional
AuditedRequestOptions
export function moveVoiceConnection(client, target, channelId) {
    return client.members.move(target, channelId, { auditReason: "Moved to support" })
}
import type { Client, VoiceConnectionReference } from "@neontechspace/fluxerly"
export function moveVoiceConnection(client: Client, target: VoiceConnectionReference, channelId: string) {
    return client.members.move(target, channelId, { auditReason: "Moved to support" })
}

removeRole#

Remove one role from a member while leaving other roles unchanged

The addRole method's permissions and completion rules apply. The SDK sends the request even if a local snapshot lacks the role. Success does not prove the role was previously assigned

removeRole(
    member: MemberReference,
    roleId: string,
    options?: AuditedRequestOptions
): ResultAsync<
    void,
    ConfigurationError | GuildOperationFailure | CancelledError
>removeRole(
  member: MemberReference,
  roleId: string,
  options?: AuditedRequestOptions
): ResultAsync<
  void,
  | ConfigurationError
  | GuildOperationFailure
  | CancelledError
>

Parameters

roleId
string
options optional
AuditedRequestOptions

Search Fluxer's member index for a community, without using or populating the member cache

Without filters, this reads 25 members from offset 0, ordered by newest join time first. Recognized fields, including inherited and nonenumerable fields, are read and filter arrays copied when execution starts. Results can lag membership changes. A result with indexing true means the index is still being built, not that no members matched. An empty result with indexing false can still mean Fluxer's search service is unavailable. Counts do not guarantee completeness, and hits do not trigger full-member fetches

search(
    guildId: string,
    filters?: MemberSearchQuery,
    options?: RequestOptions
): ResultAsync<
    MemberSearchPage,
    ConfigurationError | GuildOperationFailure | CancelledError
>search(
  guildId: string,
  filters?: MemberSearchQuery,
  options?: RequestOptions
): ResultAsync<
  MemberSearchPage,
  | ConfigurationError
  | GuildOperationFailure
  | CancelledError
>

Fluxer requires at least one of ManageGuild, ManageRoles, ManageNicknames, BanMembers, ModerateMembers or KickMembers. While Guild.mfaLevel is GuildMfaLevels.Elevated, holding any of these except ManageNicknames can make Fluxer reject every search, including one without filters, with HTTP 400 and apiError.code twoFactorRequired, as described on Guild.mfaLevel

Join-source and invite filters first fetch the bot's community permissions and require ManageGuild. The three independent precheck reads run concurrently under the same total deadline, and a failure cancels sibling reads. When the precheck finds ManageGuild missing, the call fails with reason rejected, outcome notDispatched and no HTTP status. The precheck prevents knowingly sending ignored filters, but permissions can still change before search. Other queries have no hidden reads. The default deadline, rest.defaultTimeoutMs (30,000 ms unless configured), covers the whole call, including that precheck. Precheck GETs use eligible read retries. Search POST retries only confirmed HTTP 429 rejection because it may queue indexing. Expected failures use GuildOperationError or ClientClosedError

Parameters

guildId
string
filters optional
MemberSearchQuery
options optional
RequestOptions

setDeaf#

Set or clear the community deafen flag for a member currently connected to voice

Pass { deafened: true } to deafen or { deafened: false } to undeafen. Fluxer requires DeafenMembers and checks hierarchy. The returned member contains isDeafened, without waiting for a voice event. This does not control self-deafen or connect the bot to voice. The move method's deadline, audit, retry, cancellation and member-cache rules apply

setDeaf(
    target: MemberReference,
    input: VoiceDeafenInput,
    options?: AuditedRequestOptions
): ResultAsync<
    GuildMember,
    ConfigurationError | GuildOperationFailure | CancelledError
>setDeaf(
  target: MemberReference,
  input: VoiceDeafenInput,
  options?: AuditedRequestOptions
): ResultAsync<
  GuildMember,
  | ConfigurationError
  | GuildOperationFailure
  | CancelledError
>

Parameters

options optional
AuditedRequestOptions

setMute#

Set or clear the community mute flag for a member currently connected to voice

Pass { muted: true } to mute or { muted: false } to unmute. Fluxer requires MuteMembers and checks hierarchy. The returned member contains isMuted, without waiting for a voice event. This does not control self-mute or connect the bot to voice. The move method's deadline, audit, retry, cancellation and member-cache rules apply

setMute(
    target: MemberReference,
    input: VoiceMuteInput,
    options?: AuditedRequestOptions
): ResultAsync<
    GuildMember,
    ConfigurationError | GuildOperationFailure | CancelledError
>setMute(
  target: MemberReference,
  input: VoiceMuteInput,
  options?: AuditedRequestOptions
): ResultAsync<
  GuildMember,
  | ConfigurationError
  | GuildOperationFailure
  | CancelledError
>

Parameters

options optional
AuditedRequestOptions

setNickname#

Set one member's nickname, or pass null to clear it

A raw empty string fails, while a nonempty string containing only trim whitespace is accepted as Fluxer's clear value. Otherwise, validation removes U+000C and U+202E, trims surrounding whitespace, and requires 1–32 UTF-16 code units. The original string is sent unchanged. Other profile fields and roles stay unchanged. Fluxer checks ManageNicknames, role hierarchy and self-target rules. The frozen result follows HTTP, not a gateway event. Shared guild write deadlines and retries apply. Cancellation waits for request cleanup but cannot undo a dispatched change. An unknown outcome removes the target's cache entry, while a definite rejection preserves it

setNickname(
    member: MemberReference,
    nickname: string | null,
    options?: AuditedRequestOptions
): ResultAsync<
    GuildMember,
    ConfigurationError | GuildOperationFailure | CancelledError
>setNickname(
  member: MemberReference,
  nickname: string | null,
  options?: AuditedRequestOptions
): ResultAsync<
  GuildMember,
  | ConfigurationError
  | GuildOperationFailure
  | CancelledError
>

Parameters

nickname
string | null
options optional
AuditedRequestOptions
export async function nicknameExample(client, target) {
    const set = await client.members.setNickname(target, "Renamed")
    if (set.isErr())
        return set
    return await client.members.setNickname(target, null)
}
import type { Client, MemberReference } from "@neontechspace/fluxerly"
export async function nicknameExample(client: Client, target: MemberReference) {
    const set = await client.members.setNickname(target, "Renamed")
    if (set.isErr()) return set
    return await client.members.setNickname(target, null)
}

setRoles#

Replace one member's entire assigned role list in a single PATCH request

Use 0–250 distinct positive decimal role IDs no greater than 9,223,372,036,854,775,807. An empty array clears assigned roles, and the implicit everyone role is rejected as input. IDs are copied by index when execution starts, without fetching or merging the old roles. Fluxer requires ManageRoles and checks hierarchy. This can overwrite concurrent role changes

setRoles(
    member: MemberReference,
    roleIds: readonly string[],
    options?: AuditedRequestOptions
): ResultAsync<
    GuildMember,
    ConfigurationError | GuildOperationFailure | CancelledError
>setRoles(
  member: MemberReference,
  roleIds: readonly string[],
  options?: AuditedRequestOptions
): ResultAsync<
  GuildMember,
  | ConfigurationError
  | GuildOperationFailure
  | CancelledError
>

Nonexistent or foreign role IDs may be silently omitted. The returned frozen member reports the actual role set, not a guarantee that every requested role was accepted. Shared guild write deadlines and confirmed HTTP 429 retries apply, without a gateway connection or event wait. Eligible results can update the member cache. Writes with unknown outcomes remove the old entry and need explicit fetch reconciliation. Cancellation waits for cleanup but cannot undo the replacement

Parameters

roleIds
readonly string[]
options optional
AuditedRequestOptions
export function roleSetExample(client, member, desiredRoles) {
    return client.members.setRoles(member, desiredRoles)
}
import type { Client, MemberReference } from "@neontechspace/fluxerly"
export function roleSetExample(client: Client, member: MemberReference, desiredRoles: readonly string[]) {
    return client.members.setRoles(member, desiredRoles)
}

timeout#

Temporarily restrict a community member for durationMs milliseconds

The duration must be an integer from 1 through 31,536,000,000 ms. Expiry is calculated when execution starts, so queue and network time consume part of the duration. If expiry is past when Fluxer processes it, the request can clear the timeout. ModerateMembers and Fluxer's hierarchy rules apply, and self and administrator targets are rejected. In a community whose mfaLevel is GuildMfaLevels.Elevated, the call fails with reason rejected, HTTP 400 and apiError.code twoFactorRequired, unless the bot owns the community or its application owner has two-factor authentication enabled. The returned frozen member contains communicationDisabledUntil after HTTP 200, without waiting for an event

timeout(
    target: MemberReference,
    durationMs: number,
    options?: TimeoutOptions
): ResultAsync<
    GuildMember,
    ConfigurationError | GuildOperationFailure | CancelledError
>timeout(
  target: MemberReference,
  durationMs: number,
  options?: TimeoutOptions
): ResultAsync<
  GuildMember,
  | ConfigurationError
  | GuildOperationFailure
  | CancelledError
>

Optional timeoutReason is provider audit metadata, separate from auditReason. It is not a member field or a guarantee that an audit entry is retained. Shared guild deadlines and failures apply, and only confirmed HTTP 429 rejection retries. Cancellation or closure waits for cleanup but cannot undo a dispatched timeout. Eligible results update an enabled member cache, and dispatched failures remove the member even on rejection

Parameters

durationMs
number
options optional
TimeoutOptions
async function moderationExample(client, target) {
    return await client.members.timeout(target, 5 * 60_000)
}
import type { Client, MemberReference } from "@neontechspace/fluxerly"
async function moderationExample(client: Client, target: MemberReference) {
    return await client.members.timeout(target, 5 * 60_000)
}

timeoutState#

Report whether a member is timed out, from the member's communicationDisabledUntil and a moment in time

Returns "active" when the expiry is later than the moment, "none" when the member has no timeout or the expiry is at or before the moment, and "unknown" when the member omits the field, as a gateway member or cached member can. Use members.fetch, which always includes the field, to settle an unknown state. The moment is options.now, otherwise the wall time of the Clock that the client was created with. No request or cache read is made, and connection state is irrelevant, including after client shutdown. A timed-out member keeps its permission bits, but Fluxer blocks sending messages, editing and publishing the member's own messages, reacting, uploading, typing, changing the member's own nickname, writing in threads and joining voice, so check this beside permissions.calculate. A value that is not an object, an expiry that is neither null nor an ISO 8601 timestamp, or an invalid now is misuse and throws GuildOperationError for members.timeoutState with reason input in both APIs

timeoutState(
    member: Pick<GuildMember, "communicationDisabledUntil">,
    options?: TimeoutStateOptions
): MemberTimeoutStatetimeoutState(
  member: Pick<
    GuildMember,
    "communicationDisabledUntil"
  >,
  options?: TimeoutStateOptions
): MemberTimeoutState

Parameters

member
Pick<GuildMember, "communicationDisabledUntil">Pick<
  GuildMember,
  "communicationDisabledUntil"
>
options optional
TimeoutStateOptions

Returns the value synchronously. Unexpected failures throw SdkDefect

function timeoutExample(client, member) {
    return client.members.timeoutState(member) === "active"
}
import type { Client, GuildMember } from "@neontechspace/fluxerly"
function timeoutExample(client: Client, member: GuildMember) {
    return client.members.timeoutState(member) === "active"
}

unban#

Remove a user's community ban, succeeding with no value after HTTP 204

BanMembers is required. A user who is not banned is an API error, not a successful no-op. The user is not rejoined and queued message deletion is not cancelled. The ban method's execution, failures, cleanup and cached-member invalidation apply

unban(
    target: MemberReference,
    options?: AuditedRequestOptions
): ResultAsync<
    void,
    ConfigurationError | GuildOperationFailure | CancelledError
>unban(
  target: MemberReference,
  options?: AuditedRequestOptions
): ResultAsync<
  void,
  | ConfigurationError
  | GuildOperationFailure
  | CancelledError
>

Parameters

options optional
AuditedRequestOptions

UserIterationQuery#

Limits and starting point for ascending member or reaction-user traversal

Ordering follows user IDs, not join dates or reaction times

interface UserIterationQuery extends PaginationQueryinterface UserIterationQuery
  extends PaginationQuery
after optional#

Start with decimal user IDs greater than this ID, excluding it

Omit to start from the first page

string

Inherited from PaginationQuery: maxItems, maxPages, pageSize

VoiceConnectionReference#

Identifies one member and, optionally, one of that member's active voice connections

interface VoiceConnectionReference extends MemberReferenceinterface VoiceConnectionReference
  extends MemberReference
connectionId optional#

Connection ID from a voice-state observation, 1–32 UTF-16 code units after U+000C and U+202E removal and surrounding-whitespace trimming

The original string is sent unchanged. Omit to target every active connection for this member

string

Inherited from MemberReference: guildId, userId

VoiceDeafenInput#

The community deafen state to set for a member connected to voice

interface VoiceDeafenInput
deafened#

True to community-deafen the member, false to remove the community deafen

boolean

VoiceMuteInput#

The community mute state to set for a member connected to voice

interface VoiceMuteInput
muted#

True to community-mute the member, false to remove the community mute

boolean

Type Aliases#

AuditLogFilter#

Choose an actor filter, action filter or both to read the audit log without changing it

type AuditLogFilter =
    | {
          readonly actionType?: AuditLogActionType
          readonly userId: string
      }
    | {
          readonly actionType: AuditLogActionType
          readonly userId?: string
      }type AuditLogFilter =
    | {
        readonly actionType?:
          AuditLogActionType
        readonly userId: string
      }
    | {
        readonly actionType:
          AuditLogActionType
        readonly userId?: string
      }

AuditLogIterationQuery#

Read filtered audit entries from newest to oldest, bounded by the requested page and item limits

PaginationQuery requires maxItems. This iterator yields entries, not the related users and webhooks in each page. Filters prevent Fluxer from combining message-deletion records during this read. Other activity can still change the log between pages

type AuditLogIterationQuery =
    AuditLogIterationQueryBase & AuditLogFiltertype AuditLogIterationQuery =
    & AuditLogIterationQueryBase
    & AuditLogFilter

AuditLogQuery#

Read one page of community audit records for an actor, action category or both

At least one filter is required because an unfiltered Fluxer read can change the log. Without either filter, Fluxer can replace individual message-deletion records with a combined record

type AuditLogQuery = AuditLogQueryBase & AuditLogFiltertype AuditLogQuery =
    & AuditLogQueryBase
    & AuditLogFilter
import { AuditLogActions } from "@neontechspace/fluxerly"
export function auditExample(client, guildId) {
    return client.auditLogs.fetchPage(guildId, { actionType: AuditLogActions.GuildUpdate })
}
export function auditTraversalExample(client, guildId) {
    return client.auditLogs.iterate(guildId, { actionType: AuditLogActions.GuildUpdate, maxItems: 100 })
}
import { AuditLogActions, type Client } from "@neontechspace/fluxerly"
export function auditExample(client: Client, guildId: string) {
    return client.auditLogs.fetchPage(guildId, { actionType: AuditLogActions.GuildUpdate })
}
export function auditTraversalExample(client: Client, guildId: string) {
    return client.auditLogs.iterate(guildId, { actionType: AuditLogActions.GuildUpdate, maxItems: 100 })
}

DiscoveryApplicationEdit#

Change an existing directory application or listing with discovery.edit

Supply at least one field, with the same validation as DiscoveryApplicationInput. Omitted fields remain unchanged, tags replaces the entire list, and tags: [] clears it. Null cannot clear the required description, category or language

type DiscoveryApplicationEdit = Partial<DiscoveryApplicationInput>type DiscoveryApplicationEdit =
    Partial<
      DiscoveryApplicationInput
    >

MemberChunkQuery#

Choose the members to request through one community's gateway shard

Supply exactly one of all, userIds or query, with an optional presences flag. The SDK requests a response when the stream is consumed. It does not subscribe to future changes, fetch REST pages or keep a community member list

type MemberChunkQuery =
    & (
          | {
                readonly all: true
                readonly limit?: never
                readonly query?: never
                readonly userIds?: never
            }
          | {
                readonly all?: never
                readonly limit?: never
                readonly query?: never
                readonly userIds: readonly string[]
            }
          | {
                readonly all?: never
                readonly limit?: number
                readonly query: string
                readonly userIds?: never
            })
    & { readonly presences?: boolean }type MemberChunkQuery =
    & (
        | {
            readonly all: true
            readonly limit?: never
            readonly query?: never
            readonly userIds?:
              never
          }
        | {
            readonly all?: never
            readonly limit?: never
            readonly query?: never
            readonly userIds:
              readonly string[]
          }
        | {
            readonly all?: never
            readonly limit?: number
            readonly query: string
            readonly userIds?:
              never
          })
    & {
        readonly presences?:
          boolean
      }

MemberTimeoutState#

Whether a member is timed out: "active" while the expiry is in the future, "none" when the member has no timeout or it has ended, and "unknown" when the member snapshot does not say

type MemberTimeoutState = "none" | "active" | "unknown"type MemberTimeoutState =
    "none" | "active" | "unknown"