@fluxerjs/types 1.0.2

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.
@@ -0,0 +1,671 @@
1
+ /**
2
+ * Snowflake ID type - 64-bit unsigned integer as string.
3
+ * Fluxer uses Twitter Snowflakes with epoch 1420070400000 (first second of 2015).
4
+ */
5
+ type Snowflake = string;
6
+ /** Fluxer epoch in milliseconds (2015-01-01 00:00:00 UTC) */
7
+ declare const FLUXER_EPOCH = 1420070400000;
8
+
9
+ interface APIUserPartial {
10
+ id: Snowflake;
11
+ username: string;
12
+ discriminator: string;
13
+ global_name?: string | null;
14
+ avatar?: string | null;
15
+ avatar_color?: number | null;
16
+ public_flags?: number | null;
17
+ }
18
+ type APIUser = APIUserPartial;
19
+ interface APIGuildMember {
20
+ user: APIUserPartial;
21
+ nick?: string | null;
22
+ avatar?: string | null;
23
+ banner?: string | null;
24
+ accent_color?: number | null;
25
+ roles: Snowflake[];
26
+ joined_at: string;
27
+ mute: boolean;
28
+ deaf: boolean;
29
+ communication_disabled_until?: string | null;
30
+ profile_flags?: number | null;
31
+ }
32
+
33
+ /** Channel type enum (Fluxer/Discord compatible) */
34
+ declare enum ChannelType {
35
+ GuildText = 0,
36
+ DM = 1,
37
+ GuildVoice = 2,
38
+ GroupDM = 3,
39
+ GuildCategory = 4,
40
+ GuildLink = 5
41
+ }
42
+ /** Permission overwrite type */
43
+ declare enum OverwriteType {
44
+ Role = 0,
45
+ Member = 1
46
+ }
47
+ interface APIChannelOverwrite {
48
+ id: Snowflake;
49
+ type: OverwriteType;
50
+ allow: string;
51
+ deny: string;
52
+ }
53
+ interface APIChannelPartial {
54
+ id: Snowflake;
55
+ name?: string | null;
56
+ type: ChannelType;
57
+ icon?: string | null;
58
+ parent_id?: Snowflake | null;
59
+ }
60
+ interface APIChannel extends APIChannelPartial {
61
+ guild_id?: Snowflake | null;
62
+ name: string | null;
63
+ topic?: string | null;
64
+ url?: string | null;
65
+ icon?: string | null;
66
+ owner_id?: Snowflake | null;
67
+ position?: number;
68
+ parent_id: Snowflake | null;
69
+ bitrate?: number | null;
70
+ user_limit?: number | null;
71
+ rtc_region?: string | null;
72
+ last_message_id?: Snowflake | null;
73
+ last_pin_timestamp?: string | null;
74
+ permission_overwrites?: APIChannelOverwrite[];
75
+ recipients?: APIUser[];
76
+ nsfw?: boolean;
77
+ rate_limit_per_user?: number;
78
+ nicks?: Record<string, string>;
79
+ }
80
+
81
+ declare enum GuildVerificationLevel {
82
+ None = 0,
83
+ Low = 1,
84
+ Medium = 2,
85
+ High = 3,
86
+ VeryHigh = 4
87
+ }
88
+ declare enum GuildMFALevel {
89
+ None = 0,
90
+ Elevated = 1
91
+ }
92
+ declare enum GuildExplicitContentFilter {
93
+ Disabled = 0,
94
+ MembersWithoutRoles = 1,
95
+ AllMembers = 2
96
+ }
97
+ declare enum DefaultMessageNotifications {
98
+ AllMessages = 0,
99
+ OnlyMentions = 1
100
+ }
101
+ type GuildFeature = 'ANIMATED_ICON' | 'ANIMATED_BANNER' | 'BANNER' | 'DETACHED_BANNER' | 'INVITE_SPLASH' | 'INVITES_DISABLED' | 'TEXT_CHANNEL_FLEXIBLE_NAMES' | 'MORE_EMOJI' | 'MORE_STICKERS' | 'UNLIMITED_EMOJI' | 'UNLIMITED_STICKERS' | 'EXPRESSION_PURGE_ALLOWED' | 'VANITY_URL' | 'VERIFIED' | 'VIP_VOICE' | 'UNAVAILABLE_FOR_EVERYONE' | 'UNAVAILABLE_FOR_EVERYONE_BUT_STAFF' | 'VISIONARY' | 'OPERATOR' | 'LARGE_GUILD_OVERRIDE' | 'VERY_LARGE_GUILD' | 'MT_MESSAGE_SCHEDULING' | 'MT_EXPRESSION_PACKS';
102
+ interface APIGuild {
103
+ id: Snowflake;
104
+ name: string;
105
+ icon: string | null;
106
+ banner: string | null;
107
+ banner_width?: number | null;
108
+ banner_height?: number | null;
109
+ splash?: string | null;
110
+ vanity_url_code?: string | null;
111
+ owner_id: Snowflake;
112
+ system_channel_id?: Snowflake | null;
113
+ rules_channel_id?: Snowflake | null;
114
+ afk_channel_id?: Snowflake | null;
115
+ afk_timeout: number;
116
+ features: GuildFeature[];
117
+ verification_level: GuildVerificationLevel;
118
+ mfa_level: GuildMFALevel;
119
+ nsfw_level: number;
120
+ explicit_content_filter: GuildExplicitContentFilter;
121
+ default_message_notifications: DefaultMessageNotifications;
122
+ permissions?: string | null;
123
+ }
124
+
125
+ interface APIEmbedAuthor {
126
+ name?: string;
127
+ url?: string;
128
+ icon_url?: string;
129
+ proxy_icon_url?: string;
130
+ }
131
+ interface APIEmbedFooter {
132
+ text: string;
133
+ icon_url?: string;
134
+ proxy_icon_url?: string;
135
+ }
136
+ interface APIEmbedMedia {
137
+ url: string;
138
+ proxy_url?: string;
139
+ width?: number;
140
+ height?: number;
141
+ }
142
+ interface APIEmbedField {
143
+ name: string;
144
+ value: string;
145
+ inline?: boolean;
146
+ }
147
+ type EmbedType = 'rich' | 'image' | 'video' | 'gifv' | 'article' | 'link';
148
+ interface APIEmbed {
149
+ type?: EmbedType;
150
+ url?: string | null;
151
+ title?: string | null;
152
+ color?: number | null;
153
+ timestamp?: string | null;
154
+ description?: string | null;
155
+ author?: APIEmbedAuthor | null;
156
+ image?: APIEmbedMedia | null;
157
+ thumbnail?: APIEmbedMedia | null;
158
+ footer?: APIEmbedFooter | null;
159
+ fields?: APIEmbedField[] | null;
160
+ provider?: APIEmbedAuthor | null;
161
+ video?: APIEmbedMedia | null;
162
+ audio?: APIEmbedMedia | null;
163
+ nsfw?: boolean | null;
164
+ }
165
+
166
+ declare enum MessageType {
167
+ Default = 0,
168
+ RecipientAdd = 1,
169
+ RecipientRemove = 2,
170
+ Call = 3,
171
+ ChannelNameChange = 4,
172
+ ChannelIconChange = 5,
173
+ ChannelPinnedMessage = 6,
174
+ UserJoin = 7,
175
+ Reply = 19
176
+ }
177
+ declare enum MessageFlags {
178
+ SuppressEmbeds = 4,
179
+ SuppressNotifications = 4096,
180
+ VoiceMessage = 8192,
181
+ CompactAttachments = 131072
182
+ }
183
+ interface APIReactionEmoji {
184
+ id: Snowflake | null;
185
+ name: string;
186
+ animated?: boolean | null;
187
+ }
188
+ interface APIMessageReaction {
189
+ emoji: APIReactionEmoji;
190
+ count: number;
191
+ me?: boolean | null;
192
+ }
193
+ interface APIMessageReference {
194
+ channel_id: Snowflake;
195
+ message_id: Snowflake;
196
+ guild_id?: Snowflake | null;
197
+ type?: number;
198
+ }
199
+ interface APIMessageAttachment {
200
+ id: Snowflake;
201
+ filename: string;
202
+ title?: string | null;
203
+ description?: string | null;
204
+ content_type?: string | null;
205
+ size: number;
206
+ url?: string | null;
207
+ proxy_url?: string | null;
208
+ width?: number | null;
209
+ height?: number | null;
210
+ nsfw?: boolean | null;
211
+ duration?: number | null;
212
+ expires_at?: string | null;
213
+ expired?: boolean | null;
214
+ }
215
+ interface APIMessageSticker {
216
+ id: Snowflake;
217
+ name: string;
218
+ description?: string;
219
+ tags?: string[];
220
+ animated?: boolean;
221
+ }
222
+ interface APIMessage {
223
+ id: Snowflake;
224
+ channel_id: Snowflake;
225
+ guild_id?: Snowflake | null;
226
+ author: APIUser;
227
+ webhook_id?: Snowflake | null;
228
+ type: MessageType;
229
+ flags: number;
230
+ content: string;
231
+ timestamp: string;
232
+ edited_timestamp: string | null;
233
+ pinned: boolean;
234
+ mention_everyone?: boolean;
235
+ tts?: boolean;
236
+ mentions?: APIUser[] | null;
237
+ mention_roles?: Snowflake[] | null;
238
+ embeds?: APIEmbed[] | null;
239
+ attachments?: APIMessageAttachment[] | null;
240
+ stickers?: APIMessageSticker[] | null;
241
+ reactions?: APIMessageReaction[] | null;
242
+ message_reference?: APIMessageReference | null;
243
+ referenced_message?: APIMessage | null;
244
+ nonce?: string | null;
245
+ }
246
+
247
+ interface APIRole {
248
+ id: Snowflake;
249
+ name: string;
250
+ color: number;
251
+ position: number;
252
+ hoist_position?: number | null;
253
+ permissions: string;
254
+ hoist: boolean;
255
+ mentionable: boolean;
256
+ unicode_emoji?: string | null;
257
+ }
258
+
259
+ interface APIEmoji {
260
+ id: Snowflake;
261
+ name: string;
262
+ animated: boolean;
263
+ }
264
+ interface APIEmojiWithUser extends APIEmoji {
265
+ user?: APIUser;
266
+ }
267
+
268
+ interface APISticker {
269
+ id: Snowflake;
270
+ name: string;
271
+ description: string;
272
+ tags: string[];
273
+ animated: boolean;
274
+ }
275
+ interface APIStickerWithUser extends APISticker {
276
+ user?: APIUser;
277
+ }
278
+
279
+ declare enum WebhookType {
280
+ Incoming = 1,
281
+ ChannelFollower = 2
282
+ }
283
+ interface APIWebhook {
284
+ id: Snowflake;
285
+ guild_id: Snowflake;
286
+ channel_id: Snowflake;
287
+ name: string;
288
+ avatar: string | null;
289
+ token: string;
290
+ user: APIUser;
291
+ }
292
+
293
+ interface APIGuildPartial {
294
+ id: Snowflake;
295
+ name: string;
296
+ icon?: string | null;
297
+ banner?: string | null;
298
+ splash?: string | null;
299
+ features?: string[];
300
+ }
301
+ interface APIInvite {
302
+ code: string;
303
+ type: number;
304
+ guild: APIGuildPartial;
305
+ channel: APIChannelPartial;
306
+ inviter?: APIUser | null;
307
+ member_count?: number;
308
+ presence_count?: number;
309
+ expires_at?: string | null;
310
+ }
311
+
312
+ interface APIBan {
313
+ user: APIUser;
314
+ reason: string | null;
315
+ }
316
+
317
+ /**
318
+ * API error codes returned by the Fluxer API.
319
+ * Subset of commonly used codes for bot development.
320
+ */
321
+ declare enum APIErrorCode {
322
+ Unauthorized = "UNAUTHORIZED",
323
+ Forbidden = "FORBIDDEN",
324
+ MissingAuthorization = "MISSING_AUTHORIZATION",
325
+ InvalidAuthToken = "INVALID_AUTH_TOKEN",
326
+ InvalidToken = "INVALID_TOKEN",
327
+ TwoFactorRequired = "TWO_FACTOR_REQUIRED",
328
+ SudoModeRequired = "SUDO_MODE_REQUIRED",
329
+ NotFound = "NOT_FOUND",
330
+ UnknownUser = "UNKNOWN_USER",
331
+ UnknownGuild = "UNKNOWN_GUILD",
332
+ UnknownChannel = "UNKNOWN_CHANNEL",
333
+ UnknownMessage = "UNKNOWN_MESSAGE",
334
+ UnknownRole = "UNKNOWN_ROLE",
335
+ UnknownEmoji = "UNKNOWN_EMOJI",
336
+ UnknownSticker = "UNKNOWN_STICKER",
337
+ UnknownWebhook = "UNKNOWN_WEBHOOK",
338
+ UnknownInvite = "UNKNOWN_INVITE",
339
+ BadRequest = "BAD_REQUEST",
340
+ ValidationError = "VALIDATION_ERROR",
341
+ InvalidRequest = "INVALID_REQUEST",
342
+ InvalidFormBody = "INVALID_FORM_BODY",
343
+ RateLimited = "RATE_LIMITED",
344
+ SlowmodeRateLimited = "SLOWMODE_RATE_LIMITED",
345
+ InternalServerError = "INTERNAL_SERVER_ERROR",
346
+ BadGateway = "BAD_GATEWAY",
347
+ GatewayTimeout = "GATEWAY_TIMEOUT",
348
+ ServiceUnavailable = "SERVICE_UNAVAILABLE",
349
+ BotsCannotSendFriendRequests = "BOTS_CANNOT_SEND_FRIEND_REQUESTS",
350
+ BotAlreadyInGuild = "BOT_ALREADY_IN_GUILD",
351
+ BotApplicationNotFound = "BOT_APPLICATION_NOT_FOUND",
352
+ BotIsPrivate = "BOT_IS_PRIVATE",
353
+ NotABotApplication = "NOT_A_BOT_APPLICATION",
354
+ CannotSendEmptyMessage = "CANNOT_SEND_EMPTY_MESSAGE",
355
+ FileSizeTooLarge = "FILE_SIZE_TOO_LARGE",
356
+ MaxEmojis = "MAX_EMOJIS",
357
+ MaxStickers = "MAX_STICKERS",
358
+ MaxWebhooks = "MAX_WEBHOOKS"
359
+ }
360
+ interface APIErrorBody {
361
+ code: APIErrorCode | string;
362
+ message: string;
363
+ errors?: Array<{
364
+ path: string;
365
+ message: string;
366
+ code?: string;
367
+ }>;
368
+ }
369
+ interface RateLimitErrorBody extends APIErrorBody {
370
+ code: 'RATE_LIMITED';
371
+ retry_after: number;
372
+ global?: boolean;
373
+ }
374
+
375
+ interface APIGatewayBotResponse {
376
+ url: string;
377
+ shards: number;
378
+ session_start_limit: {
379
+ total: number;
380
+ remaining: number;
381
+ reset_after: number;
382
+ max_concurrency: number;
383
+ };
384
+ }
385
+
386
+ /** Minimal application command interaction (slash command) payload from the gateway. */
387
+ interface APIApplicationCommandInteraction {
388
+ id: string;
389
+ application_id: string;
390
+ type: number;
391
+ token: string;
392
+ data?: {
393
+ id?: string;
394
+ name: string;
395
+ type?: number;
396
+ options?: Array<{
397
+ name: string;
398
+ type: number;
399
+ value?: unknown;
400
+ }>;
401
+ };
402
+ guild_id?: string;
403
+ channel_id?: string;
404
+ member?: unknown;
405
+ user?: unknown;
406
+ }
407
+
408
+ /**
409
+ * Gateway opcodes (Discord-compatible).
410
+ * @see https://discord.com/developers/docs/topics/opcodes-and-status-codes#gateway-gateway-opcodes
411
+ */
412
+ declare enum GatewayOpcodes {
413
+ Dispatch = 0,
414
+ Heartbeat = 1,
415
+ Identify = 2,
416
+ PresenceUpdate = 3,
417
+ VoiceStateUpdate = 4,
418
+ Resume = 6,
419
+ Reconnect = 7,
420
+ RequestGuildMembers = 8,
421
+ InvalidSession = 9,
422
+ Hello = 10,
423
+ HeartbeatAck = 11
424
+ }
425
+
426
+ /**
427
+ * Gateway dispatch event names (Discord-compatible).
428
+ */
429
+ declare const GatewayDispatchEvents: {
430
+ readonly Ready: "READY";
431
+ readonly Resumed: "RESUMED";
432
+ readonly MessageCreate: "MESSAGE_CREATE";
433
+ readonly MessageUpdate: "MESSAGE_UPDATE";
434
+ readonly MessageDelete: "MESSAGE_DELETE";
435
+ readonly MessageDeleteBulk: "MESSAGE_DELETE_BULK";
436
+ readonly MessageReactionAdd: "MESSAGE_REACTION_ADD";
437
+ readonly MessageReactionRemove: "MESSAGE_REACTION_REMOVE";
438
+ readonly MessageReactionRemoveAll: "MESSAGE_REACTION_REMOVE_ALL";
439
+ readonly MessageReactionRemoveEmoji: "MESSAGE_REACTION_REMOVE_EMOJI";
440
+ readonly InteractionCreate: "INTERACTION_CREATE";
441
+ readonly GuildCreate: "GUILD_CREATE";
442
+ readonly GuildUpdate: "GUILD_UPDATE";
443
+ readonly GuildDelete: "GUILD_DELETE";
444
+ readonly GuildBanAdd: "GUILD_BAN_ADD";
445
+ readonly GuildBanRemove: "GUILD_BAN_REMOVE";
446
+ readonly GuildEmojisUpdate: "GUILD_EMOJIS_UPDATE";
447
+ readonly GuildStickersUpdate: "GUILD_STICKERS_UPDATE";
448
+ readonly GuildIntegrationsUpdate: "GUILD_INTEGRATIONS_UPDATE";
449
+ readonly GuildMemberAdd: "GUILD_MEMBER_ADD";
450
+ readonly GuildMemberUpdate: "GUILD_MEMBER_UPDATE";
451
+ readonly GuildMemberRemove: "GUILD_MEMBER_REMOVE";
452
+ readonly GuildRoleCreate: "GUILD_ROLE_CREATE";
453
+ readonly GuildRoleUpdate: "GUILD_ROLE_UPDATE";
454
+ readonly GuildRoleDelete: "GUILD_ROLE_DELETE";
455
+ readonly GuildScheduledEventCreate: "GUILD_SCHEDULED_EVENT_CREATE";
456
+ readonly GuildScheduledEventUpdate: "GUILD_SCHEDULED_EVENT_UPDATE";
457
+ readonly GuildScheduledEventDelete: "GUILD_SCHEDULED_EVENT_DELETE";
458
+ readonly ChannelCreate: "CHANNEL_CREATE";
459
+ readonly ChannelUpdate: "CHANNEL_UPDATE";
460
+ readonly ChannelDelete: "CHANNEL_DELETE";
461
+ readonly ChannelPinsUpdate: "CHANNEL_PINS_UPDATE";
462
+ readonly InviteCreate: "INVITE_CREATE";
463
+ readonly InviteDelete: "INVITE_DELETE";
464
+ readonly TypingStart: "TYPING_START";
465
+ readonly UserUpdate: "USER_UPDATE";
466
+ readonly PresenceUpdate: "PRESENCE_UPDATE";
467
+ readonly VoiceStateUpdate: "VOICE_STATE_UPDATE";
468
+ readonly VoiceServerUpdate: "VOICE_SERVER_UPDATE";
469
+ readonly WebhooksUpdate: "WEBHOOKS_UPDATE";
470
+ };
471
+ type GatewayDispatchEventName = (typeof GatewayDispatchEvents)[keyof typeof GatewayDispatchEvents];
472
+
473
+ interface GatewayIdentifyData {
474
+ token: string;
475
+ intents: number;
476
+ properties: {
477
+ os: string;
478
+ browser: string;
479
+ device: string;
480
+ };
481
+ compress?: boolean;
482
+ large_threshold?: number;
483
+ shard?: [shardId: number, numShards: number];
484
+ presence?: GatewayPresenceUpdateData;
485
+ }
486
+ interface GatewayResumeData {
487
+ token: string;
488
+ session_id: string;
489
+ seq: number;
490
+ }
491
+ interface GatewayPresenceUpdateData {
492
+ since?: number | null;
493
+ activities?: Array<{
494
+ name: string;
495
+ type: number;
496
+ url?: string | null;
497
+ }>;
498
+ status: 'online' | 'idle' | 'dnd' | 'invisible';
499
+ afk?: boolean;
500
+ }
501
+ interface GatewayVoiceStateUpdateData {
502
+ guild_id: Snowflake;
503
+ channel_id: Snowflake | null;
504
+ self_mute?: boolean;
505
+ self_deaf?: boolean;
506
+ }
507
+ type GatewaySendPayload = {
508
+ op: GatewayOpcodes.Identify;
509
+ d: GatewayIdentifyData;
510
+ } | {
511
+ op: GatewayOpcodes.Resume;
512
+ d: GatewayResumeData;
513
+ } | {
514
+ op: GatewayOpcodes.Heartbeat;
515
+ d: number | null;
516
+ } | {
517
+ op: GatewayOpcodes.PresenceUpdate;
518
+ d: GatewayPresenceUpdateData;
519
+ } | {
520
+ op: GatewayOpcodes.VoiceStateUpdate;
521
+ d: GatewayVoiceStateUpdateData;
522
+ } | {
523
+ op: GatewayOpcodes.RequestGuildMembers;
524
+ d: {
525
+ guild_id: Snowflake;
526
+ query?: string;
527
+ limit: number;
528
+ };
529
+ };
530
+ interface GatewayHelloData {
531
+ heartbeat_interval: number;
532
+ }
533
+ interface GatewayReadyDispatchData {
534
+ v: number;
535
+ user: APIUser;
536
+ guilds: Array<APIGuild & {
537
+ unavailable?: boolean;
538
+ }>;
539
+ session_id: string;
540
+ shard?: [number, number];
541
+ application: {
542
+ id: Snowflake;
543
+ flags: number;
544
+ };
545
+ }
546
+ type GatewayMessageCreateDispatchData = APIMessage;
547
+ type GatewayMessageUpdateDispatchData = APIMessage;
548
+ interface GatewayMessageDeleteDispatchData {
549
+ id: Snowflake;
550
+ channel_id: Snowflake;
551
+ guild_id?: Snowflake;
552
+ }
553
+ interface GatewayMessageDeleteBulkDispatchData {
554
+ ids: Snowflake[];
555
+ channel_id: Snowflake;
556
+ guild_id?: Snowflake;
557
+ }
558
+ type GatewayGuildCreateDispatchData = APIGuild & {
559
+ unavailable?: boolean;
560
+ };
561
+ type GatewayGuildUpdateDispatchData = APIGuild;
562
+ interface GatewayGuildDeleteDispatchData {
563
+ id: Snowflake;
564
+ unavailable?: boolean;
565
+ }
566
+ type GatewayChannelCreateDispatchData = APIChannel;
567
+ type GatewayChannelUpdateDispatchData = APIChannel;
568
+ type GatewayChannelDeleteDispatchData = APIChannel;
569
+ type GatewayGuildMemberAddDispatchData = APIGuildMember & {
570
+ guild_id: Snowflake;
571
+ };
572
+ interface GatewayGuildMemberUpdateDispatchData {
573
+ guild_id: Snowflake;
574
+ roles: Snowflake[];
575
+ user: APIUser;
576
+ nick?: string | null;
577
+ avatar?: string | null;
578
+ joined_at?: string;
579
+ premium_since?: string | null;
580
+ communication_disabled_until?: string | null;
581
+ }
582
+ interface GatewayGuildMemberRemoveDispatchData {
583
+ guild_id: Snowflake;
584
+ user: APIUser;
585
+ }
586
+ interface GatewayGuildRoleCreateDispatchData {
587
+ guild_id: Snowflake;
588
+ role: APIRole;
589
+ }
590
+ interface GatewayGuildRoleUpdateDispatchData {
591
+ guild_id: Snowflake;
592
+ role: APIRole;
593
+ }
594
+ interface GatewayGuildRoleDeleteDispatchData {
595
+ guild_id: Snowflake;
596
+ role_id: Snowflake;
597
+ }
598
+ /** Incoming voice state update (gateway -> client). */
599
+ interface GatewayVoiceStateUpdateDispatchData {
600
+ guild_id?: Snowflake;
601
+ channel_id: Snowflake | null;
602
+ user_id: Snowflake;
603
+ member?: APIGuildMember & {
604
+ guild_id?: Snowflake;
605
+ };
606
+ session_id: string;
607
+ deaf?: boolean;
608
+ mute?: boolean;
609
+ self_deaf?: boolean;
610
+ self_mute?: boolean;
611
+ self_video?: boolean;
612
+ suppress?: boolean;
613
+ }
614
+ /** Incoming voice server update (gateway -> client). */
615
+ interface GatewayVoiceServerUpdateDispatchData {
616
+ token: string;
617
+ guild_id: Snowflake;
618
+ endpoint: string | null;
619
+ }
620
+ interface GatewayReceivePayload<T = unknown> {
621
+ op: GatewayOpcodes;
622
+ d?: T;
623
+ s?: number;
624
+ t?: GatewayDispatchEventName;
625
+ }
626
+
627
+ /**
628
+ * Route builder helpers for REST API.
629
+ * All routes are relative to /v1
630
+ */
631
+ declare const Routes: {
632
+ readonly channel: (id: Snowflake) => `/channels/${string}`;
633
+ readonly channelMessages: (id: Snowflake) => `/channels/${string}/messages`;
634
+ readonly channelMessage: (channelId: Snowflake, messageId: Snowflake) => `/channels/${string}/messages/${string}`;
635
+ readonly channelMessageReactions: (channelId: Snowflake, messageId: Snowflake) => `/channels/${string}/messages/${string}/reactions`;
636
+ readonly channelMessageReaction: (channelId: Snowflake, messageId: Snowflake, emoji: string) => `/channels/${string}/messages/${string}/reactions/${string}`;
637
+ readonly channelPins: (id: Snowflake) => `/channels/${string}/messages/pins`;
638
+ readonly channelPin: (channelId: Snowflake, messageId: Snowflake) => `/channels/${string}/messages/pins/${string}`;
639
+ readonly channelBulkDelete: (id: Snowflake) => `/channels/${string}/messages/bulk-delete`;
640
+ readonly channelWebhooks: (id: Snowflake) => `/channels/${string}/webhooks`;
641
+ readonly channelTyping: (id: Snowflake) => `/channels/${string}/typing`;
642
+ readonly channelInvites: (id: Snowflake) => `/channels/${string}/invites`;
643
+ readonly channelPermission: (channelId: Snowflake, overwriteId: Snowflake) => `/channels/${string}/permissions/${string}`;
644
+ readonly guild: (id: Snowflake) => `/guilds/${string}`;
645
+ readonly guildChannels: (id: Snowflake) => `/guilds/${string}/channels`;
646
+ readonly guildMembers: (id: Snowflake) => `/guilds/${string}/members`;
647
+ readonly guildMember: (guildId: Snowflake, userId: Snowflake) => `/guilds/${string}/members/${string}`;
648
+ readonly guildMemberRole: (guildId: Snowflake, userId: Snowflake, roleId: Snowflake) => `/guilds/${string}/members/${string}/roles/${string}`;
649
+ readonly guildRoles: (id: Snowflake) => `/guilds/${string}/roles`;
650
+ readonly guildRole: (guildId: Snowflake, roleId: Snowflake) => `/guilds/${string}/roles/${string}`;
651
+ readonly guildBans: (id: Snowflake) => `/guilds/${string}/bans`;
652
+ readonly guildBan: (guildId: Snowflake, userId: Snowflake) => `/guilds/${string}/bans/${string}`;
653
+ readonly guildInvites: (id: Snowflake) => `/guilds/${string}/invites`;
654
+ readonly guildAuditLogs: (id: Snowflake) => `/guilds/${string}/audit-logs`;
655
+ readonly guildEmojis: (id: Snowflake) => `/guilds/${string}/emojis`;
656
+ readonly guildEmoji: (guildId: Snowflake, emojiId: Snowflake) => `/guilds/${string}/emojis/${string}`;
657
+ readonly guildStickers: (id: Snowflake) => `/guilds/${string}/stickers`;
658
+ readonly guildSticker: (guildId: Snowflake, stickerId: Snowflake) => `/guilds/${string}/stickers/${string}`;
659
+ readonly guildWebhooks: (id: Snowflake) => `/guilds/${string}/webhooks`;
660
+ readonly user: (id: Snowflake) => `/users/${string}`;
661
+ readonly currentUser: () => "/users/@me";
662
+ readonly userProfile: (id: Snowflake) => `/users/${string}/profile`;
663
+ readonly gatewayBot: () => "/gateway/bot";
664
+ readonly applicationCommands: (applicationId: Snowflake) => `/applications/${string}/commands`;
665
+ readonly applicationCommand: (applicationId: Snowflake, commandId: Snowflake) => `/applications/${string}/commands/${string}`;
666
+ readonly interactionCallback: (interactionId: Snowflake, interactionToken: string) => `/interactions/${string}/${string}/callback`;
667
+ readonly oauth2ApplicationBot: (id: Snowflake) => `/oauth2/applications/${string}/bot`;
668
+ readonly oauth2ApplicationBotResetToken: (id: Snowflake) => `/oauth2/applications/${string}/bot/reset-token`;
669
+ };
670
+
671
+ export { type APIApplicationCommandInteraction, type APIBan, type APIChannel, type APIChannelOverwrite, type APIChannelPartial, type APIEmbed, type APIEmbedAuthor, type APIEmbedField, type APIEmbedFooter, type APIEmbedMedia, type APIEmoji, type APIEmojiWithUser, type APIErrorBody, APIErrorCode, type APIGatewayBotResponse, type APIGuild, type APIGuildMember, type APIGuildPartial, type APIInvite, type APIMessage, type APIMessageAttachment, type APIMessageReaction, type APIMessageReference, type APIMessageSticker, type APIReactionEmoji, type APIRole, type APISticker, type APIStickerWithUser, type APIUser, type APIUserPartial, type APIWebhook, ChannelType, DefaultMessageNotifications, type EmbedType, FLUXER_EPOCH, type GatewayChannelCreateDispatchData, type GatewayChannelDeleteDispatchData, type GatewayChannelUpdateDispatchData, type GatewayDispatchEventName, GatewayDispatchEvents, type GatewayGuildCreateDispatchData, type GatewayGuildDeleteDispatchData, type GatewayGuildMemberAddDispatchData, type GatewayGuildMemberRemoveDispatchData, type GatewayGuildMemberUpdateDispatchData, type GatewayGuildRoleCreateDispatchData, type GatewayGuildRoleDeleteDispatchData, type GatewayGuildRoleUpdateDispatchData, type GatewayGuildUpdateDispatchData, type GatewayHelloData, type GatewayIdentifyData, type GatewayMessageCreateDispatchData, type GatewayMessageDeleteBulkDispatchData, type GatewayMessageDeleteDispatchData, type GatewayMessageUpdateDispatchData, GatewayOpcodes, type GatewayPresenceUpdateData, type GatewayReadyDispatchData, type GatewayReceivePayload, type GatewayResumeData, type GatewaySendPayload, type GatewayVoiceServerUpdateDispatchData, type GatewayVoiceStateUpdateData, type GatewayVoiceStateUpdateDispatchData, GuildExplicitContentFilter, type GuildFeature, GuildMFALevel, GuildVerificationLevel, MessageFlags, MessageType, OverwriteType, type RateLimitErrorBody, Routes, type Snowflake, WebhookType };