9 symbols from @neontechspace/fluxerly
Interfaces#
DirectMessageChannel #
A one-to-one direct message or group conversation outside a community
Pass id to the messages API to address this conversation. The frozen snapshot describes returned settings and recipients, not current access or proof that a later message can be delivered
interface DirectMessageChannelDirectMessageGroupEdit #
Rename a group conversation, change its icon or nicknames, or transfer its ownership
Omitted fields remain unchanged. This does not create a group or add recipients. Fluxer enforces membership and ownership, and an error after dispatch does not prove that earlier changes were rolled back
interface DirectMessageGroupEditiconoptional#-
Image data URI, or null to clear
Fluxer validates the image
string | null nameoptional#-
Group name, or null to clear it
Raw input may contain at most 10,000 UTF-16 code units. For validation, Fluxer's general-name rules remove U+000C and U+202E, trim surrounding whitespace, strip provider-defined invisible characters, normalize whitespace and collapse its runs, then require 1–100 UTF-16 code units. The SDK sends the original string without lowercasing or hyphenating it
string | null nicknamesoptional#-
Nicknames keyed by user ID
A nickname must be a nonempty raw string and contain at most 32 UTF-16 code units after U+000C and U+202E removal and surrounding-whitespace trimming. A normalized-empty string is allowed. The original string is sent unchanged, and null clears a nickname. Non-owners may change only their own
Readonly<Record<string, string | null>> | null| Readonly< Record<string, string | null> > | null owneroptional#Id -
Transfer ownership to an existing non-bot recipient
Requires current ownership
string
DirectMessageLatestMessages #
Latest-message lookup results for the selected private channel IDs
Look in messages for returned IDs and omitted for requested IDs missing from the response. A channel returned with null differs from a channel missing from the response. Neither explains why no message was returned
interface DirectMessageLatestMessages<
M extends MessageCore = Message
>interface DirectMessageLatestMessages<
M extends MessageCore = Message
>DirectMessages #
Open and manage private one-to-one or group conversations with the bot's credentials
Use direct to open a conversation and send in one call, or the messages namespace when the private channel ID is known. No gateway connection is required. HTTP calls start immediately with the client's shared default deadline (rest, 30,000 ms unless configured) and eligible read retries. Writes retry only confirmed rate-limit rejection, never an uncertain outcome. Abort waits for cleanup and returns Cancelled. Unexpected failures reject with Sdk
interface DirectMessages<M extends MessageCore = Message>interface DirectMessages<
M extends MessageCore = Message
>close#
Close a one-to-one conversation for this bot, or leave a group conversation
Another recipient's conversation is not erased. If the group owner leaves, ownership may transfer. Enabled cache invalidation normally stays scoped to this conversation. A cache-wide conflict check can also prevent older in-flight results from being stored
close(id: string, options?: RequestOptions): ResultAsync<
void,
UserOperationFailure | ConfigurationError | CancelledError
>close(
id: string,
options?: RequestOptions
): ResultAsync<
void,
| UserOperationFailure
| ConfigurationError
| CancelledError
>Parameters
id-
string optionsoptional-
RequestOptions
- Returns
ResultAsync< void, UserOperationFailure | ConfigurationError | CancelledError >ResultAsync< void, | UserOperationFailure | ConfigurationError | CancelledError >
editGroup #
Change supplied settings of an existing group conversation
A null name clears it, and omitted fields remain unchanged. Fluxer enforces member and owner permissions. A failed response does not guarantee rollback. Enabled cache invalidation normally stays scoped to this conversation. A cache-wide conflict check can also prevent older in-flight results from being stored
editGroup(
id: string,
input: DirectMessageGroupEdit,
options?: RequestOptions
): ResultAsync<
DirectMessageChannel,
UserOperationFailure | ConfigurationError | CancelledError
>editGroup(
id: string,
input: DirectMessageGroupEdit,
options?: RequestOptions
): ResultAsync<
DirectMessageChannel,
| UserOperationFailure
| ConfigurationError
| CancelledError
>Parameters
id-
string input-
DirectMessageGroupEdit optionsoptional-
RequestOptions
- Returns
ResultAsync< DirectMessageChannel, UserOperationFailure | ConfigurationError | CancelledError >ResultAsync< DirectMessageChannel, | UserOperationFailure | ConfigurationError | CancelledError >
fetch#
Fetch a private channel by decimal ID
A community-channel response is rejected as invalid. With the direct-message cache enabled, a concurrent fetch of another private channel ID does not keep this result from being stored, unless more than 256 private channel IDs are in flight at once
fetch(id: string, options?: RequestOptions): ResultAsync<
DirectMessageChannel,
UserOperationFailure | ConfigurationError | CancelledError
>fetch(
id: string,
options?: RequestOptions
): ResultAsync<
DirectMessageChannel,
| UserOperationFailure
| ConfigurationError
| CancelledError
>Parameters
id-
string optionsoptional-
RequestOptions
- Returns
ResultAsync< DirectMessageChannel, UserOperationFailure | ConfigurationError | CancelledError >ResultAsync< DirectMessageChannel, | UserOperationFailure | ConfigurationError | CancelledError >
fetchAll #
Fetch this bot's currently open one-to-one and group conversations
Personal notes are excluded. The list is neither an atomic snapshot nor complete message history. Enabled cache replacement is skipped when a later targeted request or channel observation conflicts
fetchAll(options?: RequestOptions): ResultAsync<
readonly DirectMessageChannel[],
UserOperationFailure | ConfigurationError | CancelledError
>fetchAll(
options?: RequestOptions
): ResultAsync<
readonly DirectMessageChannel[],
| UserOperationFailure
| ConfigurationError
| CancelledError
>Parameters
optionsoptional-
RequestOptions
- Returns
ResultAsync< readonly DirectMessageChannel[], UserOperationFailure | ConfigurationError | CancelledError >ResultAsync< readonly DirectMessageChannel[], | UserOperationFailure | ConfigurationError | CancelledError >
fetchLatestMessages #
Fetch the latest messages for 1–100 selected, distinct private channel IDs through Fluxer's batch endpoint
IDs are copied by index when execution starts. This does not enumerate conversations or fill a cache. A null entry does not prove an empty channel or denied access. The omitted field separately lists requested IDs that Fluxer did not return. Do not treat omission as null, an empty channel or denied access. The batch uses POST and is not retried after a dispatched failure with an unknown outcome, even though it reads data
fetchLatestMessages(
channelIds: readonly string[],
options?: RequestOptions
): ResultAsync<
DirectMessageLatestMessages<M>,
UserOperationFailure | ConfigurationError | CancelledError
>fetchLatestMessages(
channelIds: readonly string[],
options?: RequestOptions
): ResultAsync<
DirectMessageLatestMessages<M>,
| UserOperationFailure
| ConfigurationError
| CancelledError
>Parameters
channelIds -
readonly string[] optionsoptional-
RequestOptions
- Returns
ResultAsync< DirectMessageLatestMessages<M>, UserOperationFailure | ConfigurationError | CancelledError >ResultAsync< DirectMessageLatestMessages<M>, | UserOperationFailure | ConfigurationError | CancelledError >
get#
Look up a private channel in the optional cache using its decimal ID, without a request
A hit may be stale and becomes more recently used without extending its age. A miss produces undefined. An invalid ID is misuse: The default API throws User with reason input and the native API dies with it. A closing or closed client has no cache, so the result is undefined
get(id: string): DirectMessageChannel | undefinedget(id: string):
| DirectMessageChannel
| undefinedParameters
id-
string
- Returns
DirectMessageChannel | undefined
Returns the value synchronously.
Unexpected failures throw Sdk
open#
Open or reopen a one-to-one conversation with the selected user
The result is a private channel, not proof a message can be delivered. Privacy checks can still prevent sending after opening succeeds. With the direct-message cache enabled, the channel ID is unknown until the response arrives, so some concurrent direct-message cache changes keep the result out of the cache. Examples are a direct call and a direct-message update event. A successful opening replaces only the returned channel's cached snapshot and keeps other cached private channels. A failed opening that was started clears the direct-message cache, because its outcome may be unknown and no channel is known to evict. Invalid input fails before the cache is touched and leaves it intact
open(userId: string, options?: RequestOptions): ResultAsync<
DirectMessageChannel,
UserOperationFailure | ConfigurationError | CancelledError
>open(
userId: string,
options?: RequestOptions
): ResultAsync<
DirectMessageChannel,
| UserOperationFailure
| ConfigurationError
| CancelledError
>Parameters
userId -
string optionsoptional-
RequestOptions
- Returns
ResultAsync< DirectMessageChannel, UserOperationFailure | ConfigurationError | CancelledError >ResultAsync< DirectMessageChannel, | UserOperationFailure | ConfigurationError | CancelledError >
removeRecipient #
Remove a group recipient as owner, or remove the bot itself
This does not request deletion of that user's messages. If the last recipient leaves, Fluxer deletes the group. Enabled cache invalidation normally stays scoped to this conversation. A cache-wide conflict check can also prevent older in-flight results from being stored
removeRecipient(
id: string,
userId: string,
options?: RequestOptions
): ResultAsync<
void,
UserOperationFailure | ConfigurationError | CancelledError
>removeRecipient(
id: string,
userId: string,
options?: RequestOptions
): ResultAsync<
void,
| UserOperationFailure
| ConfigurationError
| CancelledError
>Parameters
id-
string userId -
string optionsoptional-
RequestOptions
- Returns
ResultAsync< void, UserOperationFailure | ConfigurationError | CancelledError >ResultAsync< void, | UserOperationFailure | ConfigurationError | CancelledError >
send#
Open or reopen a one-to-one conversation with a user, then send a message
A plain string sends only that text, as shorthand for { content }. The whole operation uses one deadline, and mentions are disabled by default. Message metadata and data bytes are prepared before opening the conversation. File and stream sources are captured, not copied, and read later when uploads start, using messages's size, upload-budget and cleanup rules. An inline multipart 429 does not replay file or stream sources. Message with outcome not does not mean opening the conversation was undone. A send with an unknown outcome is never repeated automatically. The opened conversation is cached under the same conditions as open. Reply references are not accepted here. Use messages with an existing channel and message reference
send(
userId: string,
input: string | ReplyInput,
options?: RequestOptions
): ResultAsync<M, ConfigurationError | SendError | CancelledError>send(
userId: string,
input: string | ReplyInput,
options?: RequestOptions
): ResultAsync<
M,
| ConfigurationError | SendError
| CancelledError
>Parameters
userId -
string input-
string | ReplyInput optionsoptional-
RequestOptions
- Returns
ResultAsync<M, ConfigurationError | SendError | CancelledError>ResultAsync< M, | ConfigurationError | SendError | CancelledError >
export async function notifyUserExample(client, userId) {
const user = await client.users.fetch(userId)
if (user.isErr())
return user
return client.directMessages.send(user.value.id, { content: `Hello ${user.value.displayName ?? user.value.username}` })
}
import type { Client } from "@neontechspace/fluxerly"
export async function notifyUserExample(client: Client, userId: string) {
const user = await client.users.fetch(userId)
if (user.isErr()) return user
return client.directMessages.send(user.value.id, { content: `Hello ${user.value.displayName ?? user.value.username}` })
}
User#
Public identity of a Fluxer account, suitable for displaying who sent a message or belongs to a conversation
This returned data cannot be changed and does not update when the account changes. It excludes private account fields even for users. Community nicknames and community-specific profile settings are separate from this account-wide identity
interface Useravatar#-
Avatar asset hash, not an image URL, or null when no avatar is supplied
string | null avatar#Color -
Dominant avatar color, or null
number | null discriminator#-
Provider discriminator used with username to distinguish accounts with the same username
string display#Name -
Account-wide name shown instead of username where supported, or null when unset
string | null flags#-
Public account flags returned by Fluxer
number is#Bot -
Whether Fluxer identifies this account as a bot
boolean is#System -
Whether Fluxer identifies this account as a system user
boolean username#-
Account username, not unique by itself
string
UserProfile #
Result of users, combining public identity with the profile information Fluxer allowed this caller to see
Account-wide and community-specific settings remain separate. The frozen result excludes relationships, connections, timezone and premium details, and does not populate user or member caches
interface UserProfileguild#Profile -
Explicit community-context profile fields, or null when Fluxer did not supply them
Null does not establish membership
UserProfileFields | null is#Limited -
Whether Fluxer limited this read by profile privacy
Its omitted unrestricted marker becomes false
boolean profile#-
Account-wide profile fields the SDK includes
UserProfileFields
UserProfileFields #
Displayable biography, pronouns and visual customization from a profile read
Null can mean either that the value is unset or that Fluxer hid it for privacy. These fields alone cannot distinguish those cases. Undefined banner means Fluxer did not supply it
interface UserProfileFieldsaccent#Color -
Packed profile accent color, or null
number | null banner#-
Banner hash, or null when absent or withheld by Fluxer
string | null banneroptional#Color -
Account-profile banner color when Fluxer supplies it
Community-specific profiles do not supply this field
number | null bio#-
Biography, null when absent or hidden by profile privacy
string | null pronouns#-
Pronouns, null when absent or hidden by profile privacy
string | null
UserProfileQuery #
Choose whether users also asks for profile customization in one community
Omit guild for the account-wide profile. This request does not list mutual communities or relationships and does not fetch a Guild
interface UserProfileQueryUsers#
Read public user account and profile data, without connecting the gateway
Use get for an explicitly enabled local account cache, or fetch for a remote read. HTTP calls start immediately with the client's default deadline (rest, 30,000 ms unless configured) and bounded eligible read retries. Any writes retry only confirmed rate-limit rejection, not an uncertain outcome. Abort waits for cleanup and returns Cancelled. Unexpected failures reject with Sdk
interface Usersfetch#
Fetch a public account snapshot by decimal user ID
An unknown user fails with reason not rather than an empty result. With the user cache enabled, a concurrent fetch of another user ID does not keep this result from being stored, unless more than 256 user IDs are being read at once
fetch(id: string, options?: RequestOptions): ResultAsync<
User,
UserOperationFailure | ConfigurationError | CancelledError
>fetch(
id: string,
options?: RequestOptions
): ResultAsync<
User,
| UserOperationFailure
| ConfigurationError
| CancelledError
>Parameters
id-
string optionsoptional-
RequestOptions
- Returns
ResultAsync< User, UserOperationFailure | ConfigurationError | CancelledError >ResultAsync< User, | UserOperationFailure | ConfigurationError | CancelledError >
fetchProfile #
Fetch a user's privacy-filtered profile, optionally for the community specified in query
The frozen result includes only documented identity and profile fields. The is field reports Fluxer's privacy restriction, not missing community membership. A guild of null means no contextual profile was supplied, not proof the user is outside the community. No gateway connection, hidden member fetch or account or profile cache use is performed, and each call issues a separate read. Users' shared deadlines and eligible read retries apply. Fluxer may clear expired premium state while serving this GET. Invalid input, denied access or a malformed response fails with User for users. Cancellation affects this request only and waits for cleanup
fetchProfile(
id: string,
query?: UserProfileQuery,
options?: RequestOptions
): ResultAsync<
UserProfile,
UserOperationFailure | ConfigurationError | CancelledError
>fetchProfile(
id: string,
query?: UserProfileQuery,
options?: RequestOptions
): ResultAsync<
UserProfile,
| UserOperationFailure
| ConfigurationError
| CancelledError
>Parameters
id-
string queryoptional-
UserProfileQuery optionsoptional-
RequestOptions
- Returns
ResultAsync< UserProfile, UserOperationFailure | ConfigurationError | CancelledError >ResultAsync< UserProfile, | UserOperationFailure | ConfigurationError | CancelledError >
export function profileExample(client, userId, guildId) {
return client.users.fetchProfile(userId, { guildId })
}
import type { Client } from "@neontechspace/fluxerly"
export function profileExample(client: Client, userId: string, guildId: string) {
return client.users.fetchProfile(userId, { guildId })
}
fetchSelf #
Fetch the authenticated bot's public account data remotely
Private account fields are excluded. With the user cache enabled, the bot's ID is unknown until the response arrives, so some concurrent user cache changes keep the result out of the cache. Examples are another users or users call, a user update event and a lost gateway connection
fetchSelf(options?: RequestOptions): ResultAsync<
User,
UserOperationFailure | ConfigurationError | CancelledError
>fetchSelf(
options?: RequestOptions
): ResultAsync<
User,
| UserOperationFailure
| ConfigurationError
| CancelledError
>Parameters
optionsoptional-
RequestOptions
- Returns
ResultAsync< User, UserOperationFailure | ConfigurationError | CancelledError >ResultAsync< User, | UserOperationFailure | ConfigurationError | CancelledError >
get#
Look up a public account in the optional cache using its decimal ID, without a request
A hit may be stale and becomes more recently used without extending its age. A miss produces undefined. An invalid ID is misuse: The default API throws User with reason input and the native API dies with it. A closing or closed client has no cache, so the result is undefined
get(id: string): User | undefinedParameters
id-
string
- Returns
User | undefined
Returns the value synchronously.
Unexpected failures throw Sdk
getSelf #
Look up the bot's own public account as the gateway's READY reported it, without a request
The result is undefined until this client's first READY, and also while no READY has carried a complete public account. A later READY with a complete public account, such as for a new session, replaces it, while an incomplete one keeps the previous account. Other user updates and fetch results do not change it, so its username or avatar can be stale. The value remains available after the client stops. This lookup never fails. Use fetch for a current remote snapshot
getSelf(): User | undefined- Returns
User | undefined
Returns the value synchronously