On This Page

Emoji and Stickers

12 symbols from @neontechspace/fluxerly

Interfaces#

EmojiCreate#

Upload an image as a named custom community emoji for messages and reactions

Supply encoded image bytes, because the SDK does not read a file or fetch an image URL

interface EmojiCreate
export function expressionExample(client, guildId, image) {
    return client.emojis.create(guildId, { name: "build_passed", image })
}
export function renameStickerExample(client, sticker) {
    return client.stickers.edit(sticker, { ...sticker, name: "Build passed" })
}
export function useEmojiExample(client, message, emoji) {
    return client.messages.addReaction(message, emoji)
}
import type { Client, GuildEmoji, GuildSticker, MessageReference } from "@neontechspace/fluxerly"
export function expressionExample(client: Client, guildId: string, image: string) {
    return client.emojis.create(guildId, { name: "build_passed", image })
}
export function renameStickerExample(client: Client, sticker: GuildSticker) {
    return client.stickers.edit(sticker, { ...sticker, name: "Build passed" })
}
export function useEmojiExample(client: Client, message: MessageReference, emoji: GuildEmoji) {
    return client.messages.addReaction(message, emoji)
}
image#

Base64 image data or an image data URI, at most 512 KiB decoded

Fluxer validates the actual format, dimensions, moderation and community capacity. No file is read implicitly. Callers own encoding and the lifetime of their original bytes

string
name#

2–32 ASCII letters, digits or underscores

string

EmojiEdit#

Rename an emoji without replacing its image

interface EmojiEdit
name#

Replacement name, 2–32 ASCII letters, digits or underscores

string

Emojis#

Create, list, copy, rename and delete community emoji

Use get for an optional local cache lookup, or fetchAll, fetchMetadata and fetchSource for remote reads. Shared guild request limits, deadlines and read retries apply. Writes retry only confirmed HTTP 429 rejections. Input, permission, not-found and malformed-response errors are not retried. A lost response can leave a write applied. Results are frozen snapshots, not gateway acknowledgement

interface Emojis

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

clone#

Copy an emoji into a community by its source ID, using Fluxer's server-side copy

Source metadata is preserved. Fluxer enforces source copying restrictions

clone(
    guildId: string,
    sourceId: string,
    options?: AuditedRequestOptions
): ResultAsync<
    GuildEmoji,
    ConfigurationError | GuildOperationFailure | CancelledError
>clone(
  guildId: string,
  sourceId: string,
  options?: AuditedRequestOptions
): ResultAsync<
  GuildEmoji,
  | ConfigurationError
  | GuildOperationFailure
  | CancelledError
>

Parameters

guildId
string
sourceId
string
options optional
AuditedRequestOptions

create#

Upload one community emoji and return its metadata

Inputs are copied when execution starts. No image URL is fetched automatically. Fluxer checks image format, dimensions, permissions and capacity. A write with an unknown outcome is not replayed

create(
    guildId: string,
    input: EmojiCreate,
    options?: AuditedRequestOptions
): ResultAsync<
    GuildEmoji,
    ConfigurationError | GuildOperationFailure | CancelledError
>create(
  guildId: string,
  input: EmojiCreate,
  options?: AuditedRequestOptions
): ResultAsync<
  GuildEmoji,
  | ConfigurationError
  | GuildOperationFailure
  | CancelledError
>

Parameters

guildId
string
options optional
AuditedRequestOptions

createMany#

Upload 1–50 community emojis in one batch and return separate successes and failures

The input array is copied by index, then its entries are copied when execution starts. Some uploads can succeed while others fail. No rollback or automatic chunking is performed. Failures named by duplicate emoji names cannot be matched reliably to input positions. After an unknown outcome, fetch fresh remote data rather than blindly replaying the batch

createMany(
    guildId: string,
    input: readonly EmojiCreate[],
    options?: AuditedRequestOptions
): ResultAsync<
    ExpressionBatch<GuildEmoji>,
    ConfigurationError | GuildOperationFailure | CancelledError
>createMany(
  guildId: string,
  input: readonly EmojiCreate[],
  options?: AuditedRequestOptions
): ResultAsync<
  ExpressionBatch<GuildEmoji>,
  | ConfigurationError
  | GuildOperationFailure
  | CancelledError
>

Parameters

guildId
string
input
readonly EmojiCreate[]
options optional
AuditedRequestOptions

delete#

Remove an emoji, succeeding with no value after HTTP 204

Retained metadata is invalidated. A missing target is an error, not proof of an earlier deletion. The purge option defaults to false. Setting it to true also queues irreversible media removal, subject to Fluxer's restrictions

delete(
    target: ExpressionReference,
    options?: ExpressionDeleteOptions
): ResultAsync<
    void,
    ConfigurationError | GuildOperationFailure | CancelledError
>delete(
  target: ExpressionReference,
  options?: ExpressionDeleteOptions
): ResultAsync<
  void,
  | ConfigurationError
  | GuildOperationFailure
  | CancelledError
>

Parameters

options optional
ExpressionDeleteOptions

edit#

Rename a community emoji without changing its image or fetching its old metadata first

edit(
    target: ExpressionReference,
    input: EmojiEdit,
    options?: AuditedRequestOptions
): ResultAsync<
    GuildEmoji,
    ConfigurationError | GuildOperationFailure | CancelledError
>edit(
  target: ExpressionReference,
  input: EmojiEdit,
  options?: AuditedRequestOptions
): ResultAsync<
  GuildEmoji,
  | ConfigurationError
  | GuildOperationFailure
  | CancelledError
>

Parameters

input
EmojiEdit
options optional
AuditedRequestOptions

fetchAll#

Fetch a community's emoji list in Fluxer's order, without pagination

The list can change after the response and is not an ongoing completeness guarantee. An enabled metadata cache can retain results, but not image bytes or creator accounts

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

Parameters

guildId
string
options optional
RequestOptions

fetchMetadata#

Fetch minimal emoji metadata by decimal ID, without requiring source-community membership

This read does not populate the cache

fetchMetadata(id: string, options?: RequestOptions): ResultAsync<
    ExpressionMetadata,
    ConfigurationError | GuildOperationFailure | CancelledError
>fetchMetadata(
  id: string,
  options?: RequestOptions
): ResultAsync<
  ExpressionMetadata,
  | ConfigurationError
  | GuildOperationFailure
  | CancelledError
>

Parameters

id
string
options optional
RequestOptions

fetchSource#

Fetch the public presentation of the community that owns a custom emoji with this decimal ID: Its ID, name, icon hash and badges

Fluxer answers when the source community is discoverable or the bot is a member of it. A private source community the bot is not in, an unavailable community or an unknown emoji fails with GuildOperationError whose apiError.code is unknownResource, without revealing which case applies. This read does not populate the cache, and the result does not update when the community changes

fetchSource(id: string, options?: RequestOptions): ResultAsync<
    ExpressionSourceGuild,
    ConfigurationError | GuildOperationFailure | CancelledError
>fetchSource(
  id: string,
  options?: RequestOptions
): ResultAsync<
  ExpressionSourceGuild,
  | ConfigurationError
  | GuildOperationFailure
  | CancelledError
>

Parameters

id
string
options optional
RequestOptions

get#

Look up cached emoji metadata using decimal guildId and id, without an HTTP request

The result is undefined when caching is disabled or the entry is absent, expired or invalidated by a conflicting change. 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(target: ExpressionReference): GuildEmoji | undefinedget(
  target: ExpressionReference
): GuildEmoji | undefined

Parameters

Returns
GuildEmoji | undefined

Returns the value synchronously. Unexpected failures throw SdkDefect

ExpressionBatch#

Results of creating emoji or stickers in one batch request

Inspect both lists even when the HTTP request succeeded. Entries in success were created independently of failures, so repeating the whole batch can duplicate successful creations. Provider order does not map failures back to input positions when names repeat

interface ExpressionBatch<A>
failed#

Failed names in provider order

Duplicate names cannot be correlated to an input index. Raw localized provider error text is deliberately excluded from SDK data and diagnostics

readonly { readonly name: string }[]
success#

Created resources

They remain created even when another entry fails

readonly A[]

ExpressionMetadata#

Public name and animation information returned by fetchMetadata without requiring source-community membership

The allowCloning flag is a provider hint for deciding whether to attempt a clone, not proof of access to either community. This is not the full community-owned sticker or emoji management record

interface ExpressionMetadata extends GuildEmojiinterface ExpressionMetadata
  extends GuildEmoji
allowCloning#

Provider's current cloning hint, not authorization or a guarantee that a later clone will succeed

boolean

Inherited from GuildEmoji: animated, guildId, id, name

ExpressionReference#

Address a custom emoji or sticker by its owning community and resource ID

A fetched emoji or sticker already contains these IDs and can be passed wherever this reference is accepted

interface ExpressionReference
guildId#

Owning guild ID

string
id#

Emoji or sticker ID

string

ExpressionSourceGuild#

Public presentation of the community that owns a custom emoji or sticker, returned by fetchSource

Fluxer returns it for a public source community, or for a private one the bot is a member of. It is a frozen snapshot with no member, channel or permission data, and reading it grants no access to the community or the expression

interface ExpressionSourceGuild
export async function sourceBadgeExample(client, emojiId) {
    const source = await client.emojis.fetchSource(emojiId)
    return source.map((guild) => `${guild.name}${guild.features.includes("VERIFIED") ? " (verified)" : ""}`)
}
import type { Client } from "@neontechspace/fluxerly"
export async function sourceBadgeExample(client: Client, emojiId: string) {
    const source = await client.emojis.fetchSource(emojiId)
    return source.map((guild) => `${guild.name}${guild.features.includes("VERIFIED") ? " (verified)" : ""}`)
}
features#

Badge features in provider order

Fluxer currently limits them to VERIFIED, PARTNERED and DISCOVERABLE. A badge string added by Fluxer later is retained unchanged rather than failing the read, so compare against known names

readonly string[]
icon#

Icon hash of the source community, or null when it has no icon

Build an image URL with the asset helpers

string | null
id#

Source guild ID as a decimal string

string
name#

Source community name at the time of the read

string

GuildEmoji#

A community's custom emoji identity, name and animation flag

Pass this snapshot to message reaction helpers or emoji management methods. It contains no image bytes or creator account, and it does not update when the emoji is renamed or deleted

interface GuildEmoji extends ExpressionReferenceinterface GuildEmoji
  extends ExpressionReference
animated#

Whether the image is animated

boolean
name#

Emoji name

string

Inherited from ExpressionReference: guildId, id

GuildSticker#

A community's custom sticker identity and display metadata, including its description and suggestion tags

This frozen snapshot contains no image bytes or creator account. Use stickers.edit to replace metadata, not to replace the underlying image

interface GuildSticker extends GuildEmojiinterface GuildSticker
  extends GuildEmoji
description#

Provider description, including empty text

string
tags#

Frozen suggestion tags in provider order

readonly string[]

Inherited from GuildEmoji: animated, guildId, id, name

StickerCreate#

Upload a named custom sticker with optional description and suggestion tags

Supply image bytes as base64 or a data URI, as with EmojiCreate. Fluxer validates image format, dimensions, moderation and community capacity after local input validation

interface StickerCreate
description optional#

Omitted/null means no description

Otherwise the value must contain 1–500 normalized UTF-16 code units. Validation removes U+000C and U+202E and trims surrounding whitespace. The original string is sent unchanged

string | null
image#

Base64 image data or image data URI, at most 512 KiB decoded

string
name#

Sticker name, 2–30 UTF-16 code units after U+000C and U+202E removal and surrounding-whitespace trimming

The original string is sent unchanged

string
tags optional#

Up to ten tags of 1–30 normalized UTF-16 code units each

Omitted means empty. Validation removes U+000C and U+202E and trims surrounding whitespace without changing the strings sent. Entries are copied by index when the operation starts

readonly string[]

StickerEdit#

Replace sticker metadata without reading or merging remote state

Images cannot be replaced. A fetched sticker can be spread into this input. Its matching identity and animation fields are ignored

interface StickerEdit
description#

Required replacement description, 1–500 normalized UTF-16 code units

Empty/null clears it. Validation removes U+000C and U+202E and trims surrounding whitespace without changing a nonempty string sent

string | null
name#

Required replacement name, 2–30 normalized UTF-16 code units

Validation removes U+000C and U+202E and trims surrounding whitespace without changing the string sent

string
tags#

Required replacement list, at most ten tags of 1–30 normalized UTF-16 code units. [] clears it

Validation removes U+000C and U+202E and trims surrounding whitespace without changing the strings sent. Entries are copied by index when the operation starts

readonly string[]

Stickers#

Create, list, copy, edit and delete community stickers

Use get for an optional local cache lookup, or fetchAll, fetchMetadata and fetchSource for remote reads. Shared guild request limits, deadlines and read retries apply. Writes retry only confirmed HTTP 429 rejections. Input, permission, not-found and malformed-response errors are not retried. A lost response can leave a write applied. Results are frozen snapshots, not gateway acknowledgement

interface Stickers

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

clone#

Copy a sticker into a community by its source ID, using Fluxer's server-side copy

Source metadata is preserved. Fluxer enforces source copying restrictions

clone(
    guildId: string,
    sourceId: string,
    options?: AuditedRequestOptions
): ResultAsync<
    GuildSticker,
    ConfigurationError | GuildOperationFailure | CancelledError
>clone(
  guildId: string,
  sourceId: string,
  options?: AuditedRequestOptions
): ResultAsync<
  GuildSticker,
  | ConfigurationError
  | GuildOperationFailure
  | CancelledError
>

Parameters

guildId
string
sourceId
string
options optional
AuditedRequestOptions

create#

Upload one community sticker and return its metadata

Inputs are copied when execution starts. No image URL is fetched automatically. Fluxer checks image format, dimensions, permissions and capacity. A write with an unknown outcome is not replayed

create(
    guildId: string,
    input: StickerCreate,
    options?: AuditedRequestOptions
): ResultAsync<
    GuildSticker,
    ConfigurationError | GuildOperationFailure | CancelledError
>create(
  guildId: string,
  input: StickerCreate,
  options?: AuditedRequestOptions
): ResultAsync<
  GuildSticker,
  | ConfigurationError
  | GuildOperationFailure
  | CancelledError
>

Parameters

guildId
string
options optional
AuditedRequestOptions

createMany#

Upload 1–50 community stickers in one batch and return separate successes and failures

The input array is copied by index, then its entries are copied when execution starts. Some uploads can succeed while others fail. No rollback or automatic chunking is performed. Failures named by duplicate sticker names cannot be matched reliably to input positions. After an unknown outcome, fetch fresh remote data rather than blindly replaying the batch

createMany(
    guildId: string,
    input: readonly StickerCreate[],
    options?: AuditedRequestOptions
): ResultAsync<
    ExpressionBatch<GuildSticker>,
    ConfigurationError | GuildOperationFailure | CancelledError
>createMany(
  guildId: string,
  input: readonly StickerCreate[],
  options?: AuditedRequestOptions
): ResultAsync<
  ExpressionBatch<GuildSticker>,
  | ConfigurationError
  | GuildOperationFailure
  | CancelledError
>

Parameters

guildId
string
input
readonly StickerCreate[]
options optional
AuditedRequestOptions

delete#

Remove a sticker, succeeding with no value after HTTP 204

Retained metadata is invalidated. A missing target is an error, not proof of an earlier deletion. The purge option defaults to false. Setting it to true also queues irreversible media removal, subject to Fluxer's restrictions

delete(
    target: ExpressionReference,
    options?: ExpressionDeleteOptions
): ResultAsync<
    void,
    ConfigurationError | GuildOperationFailure | CancelledError
>delete(
  target: ExpressionReference,
  options?: ExpressionDeleteOptions
): ResultAsync<
  void,
  | ConfigurationError
  | GuildOperationFailure
  | CancelledError
>

Parameters

options optional
ExpressionDeleteOptions

edit#

Replace a sticker's name, description and tags without changing its image or fetching it first

A fetched sticker can be spread into input if its identity matches the target. Unknown fields fail locally. An empty or null description clears it, and [] clears tags. The namespace's write, failure and cancellation rules apply

edit(
    target: ExpressionReference,
    input: StickerEdit,
    options?: AuditedRequestOptions
): ResultAsync<
    GuildSticker,
    ConfigurationError | GuildOperationFailure | CancelledError
>edit(
  target: ExpressionReference,
  input: StickerEdit,
  options?: AuditedRequestOptions
): ResultAsync<
  GuildSticker,
  | ConfigurationError
  | GuildOperationFailure
  | CancelledError
>

Parameters

options optional
AuditedRequestOptions

fetchAll#

Fetch a community's sticker list in Fluxer's order, without pagination

The list can change after the response and is not an ongoing completeness guarantee. An enabled metadata cache can retain results, but not image bytes or creator accounts

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

Parameters

guildId
string
options optional
RequestOptions

fetchMetadata#

Fetch minimal sticker metadata by decimal ID, without requiring source-community membership

This read does not populate the cache

fetchMetadata(id: string, options?: RequestOptions): ResultAsync<
    ExpressionMetadata,
    ConfigurationError | GuildOperationFailure | CancelledError
>fetchMetadata(
  id: string,
  options?: RequestOptions
): ResultAsync<
  ExpressionMetadata,
  | ConfigurationError
  | GuildOperationFailure
  | CancelledError
>

Parameters

id
string
options optional
RequestOptions

fetchSource#

Fetch the public presentation of the community that owns a custom sticker with this decimal ID: Its ID, name, icon hash and badges

Fluxer answers when the source community is discoverable or the bot is a member of it. A private source community the bot is not in, an unavailable community or an unknown sticker fails with GuildOperationError whose apiError.code is unknownResource, without revealing which case applies. This read does not populate the cache, and the result does not update when the community changes

fetchSource(id: string, options?: RequestOptions): ResultAsync<
    ExpressionSourceGuild,
    ConfigurationError | GuildOperationFailure | CancelledError
>fetchSource(
  id: string,
  options?: RequestOptions
): ResultAsync<
  ExpressionSourceGuild,
  | ConfigurationError
  | GuildOperationFailure
  | CancelledError
>

Parameters

id
string
options optional
RequestOptions

get#

Look up cached sticker metadata using decimal guildId and id, without an HTTP request

The result is undefined when caching is disabled or the entry is absent, expired or invalidated by a conflicting change. 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(target: ExpressionReference): GuildSticker | undefinedget(
  target: ExpressionReference
): GuildSticker | undefined

Parameters

Returns
GuildSticker | undefined

Returns the value synchronously. Unexpected failures throw SdkDefect