@fluxerjs/util 2.1.0 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -33,37 +33,172 @@ declare class BitField<S extends string> {
33
33
  [Symbol.iterator](): IterableIterator<S>;
34
34
  }
35
35
 
36
- /** Fluxer epoch (2015-01-01 00:00:00 UTC) in milliseconds. */
37
- declare const FLUXER_EPOCH = 1420070400000n;
38
- interface DeconstructedSnowflake {
39
- /** Unix timestamp in milliseconds. */
40
- timestamp: number;
41
- date: Date;
42
- workerId: number;
43
- processId: number;
44
- increment: number;
36
+ /**
37
+ * Get the Unicode character for a known shortcode name.
38
+ * Case-insensitive. Returns undefined if the shortcode is not in the map.
39
+ */
40
+ declare function getUnicodeFromShortcode(name: string): string | undefined;
41
+
42
+ /**
43
+ * Stable machine-readable error codes for {@link FluxerError}.
44
+ * Keys are PascalCase; values are SCREAMING_SNAKE.
45
+ */
46
+ declare const ErrorCodes: {
47
+ readonly ClientNotReady: "CLIENT_NOT_READY";
48
+ readonly NotLoggedIn: "NOT_LOGGED_IN";
49
+ readonly InvalidToken: "INVALID_TOKEN";
50
+ readonly AlreadyLoggedIn: "ALREADY_LOGGED_IN";
51
+ readonly ChannelNotFound: "CHANNEL_NOT_FOUND";
52
+ readonly MessageNotFound: "MESSAGE_NOT_FOUND";
53
+ readonly GuildNotFound: "GUILD_NOT_FOUND";
54
+ readonly MemberNotFound: "MEMBER_NOT_FOUND";
55
+ readonly RoleNotFound: "ROLE_NOT_FOUND";
56
+ readonly EmojiNotInGuild: "EMOJI_NOT_IN_GUILD";
57
+ readonly EmojiNotFound: "EMOJI_NOT_FOUND";
58
+ readonly InvalidEmoji: "INVALID_EMOJI";
59
+ readonly EmojiRequiresGuild: "EMOJI_REQUIRES_GUILD";
60
+ readonly WebhookTokenRequired: "WEBHOOK_TOKEN_REQUIRED";
61
+ readonly InvalidInvite: "INVALID_INVITE";
62
+ readonly InvalidFileUrl: "INVALID_FILE_URL";
63
+ readonly FileFetchFailed: "FILE_FETCH_FAILED";
64
+ readonly InvalidAttachment: "INVALID_ATTACHMENT";
65
+ readonly WebSocketLoadFailed: "WEBSOCKET_LOAD_FAILED";
66
+ readonly GatewayConnectionAborted: "GATEWAY_CONNECTION_ABORTED";
67
+ readonly GatewayFetchFailed: "GATEWAY_FETCH_FAILED";
68
+ readonly AttachmentFilenameRequired: "ATTACHMENT_FILENAME_REQUIRED";
69
+ readonly InvalidEmbedMediaUrl: "INVALID_EMBED_MEDIA_URL";
70
+ readonly InvalidEmbedUrl: "INVALID_EMBED_URL";
71
+ readonly VoiceWebSocketRequired: "VOICE_WEBSOCKET_REQUIRED";
72
+ readonly VoiceHttpError: "VOICE_HTTP_ERROR";
73
+ readonly VoiceNoResponseBody: "VOICE_NO_RESPONSE_BODY";
74
+ readonly InvalidInstanceDiscovery: "INVALID_INSTANCE_DISCOVERY";
75
+ readonly ConflictingInstanceConfig: "CONFLICTING_INSTANCE_CONFIG";
76
+ /** @beta ClientCluster: duplicate runtime id */
77
+ readonly DuplicateRuntimeId: "DUPLICATE_RUNTIME_ID";
78
+ /** @beta ClientCluster: unknown runtime id */
79
+ readonly RuntimeNotFound: "RUNTIME_NOT_FOUND";
80
+ /** @beta ClientCluster: concurrent conflicting op on same id */
81
+ readonly RuntimeConflict: "RUNTIME_CONFLICT";
82
+ /** @beta ClientCluster: cluster already destroyed */
83
+ readonly ClusterDestroyed: "CLUSTER_DESTROYED";
84
+ /** @beta ClientCluster: prebuilt client already logged in */
85
+ readonly RuntimeAlreadyLoggedIn: "RUNTIME_ALREADY_LOGGED_IN";
86
+ /** @beta ClientCluster: missing/empty runtime id or token */
87
+ readonly InvalidRuntimeConfig: "INVALID_RUNTIME_CONFIG";
88
+ readonly EmptyMessage: "EMPTY_MESSAGE";
89
+ readonly InvalidMessageOptions: "INVALID_MESSAGE_OPTIONS";
90
+ readonly InvalidBulkDelete: "INVALID_BULK_DELETE";
91
+ /** Fetch / bulk-fetch limit or batch size out of range. */
92
+ readonly InvalidFetchLimit: "INVALID_FETCH_LIMIT";
93
+ /** Attachment plan/file mismatch or invalid attachment input. */
94
+ readonly InvalidAttachmentInput: "INVALID_ATTACHMENT_INPUT";
95
+ /** Presigned CDN PUT failed. */
96
+ readonly AttachmentUploadFailed: "ATTACHMENT_UPLOAD_FAILED";
97
+ /** Operation requires a personal-notes channel (or wrong channel type). */
98
+ readonly InvalidChannelType: "INVALID_CHANNEL_TYPE";
99
+ /** Gateway opcode payload missing required fields. */
100
+ readonly InvalidGatewayRequest: "INVALID_GATEWAY_REQUEST";
101
+ /** Collector ended because its time limit elapsed. */
102
+ readonly CollectorIdle: "COLLECTOR_IDLE";
103
+ /** Collector ended because its max item limit was reached. */
104
+ readonly CollectorMax: "COLLECTOR_MAX";
105
+ /** Collector requires `time` and/or `max`. */
106
+ readonly CollectorOptionsRequired: "COLLECTOR_OPTIONS_REQUIRED";
107
+ };
108
+ type ErrorCode = (typeof ErrorCodes)[keyof typeof ErrorCodes];
109
+
110
+ interface FluxerErrorOptions {
111
+ /** Machine-readable code from {@link ErrorCodes}. */
112
+ code?: ErrorCode | string;
113
+ cause?: unknown;
45
114
  }
46
115
  /**
47
- * Fluxer snowflake IDs (Twitter layout, custom epoch).
48
- * Public API is string-only — never number — to avoid precision loss above 2^53.
116
+ * Base error for Fluxer SDK failures.
117
+ * Prefer an {@link ErrorCodes} value so callers can branch on `error.code`.
49
118
  */
50
- declare class SnowflakeUtil {
51
- static readonly EPOCH = 1420070400000n;
52
- /** Whether `value` is a non-negative decimal snowflake string (≤ 20 digits). */
53
- static isValid(snowflake: string): boolean;
54
- /** Parse a snowflake string to bigint. */
55
- static parse(snowflake: Snowflake): bigint;
56
- /** Unix timestamp (ms) from a snowflake. */
57
- static timestampFromSnowflake(snowflake: Snowflake): number;
58
- /** Date from a snowflake. */
59
- static dateFromSnowflake(snowflake: Snowflake): Date;
60
- /**
61
- * Snowflake string from a Unix timestamp (ms).
62
- * Useful for pagination (`before` / `after`).
63
- */
64
- static snowflakeFromTimestamp(timestamp: number): Snowflake;
65
- /** Deconstruct a snowflake into timestamp / worker / process / increment. */
66
- static deconstruct(snowflake: Snowflake): DeconstructedSnowflake;
119
+ declare class FluxerError extends Error {
120
+ readonly code: string | undefined;
121
+ constructor(message: string, options?: FluxerErrorOptions);
122
+ static isFluxerError(error: unknown): error is FluxerError;
123
+ toString(): string;
124
+ toJSON(): {
125
+ name: string;
126
+ message: string;
127
+ code?: string;
128
+ cause?: unknown;
129
+ };
130
+ }
131
+
132
+ /**
133
+ * Format a number as a `#rrggbb` hex color string.
134
+ */
135
+ declare function formatColor(color: number): string;
136
+ /**
137
+ * Escape markdown formatting characters in a string.
138
+ */
139
+ declare function escapeMarkdown(text: string): string;
140
+ type TimestampStyle = 't' | 'T' | 'd' | 'D' | 'f' | 'F' | 'R';
141
+ /**
142
+ * Format a Unix timestamp (milliseconds) as a Fluxer timestamp mention.
143
+ * @param timestampMs - Unix timestamp in milliseconds
144
+ * @param style - Optional display style (`t`, `T`, `d`, `D`, `f`, `F`, `R`)
145
+ */
146
+ declare function formatTimestamp(timestampMs: number, style?: TimestampStyle): string;
147
+ /**
148
+ * Truncate a string to a maximum length with an optional suffix.
149
+ * If `maxLength` is smaller than the suffix, returns the suffix truncated to `maxLength`.
150
+ */
151
+ declare function truncate(str: string, maxLength: number, suffix?: string): string;
152
+
153
+ /** Result for embed media: url and optional flags. */
154
+ interface KlipyMediaResult {
155
+ url: string;
156
+ flags?: number;
157
+ }
158
+ /**
159
+ * Resolve a Klipy view URL to a direct GIF URL for embeds.
160
+ * Prefers JSON-LD / Open Graph from the page; falls back to oEmbed thumbnail → `.gif`.
161
+ */
162
+ declare function resolveKlipyToImageUrl(klipyViewUrl: string): Promise<KlipyMediaResult | null>;
163
+
164
+ type LogLevel = 'error' | 'warn' | 'info' | 'debug';
165
+ type LogFields = Record<string, unknown>;
166
+ type LoggerSink = (level: LogLevel, message: string, fields?: LogFields) => void;
167
+ interface LoggerOptions {
168
+ /** Minimum level to emit. Default: `warn`. */
169
+ level?: LogLevel;
170
+ /** Optional sink; defaults to console. */
171
+ sink?: LoggerSink;
172
+ }
173
+ interface Logger {
174
+ readonly level: LogLevel;
175
+ error(message: string, fields?: LogFields): void;
176
+ warn(message: string, fields?: LogFields): void;
177
+ info(message: string, fields?: LogFields): void;
178
+ debug(message: string, fields?: LogFields): void;
179
+ child(fields: LogFields): Logger;
180
+ }
181
+ /** Walk `Error.cause` into a plain JSON-safe object. */
182
+ declare function serializeError(err: unknown, depth?: number): Record<string, unknown> | string;
183
+ declare function createLogger(options?: LoggerOptions): Logger;
184
+
185
+ /**
186
+ * Message flag bits for {@link MessageFlagsBitField}.
187
+ * Values mirror `@fluxerjs/types` {@link MessageFlags} (int32 wire bitfield) as bigint.
188
+ */
189
+ declare const MessageFlagsBits: {
190
+ readonly SuppressEmbeds: bigint;
191
+ readonly SuppressNotifications: bigint;
192
+ readonly VoiceMessage: bigint;
193
+ };
194
+ type MessageFlagsString = keyof typeof MessageFlagsBits;
195
+ type MessageFlagsResolvable = BitFieldResolvable<MessageFlagsString>;
196
+ declare class MessageFlagsBitField extends BitField<MessageFlagsString> {
197
+ static Flags: {
198
+ readonly SuppressEmbeds: bigint;
199
+ readonly SuppressNotifications: bigint;
200
+ readonly VoiceMessage: bigint;
201
+ };
67
202
  }
68
203
 
69
204
  /**
@@ -164,25 +299,86 @@ declare class PermissionsBitField extends BitField<PermissionString> {
164
299
  /** Resolve permission(s) to an API bitfield string (decimal bigint). */
165
300
  declare function resolvePermissionsToBitfield(perms: PermissionResolvable): string;
166
301
 
302
+ /** Narrow unknown values to plain objects (not arrays / null). */
303
+ declare function isRecord(value: unknown): value is Record<string, unknown>;
304
+ /** Same as {@link isRecord}, or `null` when the value is not a record. */
305
+ declare function asRecord(value: unknown): Record<string, unknown> | null;
306
+ declare function str(value: unknown): string | undefined;
307
+ declare function num(value: unknown): number | undefined;
308
+
167
309
  /**
168
- * Message flag bits for {@link MessageFlagsBitField}.
169
- * Values mirror `@fluxerjs/types` {@link MessageFlags} (int32 wire bitfield) as bigint.
310
+ * Resolve a color from various input types to a number (0–16777215).
170
311
  */
171
- declare const MessageFlagsBits: {
172
- readonly SuppressEmbeds: bigint;
173
- readonly SuppressNotifications: bigint;
174
- readonly VoiceMessage: bigint;
175
- readonly CompactAttachments: bigint;
176
- };
177
- type MessageFlagsString = keyof typeof MessageFlagsBits;
178
- type MessageFlagsResolvable = BitFieldResolvable<MessageFlagsString>;
179
- declare class MessageFlagsBitField extends BitField<MessageFlagsString> {
180
- static Flags: {
181
- readonly SuppressEmbeds: bigint;
182
- readonly SuppressNotifications: bigint;
183
- readonly VoiceMessage: bigint;
184
- readonly CompactAttachments: bigint;
185
- };
312
+ declare function resolveColor(color: number | string | readonly [number, number, number]): number;
313
+ interface ParsedEmoji {
314
+ id: string | null;
315
+ name: string;
316
+ animated?: boolean;
317
+ }
318
+ /**
319
+ * Parse an emoji string into id and name.
320
+ * Supports: `<a?:name:id>`, `:name:`, `name:id`, unicode.
321
+ */
322
+ declare function parseEmoji(emoji: string): ParsedEmoji | null;
323
+ /**
324
+ * Parse a user mention or raw snowflake and extract the user ID.
325
+ * Supports: `<@id>`, `<@!id>`, or a valid snowflake string.
326
+ */
327
+ declare function parseUserMention(arg: string): string | null;
328
+ /**
329
+ * Parse a role mention (`<@&id>`) and extract the role ID.
330
+ */
331
+ declare function parseRoleMention(arg: string): string | null;
332
+ interface ParsedPrefixCommand {
333
+ command: string;
334
+ args: string[];
335
+ }
336
+ /**
337
+ * Parse prefix command content into command name and args.
338
+ * Returns null if content does not start with the prefix.
339
+ */
340
+ declare function parsePrefixCommand(content: string, prefix: string): ParsedPrefixCommand | null;
341
+ /**
342
+ * Convert emoji to API reaction format.
343
+ * Custom: `name:id` (animated: `a:name:id`); Unicode: raw character (routes encode).
344
+ */
345
+ declare function formatEmoji(emoji: {
346
+ id: string | null;
347
+ name: string;
348
+ animated?: boolean;
349
+ }): string;
350
+
351
+ /** Fluxer epoch (2015-01-01 00:00:00 UTC) in milliseconds. */
352
+ declare const FLUXER_EPOCH = 1420070400000n;
353
+ interface DeconstructedSnowflake {
354
+ /** Unix timestamp in milliseconds. */
355
+ timestamp: number;
356
+ date: Date;
357
+ workerId: number;
358
+ processId: number;
359
+ increment: number;
360
+ }
361
+ /**
362
+ * Fluxer snowflake IDs (Twitter layout, custom epoch).
363
+ * Public API is string-only — never number — to avoid precision loss above 2^53.
364
+ */
365
+ declare class SnowflakeUtil {
366
+ static readonly EPOCH = 1420070400000n;
367
+ /** Whether `value` is a non-negative decimal snowflake string (≤ 20 digits). */
368
+ static isValid(snowflake: string): boolean;
369
+ /** Parse a snowflake string to bigint. */
370
+ static parse(snowflake: Snowflake): bigint;
371
+ /** Unix timestamp (ms) from a snowflake. */
372
+ static timestampFromSnowflake(snowflake: Snowflake): number;
373
+ /** Date from a snowflake. */
374
+ static dateFromSnowflake(snowflake: Snowflake): Date;
375
+ /**
376
+ * Snowflake string from a Unix timestamp (ms).
377
+ * Useful for pagination (`before` / `after`).
378
+ */
379
+ static snowflakeFromTimestamp(timestamp: number): Snowflake;
380
+ /** Deconstruct a snowflake into timestamp / worker / process / increment. */
381
+ static deconstruct(snowflake: Snowflake): DeconstructedSnowflake;
186
382
  }
187
383
 
188
384
  /**
@@ -260,160 +456,4 @@ declare class UserFlagsBitField extends BitField<UserFlagsString> {
260
456
  };
261
457
  }
262
458
 
263
- /**
264
- * Format a number as a `#rrggbb` hex color string.
265
- */
266
- declare function formatColor(color: number): string;
267
- /**
268
- * Escape markdown formatting characters in a string.
269
- */
270
- declare function escapeMarkdown(text: string): string;
271
- type TimestampStyle = 't' | 'T' | 'd' | 'D' | 'f' | 'F' | 'R';
272
- /**
273
- * Format a Unix timestamp (milliseconds) as a Fluxer/Discord timestamp mention.
274
- * @param timestampMs - Unix timestamp in milliseconds
275
- * @param style - Optional display style (`t`, `T`, `d`, `D`, `f`, `F`, `R`)
276
- */
277
- declare function formatTimestamp(timestampMs: number, style?: TimestampStyle): string;
278
- /**
279
- * Truncate a string to a maximum length with an optional suffix.
280
- * If `maxLength` is smaller than the suffix, returns the suffix truncated to `maxLength`.
281
- */
282
- declare function truncate(str: string, maxLength: number, suffix?: string): string;
283
-
284
- /**
285
- * Resolve a color from various input types to a number (0–16777215).
286
- */
287
- declare function resolveColor(color: number | string | readonly [number, number, number]): number;
288
- interface ParsedEmoji {
289
- id: string | null;
290
- name: string;
291
- animated?: boolean;
292
- }
293
- /**
294
- * Parse an emoji string into id and name.
295
- * Supports: `<a?:name:id>`, `:name:`, `name:id`, unicode.
296
- */
297
- declare function parseEmoji(emoji: string): ParsedEmoji | null;
298
- /**
299
- * Parse a user mention or raw snowflake and extract the user ID.
300
- * Supports: `<@id>`, `<@!id>`, or a valid snowflake string.
301
- */
302
- declare function parseUserMention(arg: string): string | null;
303
- /**
304
- * Parse a role mention (`<@&id>`) and extract the role ID.
305
- */
306
- declare function parseRoleMention(arg: string): string | null;
307
- interface ParsedPrefixCommand {
308
- command: string;
309
- args: string[];
310
- }
311
- /**
312
- * Parse prefix command content into command name and args.
313
- * Returns null if content does not start with the prefix.
314
- */
315
- declare function parsePrefixCommand(content: string, prefix: string): ParsedPrefixCommand | null;
316
- /**
317
- * Convert emoji to API reaction format.
318
- * Custom: `name:id` (animated: `a:name:id`); Unicode: URI-encoded character.
319
- */
320
- declare function formatEmoji(emoji: {
321
- id: string | null;
322
- name: string;
323
- animated?: boolean;
324
- }): string;
325
-
326
- /**
327
- * Get the Unicode character for a known shortcode name.
328
- * Case-insensitive. Returns undefined if the shortcode is not in the map.
329
- */
330
- declare function getUnicodeFromShortcode(name: string): string | undefined;
331
-
332
- /** Result for embed media: url and optional flags. */
333
- interface TenorMediaResult {
334
- url: string;
335
- flags?: number;
336
- }
337
- /**
338
- * Resolve a Tenor view URL to a direct GIF URL for embeds.
339
- * Prefers JSON-LD from the page; falls back to oEmbed thumbnail → `.gif`.
340
- */
341
- declare function resolveTenorToImageUrl(tenorViewUrl: string): Promise<TenorMediaResult | null>;
342
-
343
- /**
344
- * Stable machine-readable error codes for {@link FluxerError}.
345
- * Keys are PascalCase; values are SCREAMING_SNAKE.
346
- */
347
- declare const ErrorCodes: {
348
- readonly ClientNotReady: "CLIENT_NOT_READY";
349
- readonly NotLoggedIn: "NOT_LOGGED_IN";
350
- readonly InvalidToken: "INVALID_TOKEN";
351
- readonly AlreadyLoggedIn: "ALREADY_LOGGED_IN";
352
- readonly ChannelNotFound: "CHANNEL_NOT_FOUND";
353
- readonly MessageNotFound: "MESSAGE_NOT_FOUND";
354
- readonly GuildNotFound: "GUILD_NOT_FOUND";
355
- readonly MemberNotFound: "MEMBER_NOT_FOUND";
356
- readonly RoleNotFound: "ROLE_NOT_FOUND";
357
- readonly EmojiNotInGuild: "EMOJI_NOT_IN_GUILD";
358
- readonly EmojiNotFound: "EMOJI_NOT_FOUND";
359
- readonly InvalidEmoji: "INVALID_EMOJI";
360
- readonly EmojiRequiresGuild: "EMOJI_REQUIRES_GUILD";
361
- readonly WebhookTokenRequired: "WEBHOOK_TOKEN_REQUIRED";
362
- readonly InvalidInvite: "INVALID_INVITE";
363
- readonly InvalidFileUrl: "INVALID_FILE_URL";
364
- readonly FileFetchFailed: "FILE_FETCH_FAILED";
365
- readonly InvalidAttachment: "INVALID_ATTACHMENT";
366
- readonly WebSocketLoadFailed: "WEBSOCKET_LOAD_FAILED";
367
- readonly GatewayConnectionAborted: "GATEWAY_CONNECTION_ABORTED";
368
- readonly GatewayFetchFailed: "GATEWAY_FETCH_FAILED";
369
- readonly AttachmentFilenameRequired: "ATTACHMENT_FILENAME_REQUIRED";
370
- readonly InvalidEmbedMediaUrl: "INVALID_EMBED_MEDIA_URL";
371
- readonly InvalidEmbedUrl: "INVALID_EMBED_URL";
372
- readonly VoiceWebSocketRequired: "VOICE_WEBSOCKET_REQUIRED";
373
- readonly VoiceHttpError: "VOICE_HTTP_ERROR";
374
- readonly VoiceNoResponseBody: "VOICE_NO_RESPONSE_BODY";
375
- readonly InvalidInstanceDiscovery: "INVALID_INSTANCE_DISCOVERY";
376
- readonly ConflictingInstanceConfig: "CONFLICTING_INSTANCE_CONFIG";
377
- /** @beta ClientCluster: duplicate runtime id */
378
- readonly DuplicateRuntimeId: "DUPLICATE_RUNTIME_ID";
379
- /** @beta ClientCluster: unknown runtime id */
380
- readonly RuntimeNotFound: "RUNTIME_NOT_FOUND";
381
- /** @beta ClientCluster: concurrent conflicting op on same id */
382
- readonly RuntimeConflict: "RUNTIME_CONFLICT";
383
- /** @beta ClientCluster: cluster already destroyed */
384
- readonly ClusterDestroyed: "CLUSTER_DESTROYED";
385
- /** @beta ClientCluster: prebuilt client already logged in */
386
- readonly RuntimeAlreadyLoggedIn: "RUNTIME_ALREADY_LOGGED_IN";
387
- /** @beta ClientCluster: missing/empty runtime id or token */
388
- readonly InvalidRuntimeConfig: "INVALID_RUNTIME_CONFIG";
389
- readonly EmptyMessage: "EMPTY_MESSAGE";
390
- readonly InvalidMessageOptions: "INVALID_MESSAGE_OPTIONS";
391
- readonly InvalidBulkDelete: "INVALID_BULK_DELETE";
392
- /** Fetch / bulk-fetch limit or batch size out of range. */
393
- readonly InvalidFetchLimit: "INVALID_FETCH_LIMIT";
394
- /** Attachment plan/file mismatch or invalid attachment input. */
395
- readonly InvalidAttachmentInput: "INVALID_ATTACHMENT_INPUT";
396
- /** Presigned CDN PUT failed. */
397
- readonly AttachmentUploadFailed: "ATTACHMENT_UPLOAD_FAILED";
398
- /** Operation requires a personal-notes channel (or wrong channel type). */
399
- readonly InvalidChannelType: "INVALID_CHANNEL_TYPE";
400
- };
401
- type ErrorCode = (typeof ErrorCodes)[keyof typeof ErrorCodes];
402
-
403
- interface FluxerErrorOptions {
404
- /** Machine-readable code from {@link ErrorCodes}. */
405
- code?: ErrorCode | string;
406
- cause?: unknown;
407
- }
408
- /**
409
- * Base error for Fluxer SDK failures.
410
- * Prefer an {@link ErrorCodes} value so callers can branch on `error.code`.
411
- */
412
- declare class FluxerError extends Error {
413
- readonly code: string | undefined;
414
- constructor(message: string, options?: FluxerErrorOptions);
415
- static isFluxerError(error: unknown): error is FluxerError;
416
- toString(): string;
417
- }
418
-
419
- export { ALL_PERMISSIONS_BIGINT, BitField, type BitFieldResolvable, type DeconstructedSnowflake, type ErrorCode, ErrorCodes, FLUXER_EPOCH, FluxerError, type FluxerErrorOptions, MessageFlagsBitField, MessageFlagsBits, type MessageFlagsResolvable, type MessageFlagsString, type ParsedEmoji, type ParsedPrefixCommand, PermissionFlags, type PermissionResolvable, type PermissionString, PermissionsBitField, SnowflakeUtil, type TenorMediaResult, type TimestampStyle, UserFlagsBitField, UserFlagsBits, type UserFlagsResolvable, type UserFlagsString, escapeMarkdown, formatColor, formatEmoji, formatTimestamp, getUnicodeFromShortcode, parseEmoji, parsePrefixCommand, parseRoleMention, parseUserMention, resolveColor, resolvePermissionsToBitfield, resolveTenorToImageUrl, truncate };
459
+ export { ALL_PERMISSIONS_BIGINT, BitField, type BitFieldResolvable, type DeconstructedSnowflake, type ErrorCode, ErrorCodes, FLUXER_EPOCH, FluxerError, type FluxerErrorOptions, type KlipyMediaResult, type LogFields, type LogLevel, type Logger, type LoggerOptions, type LoggerSink, MessageFlagsBitField, MessageFlagsBits, type MessageFlagsResolvable, type MessageFlagsString, type ParsedEmoji, type ParsedPrefixCommand, PermissionFlags, type PermissionResolvable, type PermissionString, PermissionsBitField, SnowflakeUtil, type TimestampStyle, UserFlagsBitField, UserFlagsBits, type UserFlagsResolvable, type UserFlagsString, asRecord, createLogger, escapeMarkdown, formatColor, formatEmoji, formatTimestamp, getUnicodeFromShortcode, isRecord, num, parseEmoji, parsePrefixCommand, parseRoleMention, parseUserMention, resolveColor, resolveKlipyToImageUrl, resolvePermissionsToBitfield, serializeError, str, truncate };