@fluxerjs/core 3.0.0 → 3.1.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/{SubpathMessage-CjQBbVmb.d.mts → SubpathMessage-Cj_U0V19.d.mts} +64 -21
- package/dist/{SubpathMessage-DNlKq2Nj.d.ts → SubpathMessage-DaimQAd9.d.ts} +64 -21
- package/dist/{Sudo-CFfbmis3.d.mts → Sudo-fOKSPbxN.d.mts} +8 -0
- package/dist/{Sudo-CFfbmis3.d.ts → Sudo-fOKSPbxN.d.ts} +8 -0
- package/dist/client.d.mts +2 -2
- package/dist/client.d.ts +2 -2
- package/dist/client.js +282 -89
- package/dist/client.mjs +282 -89
- package/dist/cluster.d.mts +3 -3
- package/dist/cluster.d.ts +3 -3
- package/dist/cluster.js +282 -89
- package/dist/cluster.mjs +282 -89
- package/dist/index.d.mts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +286 -89
- package/dist/index.mjs +284 -89
- package/dist/internal.d.mts +2 -2
- package/dist/internal.d.ts +2 -2
- package/dist/message.d.mts +2 -2
- package/dist/message.d.ts +2 -2
- package/dist/message.js +83 -3
- package/dist/message.mjs +83 -3
- package/package.json +5 -5
|
@@ -7,7 +7,7 @@ import { EventEmitter } from 'node:events';
|
|
|
7
7
|
import { REST } from '@fluxerjs/rest';
|
|
8
8
|
import * as _fluxerjs_ws from '@fluxerjs/ws';
|
|
9
9
|
import { WebSocketManager } from '@fluxerjs/ws';
|
|
10
|
-
import { a as RoleEditOptions, I as GuildMemberSearchOptions, M as MessageAttachmentEdit, F as GuildChannelCreateOptions, R as RoleCreateOptions, E as DiscoveryStatusPayload, D as DiscoveryApplicationOptions, z as DiscoveryApplicationPayload, S as SudoVerificationOptions, P as PresenceUpdateOptions, O as ProfilePayload, v as AttachmentUploadPlanItem, w as AttachmentUploadPlanResponse, A as AttachmentUploadCompleteItem, u as AttachmentUploadCompleteResponse, Q as RtcRegionPayload, y as ChannelSlowmodePayload, x as ChannelInviteCreateOptions, C as ChannelEditOptions, G as GroupDmEditOptions, H as GuildMemberEditOptions, B as BulkFetchMessagesRequest, K as MessageSearchOptions, L as MessageSearchResponse } from './Sudo-
|
|
10
|
+
import { a as RoleEditOptions, I as GuildMemberSearchOptions, M as MessageAttachmentEdit, F as GuildChannelCreateOptions, R as RoleCreateOptions, E as DiscoveryStatusPayload, D as DiscoveryApplicationOptions, z as DiscoveryApplicationPayload, S as SudoVerificationOptions, P as PresenceUpdateOptions, O as ProfilePayload, v as AttachmentUploadPlanItem, w as AttachmentUploadPlanResponse, A as AttachmentUploadCompleteItem, u as AttachmentUploadCompleteResponse, Q as RtcRegionPayload, y as ChannelSlowmodePayload, x as ChannelInviteCreateOptions, C as ChannelEditOptions, G as GroupDmEditOptions, H as GuildMemberEditOptions, B as BulkFetchMessagesRequest, K as MessageSearchOptions, L as MessageSearchResponse } from './Sudo-fOKSPbxN.mjs';
|
|
11
11
|
import { EmbedBuilder, AttachmentBuilder, MessagePayload } from '@fluxerjs/builders';
|
|
12
12
|
|
|
13
13
|
type GuildData = Partial<APIGuild> & {
|
|
@@ -323,13 +323,14 @@ declare class GuildEmoji extends Base {
|
|
|
323
323
|
/** Renders this emoji for use in message content: `<:name:id>` (or `<a:name:id>` when animated). */
|
|
324
324
|
toString(): string;
|
|
325
325
|
/** Delete this emoji. Requires Manage Emojis and Stickers permission. */
|
|
326
|
-
delete(): Promise<void>;
|
|
326
|
+
delete(reason?: string): Promise<void>;
|
|
327
327
|
/**
|
|
328
328
|
* Edit this emoji's name.
|
|
329
329
|
* Requires Manage Emojis and Stickers permission.
|
|
330
330
|
*/
|
|
331
331
|
edit(options: {
|
|
332
332
|
name: string;
|
|
333
|
+
reason?: string;
|
|
333
334
|
}): Promise<GuildEmoji>;
|
|
334
335
|
}
|
|
335
336
|
|
|
@@ -361,7 +362,7 @@ declare class GuildSticker extends Base {
|
|
|
361
362
|
/** Date when this sticker was created, derived from its snowflake ID. */
|
|
362
363
|
get createdAt(): Date;
|
|
363
364
|
/** Delete this sticker. Requires Manage Emojis and Stickers permission. */
|
|
364
|
-
delete(): Promise<void>;
|
|
365
|
+
delete(reason?: string): Promise<void>;
|
|
365
366
|
/**
|
|
366
367
|
* Edit this sticker's name and/or description.
|
|
367
368
|
* Requires Manage Emojis and Stickers permission.
|
|
@@ -369,6 +370,7 @@ declare class GuildSticker extends Base {
|
|
|
369
370
|
edit(options: {
|
|
370
371
|
name?: string;
|
|
371
372
|
description?: string;
|
|
373
|
+
reason?: string;
|
|
372
374
|
}): Promise<GuildSticker>;
|
|
373
375
|
}
|
|
374
376
|
|
|
@@ -434,8 +436,9 @@ declare class Role extends Base {
|
|
|
434
436
|
edit(options: RoleEditOptions): Promise<Role>;
|
|
435
437
|
/**
|
|
436
438
|
* DELETE role. Requires Manage Roles.
|
|
439
|
+
* @param reason - Audit log reason (`X-Audit-Log-Reason`)
|
|
437
440
|
*/
|
|
438
|
-
delete(): Promise<void>;
|
|
441
|
+
delete(reason?: string): Promise<void>;
|
|
439
442
|
}
|
|
440
443
|
|
|
441
444
|
/**
|
|
@@ -1059,7 +1062,7 @@ declare class GuildBan extends Base {
|
|
|
1059
1062
|
* Remove this ban (unban the user).
|
|
1060
1063
|
* Requires Ban Members permission.
|
|
1061
1064
|
*/
|
|
1062
|
-
unban(): Promise<void>;
|
|
1065
|
+
unban(reason?: string): Promise<void>;
|
|
1063
1066
|
}
|
|
1064
1067
|
|
|
1065
1068
|
/**
|
|
@@ -1231,9 +1234,9 @@ declare class Guild extends Base {
|
|
|
1231
1234
|
/** Fetch all bans in this guild. Requires Ban Members. */
|
|
1232
1235
|
fetchBans(): Promise<GuildBan[]>;
|
|
1233
1236
|
/** Unban a user from the guild. Requires Ban Members. */
|
|
1234
|
-
unban(userId: string): Promise<void>;
|
|
1237
|
+
unban(userId: string, reason?: string): Promise<void>;
|
|
1235
1238
|
/** Kick a user from the guild. Requires Kick Members. */
|
|
1236
|
-
kick(userId: string): Promise<void>;
|
|
1239
|
+
kick(userId: string, reason?: string): Promise<void>;
|
|
1237
1240
|
/** Fetch all emojis in this guild from the API. */
|
|
1238
1241
|
fetchEmojis(): Promise<GuildEmoji[]>;
|
|
1239
1242
|
/** Fetch a specific emoji by ID. */
|
|
@@ -1242,6 +1245,7 @@ declare class Guild extends Base {
|
|
|
1242
1245
|
createEmoji(options: {
|
|
1243
1246
|
name: string;
|
|
1244
1247
|
image: string;
|
|
1248
|
+
reason?: string;
|
|
1245
1249
|
}): Promise<GuildEmoji>;
|
|
1246
1250
|
/** Clone an emoji from another guild. Requires Manage Emojis and Stickers. */
|
|
1247
1251
|
cloneEmoji(sourceEmojiId: string): Promise<GuildEmoji>;
|
|
@@ -1262,6 +1266,7 @@ declare class Guild extends Base {
|
|
|
1262
1266
|
image: string;
|
|
1263
1267
|
description?: string | null;
|
|
1264
1268
|
tags?: string[];
|
|
1269
|
+
reason?: string;
|
|
1265
1270
|
}): Promise<GuildSticker>;
|
|
1266
1271
|
/** Clone a sticker from another guild. Requires Manage Emojis and Stickers. */
|
|
1267
1272
|
cloneSticker(sourceStickerId: string): Promise<GuildSticker>;
|
|
@@ -1586,6 +1591,8 @@ declare class Message extends Base {
|
|
|
1586
1591
|
mentionRoles: string[];
|
|
1587
1592
|
/** Client-side nonce for deduplication. */
|
|
1588
1593
|
nonce: string | null;
|
|
1594
|
+
/** IDs of custom emojis in the message classified as explicit. */
|
|
1595
|
+
nsfwEmojis: string[];
|
|
1589
1596
|
/**
|
|
1590
1597
|
* Cached text-capable channel (guild text, guild voice, or DM), or null if uncached / not text-based.
|
|
1591
1598
|
* Narrowed type has {@link Channel.send} and {@link Channel.delete}.
|
|
@@ -1668,7 +1675,7 @@ declare class Message extends Base {
|
|
|
1668
1675
|
/** Fetch the latest version of this message from the API. */
|
|
1669
1676
|
fetch(): Promise<Message>;
|
|
1670
1677
|
/** Delete this message. */
|
|
1671
|
-
delete(): Promise<void>;
|
|
1678
|
+
delete(reason?: string): Promise<void>;
|
|
1672
1679
|
/** Delete a specific attachment from this message. */
|
|
1673
1680
|
deleteAttachment(attachmentId: string): Promise<void>;
|
|
1674
1681
|
/** Pin this message in the channel. */
|
|
@@ -1874,7 +1881,7 @@ declare function resolveCacheLimits(input?: CacheSizeLimits): ResolvedCacheOptio
|
|
|
1874
1881
|
* @example
|
|
1875
1882
|
* ```ts
|
|
1876
1883
|
* const client = new Client({
|
|
1877
|
-
* instance: {
|
|
1884
|
+
* instance: { api_public: 'https://api.example.com' },
|
|
1878
1885
|
* cache: { guilds: 100, messages: 20 },
|
|
1879
1886
|
* waitForGuilds: true,
|
|
1880
1887
|
* });
|
|
@@ -1885,33 +1892,51 @@ interface ClientOptions {
|
|
|
1885
1892
|
* Instance endpoints for this client (API, CDN, invite, etc.).
|
|
1886
1893
|
* Pass a partial map to override hosted defaults, or a full discovery document.
|
|
1887
1894
|
* Prefer this over `rest.api` for multi-instance / self-hosted bots.
|
|
1895
|
+
* REST uses `api_public`; `api` / `api_client` are kept for inspection.
|
|
1888
1896
|
* @see {@link Client.fromDiscovery}
|
|
1889
1897
|
*/
|
|
1890
1898
|
instance?: Partial<APIInstanceEndpoints> | APIInstance;
|
|
1891
1899
|
/**
|
|
1892
1900
|
* REST options. Prefer {@link ClientOptions.instance} for the API host.
|
|
1893
|
-
* If both `instance.
|
|
1901
|
+
* If both `instance.api_public` (or resolved default) and `rest.api` are set and differ, construction throws.
|
|
1894
1902
|
*/
|
|
1895
1903
|
rest?: Partial<ConstructorParameters<typeof REST>[0]>;
|
|
1896
1904
|
/**
|
|
1897
|
-
*
|
|
1905
|
+
* BCP 47 locale sent as REST `Accept-Language`. Defaults to {@link import('@fluxerjs/rest').DEFAULT_LOCALE}.
|
|
1906
|
+
* Overrides `rest.locale` when both are set.
|
|
1907
|
+
* @see {@link ClientOptions.rest}
|
|
1908
|
+
*/
|
|
1909
|
+
locale?: string;
|
|
1910
|
+
/**
|
|
1911
|
+
* @deprecated Fluxer has no intents. Prefer {@link ClientOptions.ignoredEvents}. Kept only for migration; identify always sends `0`.
|
|
1898
1912
|
*/
|
|
1899
1913
|
intents?: number;
|
|
1900
1914
|
/**
|
|
1901
1915
|
* @deprecated No-op. Fluxer has no intents warning to suppress.
|
|
1902
1916
|
*/
|
|
1903
1917
|
suppressIntentWarning?: boolean;
|
|
1904
|
-
/** {@link GatewayIdentifyFlags} bitfield sent as Identify `flags`. */
|
|
1918
|
+
/** {@link import('@fluxerjs/types').GatewayIdentifyFlags} bitfield sent as Identify `flags`. */
|
|
1905
1919
|
identifyFlags?: number;
|
|
1906
1920
|
/** Dispatch event names to suppress for this session (`ignored_events`). */
|
|
1907
1921
|
ignoredEvents?: string[];
|
|
1908
1922
|
/** Prefer hydrating this guild first after READY (`initial_guild_id`). */
|
|
1909
1923
|
initialGuildId?: string;
|
|
1910
1924
|
/**
|
|
1911
|
-
* Delay Ready until all READY guilds arrive via GUILD_CREATE; queue other dispatches until then.
|
|
1925
|
+
* Delay {@link Events.Ready} until all READY guilds arrive via GUILD_CREATE; queue other dispatches until then.
|
|
1926
|
+
* Startup backfill emits {@link Events.GuildAvailable} (not {@link Events.GuildCreate}) unless
|
|
1927
|
+
* {@link ClientOptions.emitGuildCreateOnStartup} is set.
|
|
1912
1928
|
* @default false
|
|
1929
|
+
* @see {@link ClientOptions.emitGuildCreateOnStartup}
|
|
1913
1930
|
*/
|
|
1914
1931
|
waitForGuilds?: boolean;
|
|
1932
|
+
/**
|
|
1933
|
+
* Emit {@link Events.GuildCreate} for READY / initial-stream guild hydrations instead of {@link Events.GuildAvailable}.
|
|
1934
|
+
* Default behavior matches Discord.js: startup backfill uses {@link Events.GuildAvailable}, and
|
|
1935
|
+
* {@link Events.GuildCreate} means the bot joined after {@link Events.Ready}.
|
|
1936
|
+
* @default false
|
|
1937
|
+
* @see {@link ClientOptions.waitForGuilds}
|
|
1938
|
+
*/
|
|
1939
|
+
emitGuildCreateOnStartup?: boolean;
|
|
1915
1940
|
/**
|
|
1916
1941
|
* Cache size limits per bucket. Defaults to {@link DEFAULT_CACHE_LIMITS}.
|
|
1917
1942
|
* Pass `0` / `Infinity` per numeric field for unbounded; `messages: false` to disable message caching.
|
|
@@ -2281,6 +2306,13 @@ interface ResolvedInstance {
|
|
|
2281
2306
|
/** Full discovery document when available (fromDiscovery / fetchInstance). */
|
|
2282
2307
|
readonly discovery: Readonly<APIInstance> | null;
|
|
2283
2308
|
}
|
|
2309
|
+
/** Unversioned well-known path (`GET /.well-known/fluxer`). */
|
|
2310
|
+
declare const INSTANCE_DISCOVERY_PATH: "/.well-known/fluxer";
|
|
2311
|
+
/**
|
|
2312
|
+
* Absolute unversioned discovery URL for an origin.
|
|
2313
|
+
* Hosted Fluxer: `https://fluxer.app/.well-known/fluxer` (may 308 to `api_public`).
|
|
2314
|
+
*/
|
|
2315
|
+
declare function instanceDiscoveryUrl(origin: string): string;
|
|
2284
2316
|
/** Strip trailing `/vN` and trailing slash from an API origin. */
|
|
2285
2317
|
declare function normalizeApiOrigin(api: string): string;
|
|
2286
2318
|
/**
|
|
@@ -2431,6 +2463,7 @@ declare const TextChannel_base: (abstract new (...args: any[]) => {
|
|
|
2431
2463
|
delete(options?: SudoVerificationOptions & {
|
|
2432
2464
|
silent?: boolean;
|
|
2433
2465
|
deleteMessages?: boolean;
|
|
2466
|
+
reason?: string;
|
|
2434
2467
|
}): Promise<void>;
|
|
2435
2468
|
toString(): string;
|
|
2436
2469
|
}) & typeof GuildChannel;
|
|
@@ -2502,6 +2535,7 @@ declare const VoiceChannel_base: (abstract new (...args: any[]) => {
|
|
|
2502
2535
|
delete(options?: SudoVerificationOptions & {
|
|
2503
2536
|
silent?: boolean;
|
|
2504
2537
|
deleteMessages?: boolean;
|
|
2538
|
+
reason?: string;
|
|
2505
2539
|
}): Promise<void>;
|
|
2506
2540
|
toString(): string;
|
|
2507
2541
|
}) & typeof GuildChannel;
|
|
@@ -2588,6 +2622,7 @@ declare const DMChannel_base: (abstract new (...args: any[]) => {
|
|
|
2588
2622
|
delete(options?: SudoVerificationOptions & {
|
|
2589
2623
|
silent?: boolean;
|
|
2590
2624
|
deleteMessages?: boolean;
|
|
2625
|
+
reason?: string;
|
|
2591
2626
|
}): Promise<void>;
|
|
2592
2627
|
toString(): string;
|
|
2593
2628
|
}) & typeof Channel;
|
|
@@ -2752,6 +2787,7 @@ declare abstract class Channel extends Base {
|
|
|
2752
2787
|
delete(options?: SudoVerificationOptions & {
|
|
2753
2788
|
silent?: boolean;
|
|
2754
2789
|
deleteMessages?: boolean;
|
|
2790
|
+
reason?: string;
|
|
2755
2791
|
}): Promise<void>;
|
|
2756
2792
|
/** Channel mention (`<#id>`). */
|
|
2757
2793
|
toString(): string;
|
|
@@ -2857,7 +2893,7 @@ declare class GuildMember extends Base {
|
|
|
2857
2893
|
*/
|
|
2858
2894
|
move(channelId: string | null, connectionId?: string | null): Promise<void>;
|
|
2859
2895
|
/** Kick this member. Requires Kick Members. */
|
|
2860
|
-
kick(): Promise<void>;
|
|
2896
|
+
kick(reason?: string): Promise<void>;
|
|
2861
2897
|
/** Ban this member. Requires Ban Members. */
|
|
2862
2898
|
ban(options?: GuildBanOptions): Promise<void>;
|
|
2863
2899
|
/**
|
|
@@ -2972,7 +3008,7 @@ type ClientEventMethods = {
|
|
|
2972
3008
|
[K in keyof typeof Events]: (cb: (...args: ClientEvents[(typeof Events)[K]]) => void) => Client;
|
|
2973
3009
|
};
|
|
2974
3010
|
|
|
2975
|
-
/** Bootstrap origin for {@link Client.fromDiscovery}. */
|
|
3011
|
+
/** Bootstrap origin for {@link Client.fromDiscovery} (`GET {origin}/.well-known/fluxer`, unversioned). */
|
|
2976
3012
|
type DiscoveryOrigin = string | {
|
|
2977
3013
|
api: string;
|
|
2978
3014
|
version?: string;
|
|
@@ -3012,7 +3048,12 @@ declare class Client extends EventEmitter {
|
|
|
3012
3048
|
_ws: WebSocketManager | null;
|
|
3013
3049
|
/** When waitForGuilds, guild IDs still expected via GUILD_CREATE. */
|
|
3014
3050
|
_pendingGuildIds: Set<string> | null;
|
|
3015
|
-
/**
|
|
3051
|
+
/** Guild IDs inserted as unavailable stubs from READY (startup / reconnect backfill). */
|
|
3052
|
+
_readyStubGuildIds: Set<string>;
|
|
3053
|
+
/**
|
|
3054
|
+
* @internal Empty-READY guild stream window.
|
|
3055
|
+
* Classifies incoming GUILD_CREATE as startup hydration. Also delays Ready when waitForGuilds.
|
|
3056
|
+
*/
|
|
3016
3057
|
_guildStreamSettleTimeout: ReturnType<typeof setTimeout> | null;
|
|
3017
3058
|
/** @internal Dispatches queued until Ready when waitForGuilds delays Ready. */
|
|
3018
3059
|
_deferredGatewayDispatches: GatewayReceivePayload[];
|
|
@@ -3024,10 +3065,12 @@ declare class Client extends EventEmitter {
|
|
|
3024
3065
|
constructor(options?: ClientOptions);
|
|
3025
3066
|
/**
|
|
3026
3067
|
* Create a client from instance discovery (`GET /.well-known/fluxer`).
|
|
3027
|
-
*
|
|
3068
|
+
* Fetches the unversioned well-known document from the given origin (not `{api}/v1/.well-known/fluxer`).
|
|
3069
|
+
* Wires REST from `endpoints.api_public`. `endpoints.api` / `api_client` stay on the instance for inspection.
|
|
3070
|
+
* Does not log in. Call {@link login} with a token afterward.
|
|
3028
3071
|
*
|
|
3029
|
-
* @param origin -
|
|
3030
|
-
* @param options - Client options (must not conflict with discovered `endpoints.
|
|
3072
|
+
* @param origin - Origin used only to fetch discovery (e.g. `https://fluxer.app` or `https://my.instance`)
|
|
3073
|
+
* @param options - Client options (must not conflict with discovered `endpoints.api_public`)
|
|
3031
3074
|
* @param connectOptions - Optional abort signal for the discovery request
|
|
3032
3075
|
*/
|
|
3033
3076
|
static fromDiscovery(origin: DiscoveryOrigin, options?: Omit<ClientOptions, 'instance'>, connectOptions?: {
|
|
@@ -3057,7 +3100,7 @@ declare class Client extends EventEmitter {
|
|
|
3057
3100
|
animated?: boolean;
|
|
3058
3101
|
}, guildId?: string | null): Promise<string>;
|
|
3059
3102
|
/**
|
|
3060
|
-
* Fetch instance discovery document (
|
|
3103
|
+
* Fetch instance discovery document (unversioned `GET /.well-known/fluxer` on the REST host).
|
|
3061
3104
|
* @returns Instance configuration (endpoints, features, metadata)
|
|
3062
3105
|
*/
|
|
3063
3106
|
fetchInstance(): Promise<APIInstance>;
|
|
@@ -3257,4 +3300,4 @@ declare class Client extends EventEmitter {
|
|
|
3257
3300
|
static get Routes(): typeof Routes;
|
|
3258
3301
|
}
|
|
3259
3302
|
|
|
3260
|
-
export {
|
|
3303
|
+
export { Invite as $, AllowedMentions as A, Base as B, CacheController as C, DEFAULT_CACHE_LIMITS as D, Events as E, type FetchMessagesOptions as F, type FetchPinnedMessagesOptions as G, type FetchedUserWithProfile as H, Guild as I, GuildBan as J, GuildChannel as K, type GuildCountsUpdatePayload as L, GuildEmoji as M, type GuildEmojisUpdatePayload as N, GuildManager as O, GuildMember as P, GuildMemberManager as Q, GuildMemberRoleManager as R, type GuildMemberSearchHit as S, type GuildMemberSearchPayload as T, type GuildMembersChunkPayload as U, type GuildRoleDeletePayload as V, GuildRoleManager as W, type GuildRoleUpdatePayload as X, GuildSticker as Y, type GuildStickersUpdatePayload as Z, INSTANCE_DISCOVERY_PATH as _, type AllowedMentionsOptions as a, instanceDiscoveryUrl as a$, type InviteChannelSnapshot as a0, type InviteDeletePayload as a1, type InviteGuildSnapshot as a2, LinkChannel as a3, Message as a4, type MessageAttachment as a5, type MessageCall as a6, MessageCollector as a7, type MessageCollectorEndReason as a8, type MessageCollectorOptions as a9, PermissionOverwriteManager as aA, type PinnedMessagesPage as aB, type PresenceActivity as aC, type PresenceUpdateBulkPayload as aD, type PresenceUpdatePayload as aE, ReactionCollector as aF, type ReactionCollectorEndReason as aG, type ReactionCollectorOptions as aH, type ReactionEmojiPayload as aI, type ReplyOptions as aJ, type ResolvedCacheLimits as aK, type ResolvedInstance as aL, Role as aM, type RoleResolvable as aN, type TextBasedChannel as aO, TextChannel as aP, type TypingStartPayload as aQ, type UploadFileForSend as aR, User as aS, UserManager as aT, type VanityURLPayload as aU, VoiceChannel as aV, Webhook as aW, type WebhookEditOptions as aX, type WebhookMessageEditOptions as aY, type WebhookSendOptions as aZ, type WebhooksUpdatePayload as a_, type MessageDeleteBulkPayload as aa, type MessageEditOptions as ab, type MessageEmbed as ac, type MessageEmbedAuthor as ad, type MessageEmbedField as ae, type MessageEmbedFooter as af, type MessageEmbedMedia as ag, MessageManager as ah, type MessagePrepareInput as ai, MessageReaction as aj, type MessageReactionAddManyEntry as ak, type MessageReactionAddManyPayload as al, MessageReactionManager as am, type MessageReactionPayload as an, type MessageReactionRemoveAllPayload as ao, type MessageReactionRemoveEmojiPayload as ap, type MessageReference as aq, type MessageReplyTarget as ar, type MessageSendOptions as as, type MessageSnapshot as at, MessageSticker as au, PartialGuildMember as av, PartialMessage as aw, type PartialUserGuildPayload as ax, PermissionOverwrite as ay, type PermissionOverwriteEditOptions as az, type AuditLogChange as b, inviteUrl as b0, normalizeApiOrigin as b1, normalizeCacheLimit as b2, parseInstanceDiscovery as b3, resolveCacheLimits as b4, resolveInstanceEndpoints as b5, type AuditLogEntryPayload as c, type AuditLogFetchPayload as d, type BulkFetchMessagesChannelResult as e, type BulkFetchMessagesOptions as f, type BulkFetchMessagesResult as g, type CacheSizeLimits as h, type CacheStats as i, CategoryChannel as j, Channel as k, ChannelManager as l, type ChannelMemberCountsUpdatePayload as m, type ChannelPinsUpdatePayload as n, type ChannelRecipientPayload as o, Client as p, type ClientEventListener as q, type ClientEventMethods as r, type ClientEventName as s, type ClientEvents as t, type ClientOptions as u, ClientUser as v, type CollectedReaction as w, DEFAULT_INSTANCE_ENDPOINTS as x, DMChannel as y, type DiscoveryOrigin as z };
|
|
@@ -7,7 +7,7 @@ import { EventEmitter } from 'node:events';
|
|
|
7
7
|
import { REST } from '@fluxerjs/rest';
|
|
8
8
|
import * as _fluxerjs_ws from '@fluxerjs/ws';
|
|
9
9
|
import { WebSocketManager } from '@fluxerjs/ws';
|
|
10
|
-
import { a as RoleEditOptions, I as GuildMemberSearchOptions, M as MessageAttachmentEdit, F as GuildChannelCreateOptions, R as RoleCreateOptions, E as DiscoveryStatusPayload, D as DiscoveryApplicationOptions, z as DiscoveryApplicationPayload, S as SudoVerificationOptions, P as PresenceUpdateOptions, O as ProfilePayload, v as AttachmentUploadPlanItem, w as AttachmentUploadPlanResponse, A as AttachmentUploadCompleteItem, u as AttachmentUploadCompleteResponse, Q as RtcRegionPayload, y as ChannelSlowmodePayload, x as ChannelInviteCreateOptions, C as ChannelEditOptions, G as GroupDmEditOptions, H as GuildMemberEditOptions, B as BulkFetchMessagesRequest, K as MessageSearchOptions, L as MessageSearchResponse } from './Sudo-
|
|
10
|
+
import { a as RoleEditOptions, I as GuildMemberSearchOptions, M as MessageAttachmentEdit, F as GuildChannelCreateOptions, R as RoleCreateOptions, E as DiscoveryStatusPayload, D as DiscoveryApplicationOptions, z as DiscoveryApplicationPayload, S as SudoVerificationOptions, P as PresenceUpdateOptions, O as ProfilePayload, v as AttachmentUploadPlanItem, w as AttachmentUploadPlanResponse, A as AttachmentUploadCompleteItem, u as AttachmentUploadCompleteResponse, Q as RtcRegionPayload, y as ChannelSlowmodePayload, x as ChannelInviteCreateOptions, C as ChannelEditOptions, G as GroupDmEditOptions, H as GuildMemberEditOptions, B as BulkFetchMessagesRequest, K as MessageSearchOptions, L as MessageSearchResponse } from './Sudo-fOKSPbxN.js';
|
|
11
11
|
import { EmbedBuilder, AttachmentBuilder, MessagePayload } from '@fluxerjs/builders';
|
|
12
12
|
|
|
13
13
|
type GuildData = Partial<APIGuild> & {
|
|
@@ -323,13 +323,14 @@ declare class GuildEmoji extends Base {
|
|
|
323
323
|
/** Renders this emoji for use in message content: `<:name:id>` (or `<a:name:id>` when animated). */
|
|
324
324
|
toString(): string;
|
|
325
325
|
/** Delete this emoji. Requires Manage Emojis and Stickers permission. */
|
|
326
|
-
delete(): Promise<void>;
|
|
326
|
+
delete(reason?: string): Promise<void>;
|
|
327
327
|
/**
|
|
328
328
|
* Edit this emoji's name.
|
|
329
329
|
* Requires Manage Emojis and Stickers permission.
|
|
330
330
|
*/
|
|
331
331
|
edit(options: {
|
|
332
332
|
name: string;
|
|
333
|
+
reason?: string;
|
|
333
334
|
}): Promise<GuildEmoji>;
|
|
334
335
|
}
|
|
335
336
|
|
|
@@ -361,7 +362,7 @@ declare class GuildSticker extends Base {
|
|
|
361
362
|
/** Date when this sticker was created, derived from its snowflake ID. */
|
|
362
363
|
get createdAt(): Date;
|
|
363
364
|
/** Delete this sticker. Requires Manage Emojis and Stickers permission. */
|
|
364
|
-
delete(): Promise<void>;
|
|
365
|
+
delete(reason?: string): Promise<void>;
|
|
365
366
|
/**
|
|
366
367
|
* Edit this sticker's name and/or description.
|
|
367
368
|
* Requires Manage Emojis and Stickers permission.
|
|
@@ -369,6 +370,7 @@ declare class GuildSticker extends Base {
|
|
|
369
370
|
edit(options: {
|
|
370
371
|
name?: string;
|
|
371
372
|
description?: string;
|
|
373
|
+
reason?: string;
|
|
372
374
|
}): Promise<GuildSticker>;
|
|
373
375
|
}
|
|
374
376
|
|
|
@@ -434,8 +436,9 @@ declare class Role extends Base {
|
|
|
434
436
|
edit(options: RoleEditOptions): Promise<Role>;
|
|
435
437
|
/**
|
|
436
438
|
* DELETE role. Requires Manage Roles.
|
|
439
|
+
* @param reason - Audit log reason (`X-Audit-Log-Reason`)
|
|
437
440
|
*/
|
|
438
|
-
delete(): Promise<void>;
|
|
441
|
+
delete(reason?: string): Promise<void>;
|
|
439
442
|
}
|
|
440
443
|
|
|
441
444
|
/**
|
|
@@ -1059,7 +1062,7 @@ declare class GuildBan extends Base {
|
|
|
1059
1062
|
* Remove this ban (unban the user).
|
|
1060
1063
|
* Requires Ban Members permission.
|
|
1061
1064
|
*/
|
|
1062
|
-
unban(): Promise<void>;
|
|
1065
|
+
unban(reason?: string): Promise<void>;
|
|
1063
1066
|
}
|
|
1064
1067
|
|
|
1065
1068
|
/**
|
|
@@ -1231,9 +1234,9 @@ declare class Guild extends Base {
|
|
|
1231
1234
|
/** Fetch all bans in this guild. Requires Ban Members. */
|
|
1232
1235
|
fetchBans(): Promise<GuildBan[]>;
|
|
1233
1236
|
/** Unban a user from the guild. Requires Ban Members. */
|
|
1234
|
-
unban(userId: string): Promise<void>;
|
|
1237
|
+
unban(userId: string, reason?: string): Promise<void>;
|
|
1235
1238
|
/** Kick a user from the guild. Requires Kick Members. */
|
|
1236
|
-
kick(userId: string): Promise<void>;
|
|
1239
|
+
kick(userId: string, reason?: string): Promise<void>;
|
|
1237
1240
|
/** Fetch all emojis in this guild from the API. */
|
|
1238
1241
|
fetchEmojis(): Promise<GuildEmoji[]>;
|
|
1239
1242
|
/** Fetch a specific emoji by ID. */
|
|
@@ -1242,6 +1245,7 @@ declare class Guild extends Base {
|
|
|
1242
1245
|
createEmoji(options: {
|
|
1243
1246
|
name: string;
|
|
1244
1247
|
image: string;
|
|
1248
|
+
reason?: string;
|
|
1245
1249
|
}): Promise<GuildEmoji>;
|
|
1246
1250
|
/** Clone an emoji from another guild. Requires Manage Emojis and Stickers. */
|
|
1247
1251
|
cloneEmoji(sourceEmojiId: string): Promise<GuildEmoji>;
|
|
@@ -1262,6 +1266,7 @@ declare class Guild extends Base {
|
|
|
1262
1266
|
image: string;
|
|
1263
1267
|
description?: string | null;
|
|
1264
1268
|
tags?: string[];
|
|
1269
|
+
reason?: string;
|
|
1265
1270
|
}): Promise<GuildSticker>;
|
|
1266
1271
|
/** Clone a sticker from another guild. Requires Manage Emojis and Stickers. */
|
|
1267
1272
|
cloneSticker(sourceStickerId: string): Promise<GuildSticker>;
|
|
@@ -1586,6 +1591,8 @@ declare class Message extends Base {
|
|
|
1586
1591
|
mentionRoles: string[];
|
|
1587
1592
|
/** Client-side nonce for deduplication. */
|
|
1588
1593
|
nonce: string | null;
|
|
1594
|
+
/** IDs of custom emojis in the message classified as explicit. */
|
|
1595
|
+
nsfwEmojis: string[];
|
|
1589
1596
|
/**
|
|
1590
1597
|
* Cached text-capable channel (guild text, guild voice, or DM), or null if uncached / not text-based.
|
|
1591
1598
|
* Narrowed type has {@link Channel.send} and {@link Channel.delete}.
|
|
@@ -1668,7 +1675,7 @@ declare class Message extends Base {
|
|
|
1668
1675
|
/** Fetch the latest version of this message from the API. */
|
|
1669
1676
|
fetch(): Promise<Message>;
|
|
1670
1677
|
/** Delete this message. */
|
|
1671
|
-
delete(): Promise<void>;
|
|
1678
|
+
delete(reason?: string): Promise<void>;
|
|
1672
1679
|
/** Delete a specific attachment from this message. */
|
|
1673
1680
|
deleteAttachment(attachmentId: string): Promise<void>;
|
|
1674
1681
|
/** Pin this message in the channel. */
|
|
@@ -1874,7 +1881,7 @@ declare function resolveCacheLimits(input?: CacheSizeLimits): ResolvedCacheOptio
|
|
|
1874
1881
|
* @example
|
|
1875
1882
|
* ```ts
|
|
1876
1883
|
* const client = new Client({
|
|
1877
|
-
* instance: {
|
|
1884
|
+
* instance: { api_public: 'https://api.example.com' },
|
|
1878
1885
|
* cache: { guilds: 100, messages: 20 },
|
|
1879
1886
|
* waitForGuilds: true,
|
|
1880
1887
|
* });
|
|
@@ -1885,33 +1892,51 @@ interface ClientOptions {
|
|
|
1885
1892
|
* Instance endpoints for this client (API, CDN, invite, etc.).
|
|
1886
1893
|
* Pass a partial map to override hosted defaults, or a full discovery document.
|
|
1887
1894
|
* Prefer this over `rest.api` for multi-instance / self-hosted bots.
|
|
1895
|
+
* REST uses `api_public`; `api` / `api_client` are kept for inspection.
|
|
1888
1896
|
* @see {@link Client.fromDiscovery}
|
|
1889
1897
|
*/
|
|
1890
1898
|
instance?: Partial<APIInstanceEndpoints> | APIInstance;
|
|
1891
1899
|
/**
|
|
1892
1900
|
* REST options. Prefer {@link ClientOptions.instance} for the API host.
|
|
1893
|
-
* If both `instance.
|
|
1901
|
+
* If both `instance.api_public` (or resolved default) and `rest.api` are set and differ, construction throws.
|
|
1894
1902
|
*/
|
|
1895
1903
|
rest?: Partial<ConstructorParameters<typeof REST>[0]>;
|
|
1896
1904
|
/**
|
|
1897
|
-
*
|
|
1905
|
+
* BCP 47 locale sent as REST `Accept-Language`. Defaults to {@link import('@fluxerjs/rest').DEFAULT_LOCALE}.
|
|
1906
|
+
* Overrides `rest.locale` when both are set.
|
|
1907
|
+
* @see {@link ClientOptions.rest}
|
|
1908
|
+
*/
|
|
1909
|
+
locale?: string;
|
|
1910
|
+
/**
|
|
1911
|
+
* @deprecated Fluxer has no intents. Prefer {@link ClientOptions.ignoredEvents}. Kept only for migration; identify always sends `0`.
|
|
1898
1912
|
*/
|
|
1899
1913
|
intents?: number;
|
|
1900
1914
|
/**
|
|
1901
1915
|
* @deprecated No-op. Fluxer has no intents warning to suppress.
|
|
1902
1916
|
*/
|
|
1903
1917
|
suppressIntentWarning?: boolean;
|
|
1904
|
-
/** {@link GatewayIdentifyFlags} bitfield sent as Identify `flags`. */
|
|
1918
|
+
/** {@link import('@fluxerjs/types').GatewayIdentifyFlags} bitfield sent as Identify `flags`. */
|
|
1905
1919
|
identifyFlags?: number;
|
|
1906
1920
|
/** Dispatch event names to suppress for this session (`ignored_events`). */
|
|
1907
1921
|
ignoredEvents?: string[];
|
|
1908
1922
|
/** Prefer hydrating this guild first after READY (`initial_guild_id`). */
|
|
1909
1923
|
initialGuildId?: string;
|
|
1910
1924
|
/**
|
|
1911
|
-
* Delay Ready until all READY guilds arrive via GUILD_CREATE; queue other dispatches until then.
|
|
1925
|
+
* Delay {@link Events.Ready} until all READY guilds arrive via GUILD_CREATE; queue other dispatches until then.
|
|
1926
|
+
* Startup backfill emits {@link Events.GuildAvailable} (not {@link Events.GuildCreate}) unless
|
|
1927
|
+
* {@link ClientOptions.emitGuildCreateOnStartup} is set.
|
|
1912
1928
|
* @default false
|
|
1929
|
+
* @see {@link ClientOptions.emitGuildCreateOnStartup}
|
|
1913
1930
|
*/
|
|
1914
1931
|
waitForGuilds?: boolean;
|
|
1932
|
+
/**
|
|
1933
|
+
* Emit {@link Events.GuildCreate} for READY / initial-stream guild hydrations instead of {@link Events.GuildAvailable}.
|
|
1934
|
+
* Default behavior matches Discord.js: startup backfill uses {@link Events.GuildAvailable}, and
|
|
1935
|
+
* {@link Events.GuildCreate} means the bot joined after {@link Events.Ready}.
|
|
1936
|
+
* @default false
|
|
1937
|
+
* @see {@link ClientOptions.waitForGuilds}
|
|
1938
|
+
*/
|
|
1939
|
+
emitGuildCreateOnStartup?: boolean;
|
|
1915
1940
|
/**
|
|
1916
1941
|
* Cache size limits per bucket. Defaults to {@link DEFAULT_CACHE_LIMITS}.
|
|
1917
1942
|
* Pass `0` / `Infinity` per numeric field for unbounded; `messages: false` to disable message caching.
|
|
@@ -2281,6 +2306,13 @@ interface ResolvedInstance {
|
|
|
2281
2306
|
/** Full discovery document when available (fromDiscovery / fetchInstance). */
|
|
2282
2307
|
readonly discovery: Readonly<APIInstance> | null;
|
|
2283
2308
|
}
|
|
2309
|
+
/** Unversioned well-known path (`GET /.well-known/fluxer`). */
|
|
2310
|
+
declare const INSTANCE_DISCOVERY_PATH: "/.well-known/fluxer";
|
|
2311
|
+
/**
|
|
2312
|
+
* Absolute unversioned discovery URL for an origin.
|
|
2313
|
+
* Hosted Fluxer: `https://fluxer.app/.well-known/fluxer` (may 308 to `api_public`).
|
|
2314
|
+
*/
|
|
2315
|
+
declare function instanceDiscoveryUrl(origin: string): string;
|
|
2284
2316
|
/** Strip trailing `/vN` and trailing slash from an API origin. */
|
|
2285
2317
|
declare function normalizeApiOrigin(api: string): string;
|
|
2286
2318
|
/**
|
|
@@ -2431,6 +2463,7 @@ declare const TextChannel_base: (abstract new (...args: any[]) => {
|
|
|
2431
2463
|
delete(options?: SudoVerificationOptions & {
|
|
2432
2464
|
silent?: boolean;
|
|
2433
2465
|
deleteMessages?: boolean;
|
|
2466
|
+
reason?: string;
|
|
2434
2467
|
}): Promise<void>;
|
|
2435
2468
|
toString(): string;
|
|
2436
2469
|
}) & typeof GuildChannel;
|
|
@@ -2502,6 +2535,7 @@ declare const VoiceChannel_base: (abstract new (...args: any[]) => {
|
|
|
2502
2535
|
delete(options?: SudoVerificationOptions & {
|
|
2503
2536
|
silent?: boolean;
|
|
2504
2537
|
deleteMessages?: boolean;
|
|
2538
|
+
reason?: string;
|
|
2505
2539
|
}): Promise<void>;
|
|
2506
2540
|
toString(): string;
|
|
2507
2541
|
}) & typeof GuildChannel;
|
|
@@ -2588,6 +2622,7 @@ declare const DMChannel_base: (abstract new (...args: any[]) => {
|
|
|
2588
2622
|
delete(options?: SudoVerificationOptions & {
|
|
2589
2623
|
silent?: boolean;
|
|
2590
2624
|
deleteMessages?: boolean;
|
|
2625
|
+
reason?: string;
|
|
2591
2626
|
}): Promise<void>;
|
|
2592
2627
|
toString(): string;
|
|
2593
2628
|
}) & typeof Channel;
|
|
@@ -2752,6 +2787,7 @@ declare abstract class Channel extends Base {
|
|
|
2752
2787
|
delete(options?: SudoVerificationOptions & {
|
|
2753
2788
|
silent?: boolean;
|
|
2754
2789
|
deleteMessages?: boolean;
|
|
2790
|
+
reason?: string;
|
|
2755
2791
|
}): Promise<void>;
|
|
2756
2792
|
/** Channel mention (`<#id>`). */
|
|
2757
2793
|
toString(): string;
|
|
@@ -2857,7 +2893,7 @@ declare class GuildMember extends Base {
|
|
|
2857
2893
|
*/
|
|
2858
2894
|
move(channelId: string | null, connectionId?: string | null): Promise<void>;
|
|
2859
2895
|
/** Kick this member. Requires Kick Members. */
|
|
2860
|
-
kick(): Promise<void>;
|
|
2896
|
+
kick(reason?: string): Promise<void>;
|
|
2861
2897
|
/** Ban this member. Requires Ban Members. */
|
|
2862
2898
|
ban(options?: GuildBanOptions): Promise<void>;
|
|
2863
2899
|
/**
|
|
@@ -2972,7 +3008,7 @@ type ClientEventMethods = {
|
|
|
2972
3008
|
[K in keyof typeof Events]: (cb: (...args: ClientEvents[(typeof Events)[K]]) => void) => Client;
|
|
2973
3009
|
};
|
|
2974
3010
|
|
|
2975
|
-
/** Bootstrap origin for {@link Client.fromDiscovery}. */
|
|
3011
|
+
/** Bootstrap origin for {@link Client.fromDiscovery} (`GET {origin}/.well-known/fluxer`, unversioned). */
|
|
2976
3012
|
type DiscoveryOrigin = string | {
|
|
2977
3013
|
api: string;
|
|
2978
3014
|
version?: string;
|
|
@@ -3012,7 +3048,12 @@ declare class Client extends EventEmitter {
|
|
|
3012
3048
|
_ws: WebSocketManager | null;
|
|
3013
3049
|
/** When waitForGuilds, guild IDs still expected via GUILD_CREATE. */
|
|
3014
3050
|
_pendingGuildIds: Set<string> | null;
|
|
3015
|
-
/**
|
|
3051
|
+
/** Guild IDs inserted as unavailable stubs from READY (startup / reconnect backfill). */
|
|
3052
|
+
_readyStubGuildIds: Set<string>;
|
|
3053
|
+
/**
|
|
3054
|
+
* @internal Empty-READY guild stream window.
|
|
3055
|
+
* Classifies incoming GUILD_CREATE as startup hydration. Also delays Ready when waitForGuilds.
|
|
3056
|
+
*/
|
|
3016
3057
|
_guildStreamSettleTimeout: ReturnType<typeof setTimeout> | null;
|
|
3017
3058
|
/** @internal Dispatches queued until Ready when waitForGuilds delays Ready. */
|
|
3018
3059
|
_deferredGatewayDispatches: GatewayReceivePayload[];
|
|
@@ -3024,10 +3065,12 @@ declare class Client extends EventEmitter {
|
|
|
3024
3065
|
constructor(options?: ClientOptions);
|
|
3025
3066
|
/**
|
|
3026
3067
|
* Create a client from instance discovery (`GET /.well-known/fluxer`).
|
|
3027
|
-
*
|
|
3068
|
+
* Fetches the unversioned well-known document from the given origin (not `{api}/v1/.well-known/fluxer`).
|
|
3069
|
+
* Wires REST from `endpoints.api_public`. `endpoints.api` / `api_client` stay on the instance for inspection.
|
|
3070
|
+
* Does not log in. Call {@link login} with a token afterward.
|
|
3028
3071
|
*
|
|
3029
|
-
* @param origin -
|
|
3030
|
-
* @param options - Client options (must not conflict with discovered `endpoints.
|
|
3072
|
+
* @param origin - Origin used only to fetch discovery (e.g. `https://fluxer.app` or `https://my.instance`)
|
|
3073
|
+
* @param options - Client options (must not conflict with discovered `endpoints.api_public`)
|
|
3031
3074
|
* @param connectOptions - Optional abort signal for the discovery request
|
|
3032
3075
|
*/
|
|
3033
3076
|
static fromDiscovery(origin: DiscoveryOrigin, options?: Omit<ClientOptions, 'instance'>, connectOptions?: {
|
|
@@ -3057,7 +3100,7 @@ declare class Client extends EventEmitter {
|
|
|
3057
3100
|
animated?: boolean;
|
|
3058
3101
|
}, guildId?: string | null): Promise<string>;
|
|
3059
3102
|
/**
|
|
3060
|
-
* Fetch instance discovery document (
|
|
3103
|
+
* Fetch instance discovery document (unversioned `GET /.well-known/fluxer` on the REST host).
|
|
3061
3104
|
* @returns Instance configuration (endpoints, features, metadata)
|
|
3062
3105
|
*/
|
|
3063
3106
|
fetchInstance(): Promise<APIInstance>;
|
|
@@ -3257,4 +3300,4 @@ declare class Client extends EventEmitter {
|
|
|
3257
3300
|
static get Routes(): typeof Routes;
|
|
3258
3301
|
}
|
|
3259
3302
|
|
|
3260
|
-
export {
|
|
3303
|
+
export { Invite as $, AllowedMentions as A, Base as B, CacheController as C, DEFAULT_CACHE_LIMITS as D, Events as E, type FetchMessagesOptions as F, type FetchPinnedMessagesOptions as G, type FetchedUserWithProfile as H, Guild as I, GuildBan as J, GuildChannel as K, type GuildCountsUpdatePayload as L, GuildEmoji as M, type GuildEmojisUpdatePayload as N, GuildManager as O, GuildMember as P, GuildMemberManager as Q, GuildMemberRoleManager as R, type GuildMemberSearchHit as S, type GuildMemberSearchPayload as T, type GuildMembersChunkPayload as U, type GuildRoleDeletePayload as V, GuildRoleManager as W, type GuildRoleUpdatePayload as X, GuildSticker as Y, type GuildStickersUpdatePayload as Z, INSTANCE_DISCOVERY_PATH as _, type AllowedMentionsOptions as a, instanceDiscoveryUrl as a$, type InviteChannelSnapshot as a0, type InviteDeletePayload as a1, type InviteGuildSnapshot as a2, LinkChannel as a3, Message as a4, type MessageAttachment as a5, type MessageCall as a6, MessageCollector as a7, type MessageCollectorEndReason as a8, type MessageCollectorOptions as a9, PermissionOverwriteManager as aA, type PinnedMessagesPage as aB, type PresenceActivity as aC, type PresenceUpdateBulkPayload as aD, type PresenceUpdatePayload as aE, ReactionCollector as aF, type ReactionCollectorEndReason as aG, type ReactionCollectorOptions as aH, type ReactionEmojiPayload as aI, type ReplyOptions as aJ, type ResolvedCacheLimits as aK, type ResolvedInstance as aL, Role as aM, type RoleResolvable as aN, type TextBasedChannel as aO, TextChannel as aP, type TypingStartPayload as aQ, type UploadFileForSend as aR, User as aS, UserManager as aT, type VanityURLPayload as aU, VoiceChannel as aV, Webhook as aW, type WebhookEditOptions as aX, type WebhookMessageEditOptions as aY, type WebhookSendOptions as aZ, type WebhooksUpdatePayload as a_, type MessageDeleteBulkPayload as aa, type MessageEditOptions as ab, type MessageEmbed as ac, type MessageEmbedAuthor as ad, type MessageEmbedField as ae, type MessageEmbedFooter as af, type MessageEmbedMedia as ag, MessageManager as ah, type MessagePrepareInput as ai, MessageReaction as aj, type MessageReactionAddManyEntry as ak, type MessageReactionAddManyPayload as al, MessageReactionManager as am, type MessageReactionPayload as an, type MessageReactionRemoveAllPayload as ao, type MessageReactionRemoveEmojiPayload as ap, type MessageReference as aq, type MessageReplyTarget as ar, type MessageSendOptions as as, type MessageSnapshot as at, MessageSticker as au, PartialGuildMember as av, PartialMessage as aw, type PartialUserGuildPayload as ax, PermissionOverwrite as ay, type PermissionOverwriteEditOptions as az, type AuditLogChange as b, inviteUrl as b0, normalizeApiOrigin as b1, normalizeCacheLimit as b2, parseInstanceDiscovery as b3, resolveCacheLimits as b4, resolveInstanceEndpoints as b5, type AuditLogEntryPayload as c, type AuditLogFetchPayload as d, type BulkFetchMessagesChannelResult as e, type BulkFetchMessagesOptions as f, type BulkFetchMessagesResult as g, type CacheSizeLimits as h, type CacheStats as i, CategoryChannel as j, Channel as k, ChannelManager as l, type ChannelMemberCountsUpdatePayload as m, type ChannelPinsUpdatePayload as n, type ChannelRecipientPayload as o, Client as p, type ClientEventListener as q, type ClientEventMethods as r, type ClientEventName as s, type ClientEvents as t, type ClientOptions as u, ClientUser as v, type CollectedReaction as w, DEFAULT_INSTANCE_ENDPOINTS as x, DMChannel as y, type DiscoveryOrigin as z };
|
|
@@ -122,6 +122,8 @@ interface ChannelEditOptions {
|
|
|
122
122
|
permissionOverwrites?: ChannelPermissionOverwriteOptions[];
|
|
123
123
|
/** Group DM icon hash (base64 image). */
|
|
124
124
|
icon?: string | null;
|
|
125
|
+
/** Audit log reason (`X-Audit-Log-Reason`). Not sent in the JSON body. */
|
|
126
|
+
reason?: string;
|
|
125
127
|
}
|
|
126
128
|
/** Options for {@link Guild.createChannel}. */
|
|
127
129
|
interface GuildChannelCreateOptions {
|
|
@@ -244,6 +246,8 @@ interface RoleCreateOptions {
|
|
|
244
246
|
permissions?: string | PermissionResolvable;
|
|
245
247
|
/** Role color as 24-bit RGB. */
|
|
246
248
|
color?: number;
|
|
249
|
+
/** Audit log reason (`X-Audit-Log-Reason`). Not sent in the JSON body. */
|
|
250
|
+
reason?: string;
|
|
247
251
|
}
|
|
248
252
|
/**
|
|
249
253
|
* CamelCase options for editing a guild role.
|
|
@@ -263,6 +267,8 @@ interface RoleEditOptions {
|
|
|
263
267
|
mentionable?: boolean;
|
|
264
268
|
/** Hoisted position (visual separator group). */
|
|
265
269
|
hoistPosition?: number | null;
|
|
270
|
+
/** Audit log reason (`X-Audit-Log-Reason`). Not sent in the JSON body. */
|
|
271
|
+
reason?: string;
|
|
266
272
|
}
|
|
267
273
|
|
|
268
274
|
/** Guild member search / edit SDK options. */
|
|
@@ -301,6 +307,8 @@ interface GuildMemberEditOptions {
|
|
|
301
307
|
timeoutReason?: string | null;
|
|
302
308
|
channelId?: string | null;
|
|
303
309
|
connectionId?: string | null;
|
|
310
|
+
/** Audit log reason (`X-Audit-Log-Reason`). Not sent in the JSON body. */
|
|
311
|
+
reason?: string;
|
|
304
312
|
}
|
|
305
313
|
/** Convert {@link GuildMemberEditOptions} to the member PATCH wire body. */
|
|
306
314
|
declare function toMemberEditBody(options: GuildMemberEditOptions): Record<string, unknown>;
|
|
@@ -122,6 +122,8 @@ interface ChannelEditOptions {
|
|
|
122
122
|
permissionOverwrites?: ChannelPermissionOverwriteOptions[];
|
|
123
123
|
/** Group DM icon hash (base64 image). */
|
|
124
124
|
icon?: string | null;
|
|
125
|
+
/** Audit log reason (`X-Audit-Log-Reason`). Not sent in the JSON body. */
|
|
126
|
+
reason?: string;
|
|
125
127
|
}
|
|
126
128
|
/** Options for {@link Guild.createChannel}. */
|
|
127
129
|
interface GuildChannelCreateOptions {
|
|
@@ -244,6 +246,8 @@ interface RoleCreateOptions {
|
|
|
244
246
|
permissions?: string | PermissionResolvable;
|
|
245
247
|
/** Role color as 24-bit RGB. */
|
|
246
248
|
color?: number;
|
|
249
|
+
/** Audit log reason (`X-Audit-Log-Reason`). Not sent in the JSON body. */
|
|
250
|
+
reason?: string;
|
|
247
251
|
}
|
|
248
252
|
/**
|
|
249
253
|
* CamelCase options for editing a guild role.
|
|
@@ -263,6 +267,8 @@ interface RoleEditOptions {
|
|
|
263
267
|
mentionable?: boolean;
|
|
264
268
|
/** Hoisted position (visual separator group). */
|
|
265
269
|
hoistPosition?: number | null;
|
|
270
|
+
/** Audit log reason (`X-Audit-Log-Reason`). Not sent in the JSON body. */
|
|
271
|
+
reason?: string;
|
|
266
272
|
}
|
|
267
273
|
|
|
268
274
|
/** Guild member search / edit SDK options. */
|
|
@@ -301,6 +307,8 @@ interface GuildMemberEditOptions {
|
|
|
301
307
|
timeoutReason?: string | null;
|
|
302
308
|
channelId?: string | null;
|
|
303
309
|
connectionId?: string | null;
|
|
310
|
+
/** Audit log reason (`X-Audit-Log-Reason`). Not sent in the JSON body. */
|
|
311
|
+
reason?: string;
|
|
304
312
|
}
|
|
305
313
|
/** Convert {@link GuildMemberEditOptions} to the member PATCH wire body. */
|
|
306
314
|
declare function toMemberEditBody(options: GuildMemberEditOptions): Record<string, unknown>;
|