@impulsedev/chameleon 1.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/LICENSE +21 -0
- package/README.md +23 -0
- package/dist/index.d.ts +2797 -0
- package/dist/index.js +3814 -0
- package/package.json +49 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,2797 @@
|
|
|
1
|
+
interface Emoji {
|
|
2
|
+
id: string | null;
|
|
3
|
+
name: string | null;
|
|
4
|
+
roles?: string[];
|
|
5
|
+
user?: User;
|
|
6
|
+
requireColons?: boolean;
|
|
7
|
+
managed?: boolean;
|
|
8
|
+
animated?: boolean;
|
|
9
|
+
available?: boolean;
|
|
10
|
+
}
|
|
11
|
+
declare const StickerType: {
|
|
12
|
+
readonly STANDARD: 1;
|
|
13
|
+
readonly GUILD: 2;
|
|
14
|
+
};
|
|
15
|
+
declare const StickerFormatType: {
|
|
16
|
+
readonly PNG: 1;
|
|
17
|
+
readonly APNG: 2;
|
|
18
|
+
readonly LOTTIE: 3;
|
|
19
|
+
readonly GIF: 4;
|
|
20
|
+
};
|
|
21
|
+
interface Sticker {
|
|
22
|
+
id: string;
|
|
23
|
+
packId?: string;
|
|
24
|
+
name: string;
|
|
25
|
+
description: string | null;
|
|
26
|
+
tags: string;
|
|
27
|
+
type: number;
|
|
28
|
+
formatType: number;
|
|
29
|
+
available?: boolean;
|
|
30
|
+
guildId?: string;
|
|
31
|
+
user?: User;
|
|
32
|
+
sortValue?: number;
|
|
33
|
+
}
|
|
34
|
+
interface StickerItem {
|
|
35
|
+
id: string;
|
|
36
|
+
name: string;
|
|
37
|
+
formatType: number;
|
|
38
|
+
}
|
|
39
|
+
interface StickerPack {
|
|
40
|
+
id: string;
|
|
41
|
+
stickers: Sticker[];
|
|
42
|
+
name: string;
|
|
43
|
+
skuId: string;
|
|
44
|
+
coverStickerId?: string;
|
|
45
|
+
description: string;
|
|
46
|
+
bannerAssetId?: string;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
interface WelcomeScreenChannel {
|
|
50
|
+
channelId: string;
|
|
51
|
+
description: string;
|
|
52
|
+
emojiId: string | null;
|
|
53
|
+
emojiName: string | null;
|
|
54
|
+
}
|
|
55
|
+
interface WelcomeScreen {
|
|
56
|
+
description: string | null;
|
|
57
|
+
welcomeChannels: WelcomeScreenChannel[];
|
|
58
|
+
}
|
|
59
|
+
interface IncidentsData {
|
|
60
|
+
invitesDisabledUntil: string | null;
|
|
61
|
+
dmsDisabledUntil: string | null;
|
|
62
|
+
dmSpamDetectedAt?: string | null;
|
|
63
|
+
raidDetectedAt?: string | null;
|
|
64
|
+
}
|
|
65
|
+
interface Guild {
|
|
66
|
+
id: string;
|
|
67
|
+
name: string;
|
|
68
|
+
icon: string | null;
|
|
69
|
+
iconHash?: string | null;
|
|
70
|
+
splash: string | null;
|
|
71
|
+
discoverySplash: string | null;
|
|
72
|
+
owner?: boolean | null;
|
|
73
|
+
ownerId: string;
|
|
74
|
+
permissions?: string | null;
|
|
75
|
+
region?: string | null;
|
|
76
|
+
afkChannelId: string | null;
|
|
77
|
+
afkTimeout: number;
|
|
78
|
+
widgetEnabled?: boolean;
|
|
79
|
+
widgetChannelId?: string | null;
|
|
80
|
+
verificationLevel: number;
|
|
81
|
+
defaultMessageNotifications: number;
|
|
82
|
+
explicitContentFilter: number;
|
|
83
|
+
roles: Role[];
|
|
84
|
+
emojis: Emoji[];
|
|
85
|
+
features: string[];
|
|
86
|
+
mfaLevel: number;
|
|
87
|
+
applicationId: string | null;
|
|
88
|
+
systemChannelId: string | null;
|
|
89
|
+
systemChannelFlags: number;
|
|
90
|
+
rulesChannelId: string | null;
|
|
91
|
+
maxPresences?: number | null;
|
|
92
|
+
maxMembers?: number;
|
|
93
|
+
vanityUrlCode: string | null;
|
|
94
|
+
description: string | null;
|
|
95
|
+
banner: string | null;
|
|
96
|
+
premiumTier: number;
|
|
97
|
+
premiumSubscriptionCount?: number;
|
|
98
|
+
preferredLocale: string;
|
|
99
|
+
publicUpdatesChannelId: string | null;
|
|
100
|
+
maxVideoChannelUsers?: number;
|
|
101
|
+
maxStageVideoChannelUsers?: number;
|
|
102
|
+
approximateMemberCount?: number;
|
|
103
|
+
approximatePresenceCount?: number;
|
|
104
|
+
welcomeScreen?: WelcomeScreen;
|
|
105
|
+
nsfwLevel: number;
|
|
106
|
+
stickers?: Sticker[];
|
|
107
|
+
premiumProgressBarEnabled: boolean;
|
|
108
|
+
safetyAlertsChannelId?: string | null;
|
|
109
|
+
incidentsData?: IncidentsData | null;
|
|
110
|
+
large?: boolean;
|
|
111
|
+
}
|
|
112
|
+
interface Member {
|
|
113
|
+
user?: User;
|
|
114
|
+
nick?: string | null;
|
|
115
|
+
avatar?: string | null;
|
|
116
|
+
banner?: string | null;
|
|
117
|
+
roles: string[];
|
|
118
|
+
joinedAt: number | null;
|
|
119
|
+
premiumSince?: number | null;
|
|
120
|
+
deaf: boolean;
|
|
121
|
+
mute: boolean;
|
|
122
|
+
flags: number;
|
|
123
|
+
pending?: boolean;
|
|
124
|
+
permissions?: string;
|
|
125
|
+
communicationDisabledUntil?: number | null;
|
|
126
|
+
avatarDecorationData?: AvatarDecorationData | null;
|
|
127
|
+
collectibles?: Collectibles | null;
|
|
128
|
+
}
|
|
129
|
+
interface Role {
|
|
130
|
+
id: string;
|
|
131
|
+
name: string;
|
|
132
|
+
color: number;
|
|
133
|
+
hoist: boolean;
|
|
134
|
+
icon?: string | null;
|
|
135
|
+
unicodeEmoji?: string | null;
|
|
136
|
+
position: number;
|
|
137
|
+
permissions: string;
|
|
138
|
+
managed: boolean;
|
|
139
|
+
mentionable: boolean;
|
|
140
|
+
tags?: RoleTags;
|
|
141
|
+
flags: number;
|
|
142
|
+
}
|
|
143
|
+
interface RoleTags {
|
|
144
|
+
botId?: string;
|
|
145
|
+
integrationId?: string;
|
|
146
|
+
premiumSubscriber?: null;
|
|
147
|
+
subscriptionListingId?: string;
|
|
148
|
+
availableForPurchase?: null;
|
|
149
|
+
guildConnections?: null;
|
|
150
|
+
}
|
|
151
|
+
declare const DefaultMessageNotificationLevel: {
|
|
152
|
+
readonly ALL_MESSAGES: 0;
|
|
153
|
+
readonly ONLY_MENTIONS: 1;
|
|
154
|
+
};
|
|
155
|
+
declare const ExplicitContentFilterLevel: {
|
|
156
|
+
readonly DISABLED: 0;
|
|
157
|
+
readonly MEMBERS_WITHOUT_ROLES: 1;
|
|
158
|
+
readonly ALL_MEMBERS: 2;
|
|
159
|
+
};
|
|
160
|
+
declare const MFALevel: {
|
|
161
|
+
readonly NONE: 0;
|
|
162
|
+
readonly ELEVATED: 1;
|
|
163
|
+
};
|
|
164
|
+
declare const VerificationLevel: {
|
|
165
|
+
readonly NONE: 0;
|
|
166
|
+
readonly LOW: 1;
|
|
167
|
+
readonly MEDIUM: 2;
|
|
168
|
+
readonly HIGH: 3;
|
|
169
|
+
readonly VERY_HIGH: 4;
|
|
170
|
+
};
|
|
171
|
+
declare const GuildNSFWLevel: {
|
|
172
|
+
readonly DEFAULT: 0;
|
|
173
|
+
readonly EXPLICIT: 1;
|
|
174
|
+
readonly SAFE: 2;
|
|
175
|
+
readonly AGE_RESTRICTED: 3;
|
|
176
|
+
};
|
|
177
|
+
declare const PremiumTier: {
|
|
178
|
+
readonly NONE: 0;
|
|
179
|
+
readonly TIER_1: 1;
|
|
180
|
+
readonly TIER_2: 2;
|
|
181
|
+
readonly TIER_3: 3;
|
|
182
|
+
};
|
|
183
|
+
declare const SystemChannelFlag: {
|
|
184
|
+
readonly SUPPRESS_JOIN_NOTIFICATIONS: number;
|
|
185
|
+
readonly SUPPRESS_PREMIUM_SUBSCRIPTIONS: number;
|
|
186
|
+
readonly SUPPRESS_GUILD_REMINDER_NOTIFICATIONS: number;
|
|
187
|
+
readonly SUPPRESS_JOIN_NOTIFICATION_REPLIES: number;
|
|
188
|
+
readonly SUPPRESS_ROLE_SUBSCRIPTION_PURCHASE_NOTIFICATIONS: number;
|
|
189
|
+
readonly SUPPRESS_ROLE_SUBSCRIPTION_PURCHASE_NOTIFICATION_REPLIES: number;
|
|
190
|
+
};
|
|
191
|
+
declare const GuildMemberFlag: {
|
|
192
|
+
readonly DID_REJOIN: number;
|
|
193
|
+
readonly COMPLETED_ONBOARDING: number;
|
|
194
|
+
readonly BYPASSES_VERIFICATION: number;
|
|
195
|
+
readonly STARTED_ONBOARDING: number;
|
|
196
|
+
readonly IS_GUEST: number;
|
|
197
|
+
readonly STARTED_HOME_ACTIONS: number;
|
|
198
|
+
readonly COMPLETED_HOME_ACTIONS: number;
|
|
199
|
+
readonly AUTOMOD_QUARANTINED_USERNAME: number;
|
|
200
|
+
readonly DM_SETTINGS_UPSELL_ACKNOWLEDGED: number;
|
|
201
|
+
readonly AUTOMOD_QUARANTINED_GUILD_TAG: number;
|
|
202
|
+
};
|
|
203
|
+
|
|
204
|
+
declare const ApplicationFlag: {
|
|
205
|
+
readonly APPLICATION_AUTO_MODERATION_RULE_CREATE_BADGE: number;
|
|
206
|
+
readonly GATEWAY_PRESENCE: number;
|
|
207
|
+
readonly GATEWAY_PRESENCE_LIMITED: number;
|
|
208
|
+
readonly GATEWAY_GUILD_MEMBERS: number;
|
|
209
|
+
readonly GATEWAY_GUILD_MEMBERS_LIMITED: number;
|
|
210
|
+
readonly VERIFICATION_PENDING_GUILD_LIMIT: number;
|
|
211
|
+
readonly EMBEDDED: number;
|
|
212
|
+
readonly GATEWAY_MESSAGE_CONTENT: number;
|
|
213
|
+
readonly GATEWAY_MESSAGE_CONTENT_LIMITED: number;
|
|
214
|
+
readonly APPLICATION_COMMAND_BADGE: number;
|
|
215
|
+
};
|
|
216
|
+
interface TeamMember {
|
|
217
|
+
membershipState: number;
|
|
218
|
+
permissions: string[];
|
|
219
|
+
teamId: string;
|
|
220
|
+
user: Partial<User>;
|
|
221
|
+
}
|
|
222
|
+
interface Team {
|
|
223
|
+
icon: string | null;
|
|
224
|
+
id: string;
|
|
225
|
+
members: TeamMember[];
|
|
226
|
+
name: string;
|
|
227
|
+
ownerUserId: string;
|
|
228
|
+
}
|
|
229
|
+
interface InstallParams {
|
|
230
|
+
scopes: string[];
|
|
231
|
+
permissions: string;
|
|
232
|
+
}
|
|
233
|
+
declare const ApplicationIntegrationType: {
|
|
234
|
+
readonly GUILD_INSTALL: 0;
|
|
235
|
+
readonly USER_INSTALL: 1;
|
|
236
|
+
};
|
|
237
|
+
interface ApplicationIntegrationTypeConfiguration {
|
|
238
|
+
oauth2InstallParams?: InstallParams;
|
|
239
|
+
}
|
|
240
|
+
declare const ApplicationEventWebhookStatus: {
|
|
241
|
+
readonly DISABLED: 1;
|
|
242
|
+
readonly ENABLED: 2;
|
|
243
|
+
readonly DISABLED_BY_DISCORD: 3;
|
|
244
|
+
};
|
|
245
|
+
interface Application {
|
|
246
|
+
id: string;
|
|
247
|
+
name: string;
|
|
248
|
+
icon: string | null;
|
|
249
|
+
description: string;
|
|
250
|
+
rpcOrigins?: string[];
|
|
251
|
+
botPublic: boolean;
|
|
252
|
+
botRequireCodeGrant: boolean;
|
|
253
|
+
bot?: Partial<User>;
|
|
254
|
+
termsOfServiceUrl?: string;
|
|
255
|
+
privacyPolicyUrl?: string;
|
|
256
|
+
owner?: Partial<User>;
|
|
257
|
+
verifyKey: string;
|
|
258
|
+
team: Team | null;
|
|
259
|
+
guildId?: string;
|
|
260
|
+
guild?: Partial<Guild>;
|
|
261
|
+
primarySkuId?: string;
|
|
262
|
+
slug?: string;
|
|
263
|
+
coverImage?: string;
|
|
264
|
+
flags?: number;
|
|
265
|
+
approximateGuildCount?: number;
|
|
266
|
+
approximateUserInstallCount?: number;
|
|
267
|
+
approximateUserAuthorizationCount?: number;
|
|
268
|
+
redirectUris?: string[];
|
|
269
|
+
interactionsEndpointUrl?: string | null;
|
|
270
|
+
roleConnectionsVerificationUrl?: string | null;
|
|
271
|
+
eventWebhooksUrl?: string | null;
|
|
272
|
+
eventWebhooksStatus?: number;
|
|
273
|
+
eventWebhooksTypes?: string[];
|
|
274
|
+
tags?: string[];
|
|
275
|
+
installParams?: InstallParams;
|
|
276
|
+
integrationTypesConfig?: Record<string, ApplicationIntegrationTypeConfiguration>;
|
|
277
|
+
customInstallUrl?: string;
|
|
278
|
+
}
|
|
279
|
+
declare const ActivityLocationKind: {
|
|
280
|
+
readonly GUILD_CHANNEL: "gc";
|
|
281
|
+
readonly PRIVATE_CHANNEL: "pc";
|
|
282
|
+
};
|
|
283
|
+
interface ActivityLocation {
|
|
284
|
+
id: string;
|
|
285
|
+
kind: string;
|
|
286
|
+
channelId: string;
|
|
287
|
+
guildId?: string;
|
|
288
|
+
}
|
|
289
|
+
interface ActivityInstance {
|
|
290
|
+
applicationId: string;
|
|
291
|
+
instanceId: string;
|
|
292
|
+
launchId: string;
|
|
293
|
+
location: ActivityLocation;
|
|
294
|
+
users: string[];
|
|
295
|
+
}
|
|
296
|
+
declare const ApplicationRoleConnectionMetadataType: {
|
|
297
|
+
readonly INTEGER_LESS_THAN_OR_EQUAL: 1;
|
|
298
|
+
readonly INTEGER_GREATER_THAN_OR_EQUAL: 2;
|
|
299
|
+
readonly INTEGER_EQUAL: 3;
|
|
300
|
+
readonly INTEGER_NOT_EQUAL: 4;
|
|
301
|
+
readonly DATETIME_LESS_THAN_OR_EQUAL: 5;
|
|
302
|
+
readonly DATETIME_GREATER_THAN_OR_EQUAL: 6;
|
|
303
|
+
readonly BOOLEAN_EQUAL: 7;
|
|
304
|
+
readonly BOOLEAN_NOT_EQUAL: 8;
|
|
305
|
+
};
|
|
306
|
+
interface ApplicationRoleConnectionMetadata {
|
|
307
|
+
type: number;
|
|
308
|
+
key: string;
|
|
309
|
+
name: string;
|
|
310
|
+
nameLocalizations?: Record<string, string>;
|
|
311
|
+
description: string;
|
|
312
|
+
descriptionLocalizations?: Record<string, string>;
|
|
313
|
+
}
|
|
314
|
+
declare const ApplicationCommandType: {
|
|
315
|
+
readonly CHAT_INPUT: 1;
|
|
316
|
+
readonly USER: 2;
|
|
317
|
+
readonly MESSAGE: 3;
|
|
318
|
+
readonly PRIMARY_ENTRY_POINT: 4;
|
|
319
|
+
};
|
|
320
|
+
declare const ApplicationCommandOptionType: {
|
|
321
|
+
readonly SUB_COMMAND: 1;
|
|
322
|
+
readonly SUB_COMMAND_GROUP: 2;
|
|
323
|
+
readonly STRING: 3;
|
|
324
|
+
readonly INTEGER: 4;
|
|
325
|
+
readonly BOOLEAN: 5;
|
|
326
|
+
readonly USER: 6;
|
|
327
|
+
readonly CHANNEL: 7;
|
|
328
|
+
readonly ROLE: 8;
|
|
329
|
+
readonly MENTIONABLE: 9;
|
|
330
|
+
readonly NUMBER: 10;
|
|
331
|
+
readonly ATTACHMENT: 11;
|
|
332
|
+
};
|
|
333
|
+
interface ApplicationCommandOptionChoice {
|
|
334
|
+
name: string;
|
|
335
|
+
nameLocalizations?: Record<string, string>;
|
|
336
|
+
value: string | number;
|
|
337
|
+
}
|
|
338
|
+
interface ApplicationCommandOption {
|
|
339
|
+
type: number;
|
|
340
|
+
name: string;
|
|
341
|
+
nameLocalizations?: Record<string, string>;
|
|
342
|
+
description: string;
|
|
343
|
+
descriptionLocalizations?: Record<string, string>;
|
|
344
|
+
required?: boolean;
|
|
345
|
+
choices?: ApplicationCommandOptionChoice[];
|
|
346
|
+
options?: ApplicationCommandOption[];
|
|
347
|
+
channelTypes?: number[];
|
|
348
|
+
minValue?: number;
|
|
349
|
+
maxValue?: number;
|
|
350
|
+
minLength?: number;
|
|
351
|
+
maxLength?: number;
|
|
352
|
+
autocomplete?: boolean;
|
|
353
|
+
}
|
|
354
|
+
interface ApplicationCommand {
|
|
355
|
+
id: string;
|
|
356
|
+
type?: number;
|
|
357
|
+
applicationId: string;
|
|
358
|
+
guildId?: string;
|
|
359
|
+
name: string;
|
|
360
|
+
nameLocalizations?: Record<string, string> | null;
|
|
361
|
+
description: string;
|
|
362
|
+
descriptionLocalizations?: Record<string, string> | null;
|
|
363
|
+
options?: ApplicationCommandOption[];
|
|
364
|
+
defaultMemberPermissions: string | null;
|
|
365
|
+
dmPermission?: boolean;
|
|
366
|
+
defaultPermission?: boolean | null;
|
|
367
|
+
nsfw?: boolean;
|
|
368
|
+
version: string;
|
|
369
|
+
integrationTypes?: number[];
|
|
370
|
+
contexts?: number[];
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
declare const IntegrationExpireBehavior: {
|
|
374
|
+
readonly REMOVE_ROLE: 0;
|
|
375
|
+
readonly KICK: 1;
|
|
376
|
+
};
|
|
377
|
+
interface IntegrationAccount {
|
|
378
|
+
id: string;
|
|
379
|
+
name: string;
|
|
380
|
+
}
|
|
381
|
+
interface Integration {
|
|
382
|
+
id: string;
|
|
383
|
+
name: string;
|
|
384
|
+
type: string;
|
|
385
|
+
enabled: boolean;
|
|
386
|
+
syncing?: boolean;
|
|
387
|
+
roleId?: string;
|
|
388
|
+
enableEmoticons?: boolean;
|
|
389
|
+
expireBehavior?: number;
|
|
390
|
+
expireGracePeriod?: number;
|
|
391
|
+
user?: User;
|
|
392
|
+
account: IntegrationAccount;
|
|
393
|
+
syncedAt?: number;
|
|
394
|
+
subscriberCount?: number;
|
|
395
|
+
revoked?: boolean;
|
|
396
|
+
application?: Application;
|
|
397
|
+
scopes?: string[];
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
interface AvatarDecorationData {
|
|
401
|
+
asset: string;
|
|
402
|
+
skuId: string;
|
|
403
|
+
}
|
|
404
|
+
interface Nameplate {
|
|
405
|
+
skuId: string;
|
|
406
|
+
asset: string;
|
|
407
|
+
label: string;
|
|
408
|
+
palette: string;
|
|
409
|
+
}
|
|
410
|
+
interface Collectibles {
|
|
411
|
+
nameplate?: Nameplate;
|
|
412
|
+
}
|
|
413
|
+
interface UserPrimaryGuild {
|
|
414
|
+
identityGuildId: string | null;
|
|
415
|
+
identityEnabled: boolean | null;
|
|
416
|
+
tag: string | null;
|
|
417
|
+
badge: string | null;
|
|
418
|
+
}
|
|
419
|
+
interface User {
|
|
420
|
+
id: string;
|
|
421
|
+
username: string;
|
|
422
|
+
discriminator: string;
|
|
423
|
+
globalName: string | null;
|
|
424
|
+
avatar: string | null;
|
|
425
|
+
bot?: boolean;
|
|
426
|
+
system?: boolean;
|
|
427
|
+
mfaEnabled?: boolean;
|
|
428
|
+
banner?: string | null;
|
|
429
|
+
accentColor?: number | null;
|
|
430
|
+
locale?: string;
|
|
431
|
+
verified?: boolean;
|
|
432
|
+
email?: string | null;
|
|
433
|
+
flags?: number;
|
|
434
|
+
premiumType?: number;
|
|
435
|
+
publicFlags?: number;
|
|
436
|
+
avatarDecorationData?: AvatarDecorationData | null;
|
|
437
|
+
collectibles?: Collectibles | null;
|
|
438
|
+
primaryGuild?: UserPrimaryGuild | null;
|
|
439
|
+
}
|
|
440
|
+
interface Connection {
|
|
441
|
+
id: string;
|
|
442
|
+
name: string;
|
|
443
|
+
type: string;
|
|
444
|
+
revoked?: boolean;
|
|
445
|
+
integrations?: Integration[];
|
|
446
|
+
verified: boolean;
|
|
447
|
+
friendSync: boolean;
|
|
448
|
+
showActivity: boolean;
|
|
449
|
+
twoWayLink: boolean;
|
|
450
|
+
visibility: number;
|
|
451
|
+
}
|
|
452
|
+
interface ApplicationRoleConnection {
|
|
453
|
+
platformName?: string | null;
|
|
454
|
+
metadata: Record<string, string>;
|
|
455
|
+
}
|
|
456
|
+
declare const UserFlag: {
|
|
457
|
+
readonly STAFF: number;
|
|
458
|
+
readonly PARTNER: number;
|
|
459
|
+
readonly HYPESQUAD: number;
|
|
460
|
+
readonly BUG_HUNTER_LEVEL_1: number;
|
|
461
|
+
readonly HYPESQUAD_ONLINE_HOUSE_1: number;
|
|
462
|
+
readonly HYPESQUAD_ONLINE_HOUSE_2: number;
|
|
463
|
+
readonly HYPESQUAD_ONLINE_HOUSE_3: number;
|
|
464
|
+
readonly PREMIUM_EARLY_SUPPORTER: number;
|
|
465
|
+
readonly TEAM_PSEUDO_USER: number;
|
|
466
|
+
readonly BUG_HUNTER_LEVEL_2: number;
|
|
467
|
+
readonly VERIFIED_BOT: number;
|
|
468
|
+
readonly VERIFIED_DEVELOPER: number;
|
|
469
|
+
readonly CERTIFIED_MODERATOR: number;
|
|
470
|
+
readonly BOT_HTTP_INTERACTIONS: number;
|
|
471
|
+
};
|
|
472
|
+
declare const PremiumType: {
|
|
473
|
+
readonly NONE: 0;
|
|
474
|
+
readonly NITRO_CLASSIC: 1;
|
|
475
|
+
readonly NITRO: 2;
|
|
476
|
+
readonly NITRO_BASIC: 3;
|
|
477
|
+
};
|
|
478
|
+
declare const VisibilityType: {
|
|
479
|
+
readonly NONE: 0;
|
|
480
|
+
readonly EVERYONE: 1;
|
|
481
|
+
};
|
|
482
|
+
|
|
483
|
+
interface Channel {
|
|
484
|
+
id: string;
|
|
485
|
+
type: number;
|
|
486
|
+
guildId?: string;
|
|
487
|
+
position?: number;
|
|
488
|
+
permissionOverwrites?: Overwrite[];
|
|
489
|
+
name?: string | null;
|
|
490
|
+
topic?: string | null;
|
|
491
|
+
nsfw?: boolean;
|
|
492
|
+
lastMessageId?: string | null;
|
|
493
|
+
bitrate?: number;
|
|
494
|
+
userLimit?: number;
|
|
495
|
+
rateLimitPerUser?: number;
|
|
496
|
+
recipients?: User[];
|
|
497
|
+
icon?: string | null;
|
|
498
|
+
ownerId?: string;
|
|
499
|
+
applicationId?: string;
|
|
500
|
+
managed?: boolean;
|
|
501
|
+
parentId?: string | null;
|
|
502
|
+
lastPinTimestamp?: number | null;
|
|
503
|
+
rtcRegion?: string | null;
|
|
504
|
+
videoQualityMode?: number;
|
|
505
|
+
messageCount?: number;
|
|
506
|
+
memberCount?: number;
|
|
507
|
+
threadMetadata?: ThreadMetadata;
|
|
508
|
+
member?: ThreadMember;
|
|
509
|
+
defaultAutoArchiveDuration?: number;
|
|
510
|
+
permissions?: string;
|
|
511
|
+
flags?: number;
|
|
512
|
+
totalMessageSent?: number;
|
|
513
|
+
availableTags?: ForumTag[];
|
|
514
|
+
appliedTags?: string[];
|
|
515
|
+
defaultReactionEmoji?: DefaultReaction | null;
|
|
516
|
+
defaultThreadRateLimitPerUser?: number;
|
|
517
|
+
defaultSortOrder?: number | null;
|
|
518
|
+
defaultForumLayout?: number;
|
|
519
|
+
}
|
|
520
|
+
interface Overwrite {
|
|
521
|
+
id: string;
|
|
522
|
+
type: number;
|
|
523
|
+
allow: string;
|
|
524
|
+
deny: string;
|
|
525
|
+
}
|
|
526
|
+
interface ThreadMetadata {
|
|
527
|
+
archived: boolean;
|
|
528
|
+
autoArchiveDuration: number;
|
|
529
|
+
archiveTimestamp: number;
|
|
530
|
+
locked: boolean;
|
|
531
|
+
invitable?: boolean;
|
|
532
|
+
createTimestamp?: number | null;
|
|
533
|
+
}
|
|
534
|
+
interface ThreadMember {
|
|
535
|
+
id?: string;
|
|
536
|
+
userId?: string;
|
|
537
|
+
joinTimestamp: number;
|
|
538
|
+
flags: number;
|
|
539
|
+
member?: Member;
|
|
540
|
+
}
|
|
541
|
+
interface DefaultReaction {
|
|
542
|
+
emojiId: string | null;
|
|
543
|
+
emojiName: string | null;
|
|
544
|
+
}
|
|
545
|
+
interface ForumTag {
|
|
546
|
+
id: string;
|
|
547
|
+
name: string;
|
|
548
|
+
moderated: boolean;
|
|
549
|
+
emojiId: string | null;
|
|
550
|
+
emojiName: string | null;
|
|
551
|
+
}
|
|
552
|
+
declare const ChannelType: {
|
|
553
|
+
readonly GUILD_TEXT: 0;
|
|
554
|
+
readonly DM: 1;
|
|
555
|
+
readonly GUILD_VOICE: 2;
|
|
556
|
+
readonly GROUP_DM: 3;
|
|
557
|
+
readonly GUILD_CATEGORY: 4;
|
|
558
|
+
readonly GUILD_ANNOUNCEMENT: 5;
|
|
559
|
+
readonly ANNOUNCEMENT_THREAD: 10;
|
|
560
|
+
readonly PUBLIC_THREAD: 11;
|
|
561
|
+
readonly PRIVATE_THREAD: 12;
|
|
562
|
+
readonly GUILD_STAGE_VOICE: 13;
|
|
563
|
+
readonly GUILD_DIRECTORY: 14;
|
|
564
|
+
readonly GUILD_FORUM: 15;
|
|
565
|
+
readonly GUILD_MEDIA: 16;
|
|
566
|
+
};
|
|
567
|
+
declare const VideoQualityMode: {
|
|
568
|
+
readonly AUTO: 1;
|
|
569
|
+
readonly FULL: 2;
|
|
570
|
+
};
|
|
571
|
+
declare const ChannelFlag: {
|
|
572
|
+
readonly PINNED: number;
|
|
573
|
+
readonly REQUIRE_TAG: number;
|
|
574
|
+
readonly HIDE_MEDIA_DOWNLOAD_OPTIONS: number;
|
|
575
|
+
};
|
|
576
|
+
declare const SortOrderType: {
|
|
577
|
+
readonly LATEST_ACTIVITY: 0;
|
|
578
|
+
readonly CREATION_DATE: 1;
|
|
579
|
+
};
|
|
580
|
+
declare const ForumLayoutType: {
|
|
581
|
+
readonly NOT_SET: 0;
|
|
582
|
+
readonly LIST_VIEW: 1;
|
|
583
|
+
readonly GALLERY_VIEW: 2;
|
|
584
|
+
};
|
|
585
|
+
|
|
586
|
+
declare const ComponentType: {
|
|
587
|
+
readonly ACTION_ROW: 1;
|
|
588
|
+
readonly BUTTON: 2;
|
|
589
|
+
readonly STRING_SELECT: 3;
|
|
590
|
+
readonly TEXT_INPUT: 4;
|
|
591
|
+
readonly USER_SELECT: 5;
|
|
592
|
+
readonly ROLE_SELECT: 6;
|
|
593
|
+
readonly MENTIONABLE_SELECT: 7;
|
|
594
|
+
readonly CHANNEL_SELECT: 8;
|
|
595
|
+
};
|
|
596
|
+
declare const ButtonStyle: {
|
|
597
|
+
readonly PRIMARY: 1;
|
|
598
|
+
readonly SECONDARY: 2;
|
|
599
|
+
readonly SUCCESS: 3;
|
|
600
|
+
readonly DANGER: 4;
|
|
601
|
+
readonly LINK: 5;
|
|
602
|
+
readonly PREMIUM: 6;
|
|
603
|
+
};
|
|
604
|
+
interface SelectOption {
|
|
605
|
+
label: string;
|
|
606
|
+
value: string;
|
|
607
|
+
description?: string;
|
|
608
|
+
emoji?: Partial<Emoji>;
|
|
609
|
+
default?: boolean;
|
|
610
|
+
}
|
|
611
|
+
interface MessageComponent {
|
|
612
|
+
type: number;
|
|
613
|
+
customId?: string;
|
|
614
|
+
disabled?: boolean;
|
|
615
|
+
style?: number;
|
|
616
|
+
label?: string;
|
|
617
|
+
emoji?: Partial<Emoji>;
|
|
618
|
+
url?: string;
|
|
619
|
+
options?: SelectOption[];
|
|
620
|
+
placeholder?: string;
|
|
621
|
+
minValues?: number;
|
|
622
|
+
maxValues?: number;
|
|
623
|
+
components?: MessageComponent[];
|
|
624
|
+
skuId?: string;
|
|
625
|
+
channelTypes?: number[];
|
|
626
|
+
}
|
|
627
|
+
|
|
628
|
+
declare const EntitlementType: {
|
|
629
|
+
readonly PURCHASE: 1;
|
|
630
|
+
readonly PREMIUM_SUBSCRIPTION: 2;
|
|
631
|
+
readonly DEVELOPER_GIFT: 3;
|
|
632
|
+
readonly TEST_MODE_PURCHASE: 4;
|
|
633
|
+
readonly FREE_PURCHASE: 5;
|
|
634
|
+
readonly USER_GIFT: 6;
|
|
635
|
+
readonly PREMIUM_PURCHASE: 7;
|
|
636
|
+
readonly APPLICATION_SUBSCRIPTION: 8;
|
|
637
|
+
};
|
|
638
|
+
interface Entitlement {
|
|
639
|
+
id: string;
|
|
640
|
+
skuId: string;
|
|
641
|
+
applicationId: string;
|
|
642
|
+
userId?: string;
|
|
643
|
+
type: number;
|
|
644
|
+
deleted: boolean;
|
|
645
|
+
startsAt?: number | null;
|
|
646
|
+
endsAt?: number | null;
|
|
647
|
+
guildId?: string;
|
|
648
|
+
consumed?: boolean;
|
|
649
|
+
}
|
|
650
|
+
|
|
651
|
+
interface ResolvedData {
|
|
652
|
+
users?: Record<string, User>;
|
|
653
|
+
members?: Record<string, Partial<Member>>;
|
|
654
|
+
roles?: Record<string, Role>;
|
|
655
|
+
channels?: Record<string, Partial<Channel>>;
|
|
656
|
+
messages?: Record<string, Partial<Message>>;
|
|
657
|
+
attachments?: Record<string, Attachment>;
|
|
658
|
+
}
|
|
659
|
+
interface ApplicationCommandInteractionDataOption {
|
|
660
|
+
name: string;
|
|
661
|
+
type: number;
|
|
662
|
+
value?: string | number | boolean;
|
|
663
|
+
options?: ApplicationCommandInteractionDataOption[];
|
|
664
|
+
focused?: boolean;
|
|
665
|
+
}
|
|
666
|
+
interface ApplicationCommandData {
|
|
667
|
+
id: string;
|
|
668
|
+
name: string;
|
|
669
|
+
type: number;
|
|
670
|
+
resolved?: ResolvedData;
|
|
671
|
+
options?: ApplicationCommandInteractionDataOption[];
|
|
672
|
+
guildId?: string;
|
|
673
|
+
targetId?: string;
|
|
674
|
+
}
|
|
675
|
+
interface MessageComponentData {
|
|
676
|
+
customId: string;
|
|
677
|
+
componentType: number;
|
|
678
|
+
values?: string[];
|
|
679
|
+
resolved?: ResolvedData;
|
|
680
|
+
}
|
|
681
|
+
interface ModalSubmitData {
|
|
682
|
+
customId: string;
|
|
683
|
+
components: MessageComponent[];
|
|
684
|
+
}
|
|
685
|
+
type InteractionData = ApplicationCommandData | MessageComponentData | ModalSubmitData;
|
|
686
|
+
interface Interaction {
|
|
687
|
+
id: string;
|
|
688
|
+
applicationId: string;
|
|
689
|
+
type: number;
|
|
690
|
+
data?: InteractionData;
|
|
691
|
+
guild?: Partial<Guild>;
|
|
692
|
+
guildId?: string;
|
|
693
|
+
channel?: Partial<Channel>;
|
|
694
|
+
channelId?: string;
|
|
695
|
+
member?: Member;
|
|
696
|
+
user?: User;
|
|
697
|
+
token: string;
|
|
698
|
+
version: number;
|
|
699
|
+
message?: Message;
|
|
700
|
+
appPermissions?: string;
|
|
701
|
+
locale?: string;
|
|
702
|
+
guildLocale?: string;
|
|
703
|
+
entitlements: Entitlement[];
|
|
704
|
+
authorizingIntegrationOwners: Record<string, string>;
|
|
705
|
+
context?: number;
|
|
706
|
+
}
|
|
707
|
+
interface MessageInteraction {
|
|
708
|
+
id: string;
|
|
709
|
+
type: number;
|
|
710
|
+
name: string;
|
|
711
|
+
user: User;
|
|
712
|
+
member?: Partial<Member>;
|
|
713
|
+
}
|
|
714
|
+
|
|
715
|
+
interface ChannelMention {
|
|
716
|
+
id: string;
|
|
717
|
+
guildId: string;
|
|
718
|
+
type: number;
|
|
719
|
+
name: string;
|
|
720
|
+
}
|
|
721
|
+
interface Attachment {
|
|
722
|
+
id: string;
|
|
723
|
+
filename: string;
|
|
724
|
+
title?: string;
|
|
725
|
+
description?: string;
|
|
726
|
+
contentType?: string;
|
|
727
|
+
size: number;
|
|
728
|
+
url: string;
|
|
729
|
+
proxyUrl: string;
|
|
730
|
+
height?: number | null;
|
|
731
|
+
width?: number | null;
|
|
732
|
+
placeholder?: string;
|
|
733
|
+
placeholderVersion?: number;
|
|
734
|
+
ephemeral?: boolean;
|
|
735
|
+
durationSecs?: number;
|
|
736
|
+
waveform?: string;
|
|
737
|
+
flags?: number;
|
|
738
|
+
clipParticipants?: User[];
|
|
739
|
+
clipCreatedAt?: number;
|
|
740
|
+
application?: Partial<Application>;
|
|
741
|
+
}
|
|
742
|
+
interface EmbedFooter {
|
|
743
|
+
text: string;
|
|
744
|
+
iconUrl?: string;
|
|
745
|
+
proxyIconUrl?: string;
|
|
746
|
+
}
|
|
747
|
+
interface EmbedImage {
|
|
748
|
+
url: string;
|
|
749
|
+
proxyUrl?: string;
|
|
750
|
+
height?: number;
|
|
751
|
+
width?: number;
|
|
752
|
+
contentType?: string;
|
|
753
|
+
placeholder?: string;
|
|
754
|
+
placeholderVersion?: number;
|
|
755
|
+
description?: string;
|
|
756
|
+
flags?: number;
|
|
757
|
+
}
|
|
758
|
+
interface EmbedVideo {
|
|
759
|
+
url?: string;
|
|
760
|
+
proxyUrl?: string;
|
|
761
|
+
height?: number;
|
|
762
|
+
width?: number;
|
|
763
|
+
contentType?: string;
|
|
764
|
+
placeholder?: string;
|
|
765
|
+
placeholderVersion?: number;
|
|
766
|
+
description?: string;
|
|
767
|
+
flags?: number;
|
|
768
|
+
}
|
|
769
|
+
interface EmbedProvider {
|
|
770
|
+
name?: string;
|
|
771
|
+
url?: string;
|
|
772
|
+
}
|
|
773
|
+
interface EmbedAuthor {
|
|
774
|
+
name: string;
|
|
775
|
+
url?: string;
|
|
776
|
+
iconUrl?: string;
|
|
777
|
+
proxyIconUrl?: string;
|
|
778
|
+
}
|
|
779
|
+
interface EmbedField {
|
|
780
|
+
name: string;
|
|
781
|
+
value: string;
|
|
782
|
+
inline?: boolean;
|
|
783
|
+
}
|
|
784
|
+
interface Embed {
|
|
785
|
+
title?: string;
|
|
786
|
+
type?: string;
|
|
787
|
+
description?: string;
|
|
788
|
+
url?: string;
|
|
789
|
+
timestamp?: number;
|
|
790
|
+
color?: number;
|
|
791
|
+
footer?: EmbedFooter;
|
|
792
|
+
image?: EmbedImage;
|
|
793
|
+
thumbnail?: EmbedImage;
|
|
794
|
+
video?: EmbedVideo;
|
|
795
|
+
provider?: EmbedProvider;
|
|
796
|
+
author?: EmbedAuthor;
|
|
797
|
+
fields?: EmbedField[];
|
|
798
|
+
flags?: number;
|
|
799
|
+
}
|
|
800
|
+
interface ReactionCountDetails {
|
|
801
|
+
burst: number;
|
|
802
|
+
normal: number;
|
|
803
|
+
}
|
|
804
|
+
interface Reaction {
|
|
805
|
+
count: number;
|
|
806
|
+
countDetails: ReactionCountDetails;
|
|
807
|
+
me: boolean;
|
|
808
|
+
meBurst: boolean;
|
|
809
|
+
emoji: Emoji;
|
|
810
|
+
burstColors: string[];
|
|
811
|
+
}
|
|
812
|
+
interface MessageActivity {
|
|
813
|
+
type: number;
|
|
814
|
+
partyId?: string;
|
|
815
|
+
}
|
|
816
|
+
interface MessageReference {
|
|
817
|
+
type?: number;
|
|
818
|
+
messageId?: string;
|
|
819
|
+
channelId?: string;
|
|
820
|
+
guildId?: string;
|
|
821
|
+
failIfNotExists?: boolean;
|
|
822
|
+
}
|
|
823
|
+
interface MessageInteractionMetadata {
|
|
824
|
+
id: string;
|
|
825
|
+
type: number;
|
|
826
|
+
user: User;
|
|
827
|
+
authorizingIntegrationOwners: Record<string, string>;
|
|
828
|
+
originalResponseMessageId?: string;
|
|
829
|
+
targetUser?: User;
|
|
830
|
+
targetMessageId?: string;
|
|
831
|
+
interactedMessageId?: string;
|
|
832
|
+
triggeringInteractionMetadata?: MessageInteractionMetadata;
|
|
833
|
+
}
|
|
834
|
+
interface RoleSubscriptionData {
|
|
835
|
+
roleSubscriptionListingId: string;
|
|
836
|
+
tierName: string;
|
|
837
|
+
totalMonthsSubscribed: number;
|
|
838
|
+
isRenewal: boolean;
|
|
839
|
+
}
|
|
840
|
+
interface MessageCall {
|
|
841
|
+
participants: string[];
|
|
842
|
+
endedTimestamp?: number | null;
|
|
843
|
+
}
|
|
844
|
+
interface SharedClientTheme {
|
|
845
|
+
colors: string[];
|
|
846
|
+
gradientAngle: number;
|
|
847
|
+
baseMix: number;
|
|
848
|
+
baseTheme?: number;
|
|
849
|
+
}
|
|
850
|
+
interface PollMedia {
|
|
851
|
+
text?: string;
|
|
852
|
+
emoji?: Partial<Emoji>;
|
|
853
|
+
}
|
|
854
|
+
interface PollAnswer {
|
|
855
|
+
answerId: number;
|
|
856
|
+
pollMedia: PollMedia;
|
|
857
|
+
}
|
|
858
|
+
interface PollAnswerCount {
|
|
859
|
+
id: number;
|
|
860
|
+
count: number;
|
|
861
|
+
meVoted: boolean;
|
|
862
|
+
}
|
|
863
|
+
interface PollResults {
|
|
864
|
+
isFinalized: boolean;
|
|
865
|
+
answerCounts: PollAnswerCount[];
|
|
866
|
+
}
|
|
867
|
+
interface Poll {
|
|
868
|
+
question: PollMedia;
|
|
869
|
+
answers: PollAnswer[];
|
|
870
|
+
expiry: number | null;
|
|
871
|
+
allowMultiselect: boolean;
|
|
872
|
+
layoutType: number;
|
|
873
|
+
results?: PollResults;
|
|
874
|
+
}
|
|
875
|
+
interface PollCreateRequest {
|
|
876
|
+
question: PollMedia;
|
|
877
|
+
answers: PollAnswer[];
|
|
878
|
+
duration?: number;
|
|
879
|
+
allowMultiselect?: boolean;
|
|
880
|
+
layoutType?: number;
|
|
881
|
+
}
|
|
882
|
+
interface MessageSnapshot {
|
|
883
|
+
message: Partial<Message>;
|
|
884
|
+
}
|
|
885
|
+
interface Message {
|
|
886
|
+
id: string;
|
|
887
|
+
channelId: string;
|
|
888
|
+
guildId?: string;
|
|
889
|
+
author: User;
|
|
890
|
+
member?: Member;
|
|
891
|
+
content: string;
|
|
892
|
+
url: string;
|
|
893
|
+
timestamp: number;
|
|
894
|
+
editedTimestamp: number | null;
|
|
895
|
+
tts: boolean;
|
|
896
|
+
mentionEveryone: boolean;
|
|
897
|
+
mentions: User[];
|
|
898
|
+
mentionRoles: string[];
|
|
899
|
+
mentionChannels?: ChannelMention[];
|
|
900
|
+
attachments: Attachment[];
|
|
901
|
+
embeds: Embed[];
|
|
902
|
+
reactions?: Reaction[];
|
|
903
|
+
nonce?: string | number;
|
|
904
|
+
pinned: boolean;
|
|
905
|
+
webhookId?: string;
|
|
906
|
+
type: number;
|
|
907
|
+
activity?: MessageActivity;
|
|
908
|
+
application?: Partial<Application>;
|
|
909
|
+
applicationId?: string;
|
|
910
|
+
flags?: number;
|
|
911
|
+
messageReference?: MessageReference;
|
|
912
|
+
messageSnapshots?: MessageSnapshot[];
|
|
913
|
+
referencedMessage?: Message | null;
|
|
914
|
+
interactionMetadata?: MessageInteractionMetadata;
|
|
915
|
+
interaction?: MessageInteraction;
|
|
916
|
+
thread?: Channel;
|
|
917
|
+
components?: MessageComponent[];
|
|
918
|
+
stickerItems?: StickerItem[];
|
|
919
|
+
stickers?: Sticker[];
|
|
920
|
+
position?: number;
|
|
921
|
+
roleSubscriptionData?: RoleSubscriptionData;
|
|
922
|
+
resolved?: ResolvedData;
|
|
923
|
+
poll?: Poll;
|
|
924
|
+
call?: MessageCall;
|
|
925
|
+
sharedClientTheme?: SharedClientTheme;
|
|
926
|
+
}
|
|
927
|
+
declare const MessageType: {
|
|
928
|
+
readonly DEFAULT: 0;
|
|
929
|
+
readonly RECIPIENT_ADD: 1;
|
|
930
|
+
readonly RECIPIENT_REMOVE: 2;
|
|
931
|
+
readonly CALL: 3;
|
|
932
|
+
readonly CHANNEL_NAME_CHANGE: 4;
|
|
933
|
+
readonly CHANNEL_ICON_CHANGE: 5;
|
|
934
|
+
readonly CHANNEL_PINNED_MESSAGE: 6;
|
|
935
|
+
readonly USER_JOIN: 7;
|
|
936
|
+
readonly GUILD_BOOST: 8;
|
|
937
|
+
readonly GUILD_BOOST_TIER_1: 9;
|
|
938
|
+
readonly GUILD_BOOST_TIER_2: 10;
|
|
939
|
+
readonly GUILD_BOOST_TIER_3: 11;
|
|
940
|
+
readonly CHANNEL_FOLLOW_ADD: 12;
|
|
941
|
+
readonly GUILD_DISCOVERY_DISQUALIFIED: 14;
|
|
942
|
+
readonly GUILD_DISCOVERY_REQUALIFIED: 15;
|
|
943
|
+
readonly GUILD_DISCOVERY_GRACE_PERIOD_INITIAL_WARNING: 16;
|
|
944
|
+
readonly GUILD_DISCOVERY_GRACE_PERIOD_FINAL_WARNING: 17;
|
|
945
|
+
readonly THREAD_CREATED: 18;
|
|
946
|
+
readonly REPLY: 19;
|
|
947
|
+
readonly CHAT_INPUT_COMMAND: 20;
|
|
948
|
+
readonly THREAD_STARTER_MESSAGE: 21;
|
|
949
|
+
readonly GUILD_INVITE_REMINDER: 22;
|
|
950
|
+
readonly CONTEXT_MENU_COMMAND: 23;
|
|
951
|
+
readonly AUTO_MODERATION_ACTION: 24;
|
|
952
|
+
readonly ROLE_SUBSCRIPTION_PURCHASE: 25;
|
|
953
|
+
readonly INTERACTION_PREMIUM_UPSELL: 26;
|
|
954
|
+
readonly STAGE_START: 27;
|
|
955
|
+
readonly STAGE_END: 28;
|
|
956
|
+
readonly STAGE_SPEAKER: 29;
|
|
957
|
+
readonly STAGE_TOPIC: 31;
|
|
958
|
+
readonly GUILD_APPLICATION_PREMIUM_SUBSCRIPTION: 32;
|
|
959
|
+
readonly GUILD_INCIDENT_ALERT_MODE_ENABLED: 36;
|
|
960
|
+
readonly GUILD_INCIDENT_ALERT_MODE_DISABLED: 37;
|
|
961
|
+
readonly GUILD_INCIDENT_REPORT_RAID: 38;
|
|
962
|
+
readonly GUILD_INCIDENT_REPORT_FALSE_ALARM: 39;
|
|
963
|
+
readonly PURCHASE_NOTIFICATION: 44;
|
|
964
|
+
readonly POLL_RESULT: 46;
|
|
965
|
+
};
|
|
966
|
+
declare const MessageActivityType: {
|
|
967
|
+
readonly JOIN: 1;
|
|
968
|
+
readonly SPECTATE: 2;
|
|
969
|
+
readonly LISTEN: 3;
|
|
970
|
+
readonly JOIN_REQUEST: 5;
|
|
971
|
+
};
|
|
972
|
+
declare const MessageFlag: {
|
|
973
|
+
readonly CROSSPOSTED: number;
|
|
974
|
+
readonly IS_CROSSPOST: number;
|
|
975
|
+
readonly SUPPRESS_EMBEDS: number;
|
|
976
|
+
readonly SOURCE_MESSAGE_DELETED: number;
|
|
977
|
+
readonly URGENT: number;
|
|
978
|
+
readonly HAS_THREAD: number;
|
|
979
|
+
readonly EPHEMERAL: number;
|
|
980
|
+
readonly LOADING: number;
|
|
981
|
+
readonly FAILED_TO_MENTION_SOME_ROLES_IN_THREAD: number;
|
|
982
|
+
readonly SUPPRESS_NOTIFICATIONS: number;
|
|
983
|
+
readonly IS_VOICE_MESSAGE: number;
|
|
984
|
+
readonly HAS_SNAPSHOT: number;
|
|
985
|
+
readonly IS_COMPONENTS_V2: number;
|
|
986
|
+
};
|
|
987
|
+
declare const MessageReferenceType: {
|
|
988
|
+
readonly DEFAULT: 0;
|
|
989
|
+
readonly FORWARD: 1;
|
|
990
|
+
};
|
|
991
|
+
declare const EmbedType: {
|
|
992
|
+
readonly RICH: "rich";
|
|
993
|
+
readonly IMAGE: "image";
|
|
994
|
+
readonly VIDEO: "video";
|
|
995
|
+
readonly GIFV: "gifv";
|
|
996
|
+
readonly ARTICLE: "article";
|
|
997
|
+
readonly LINK: "link";
|
|
998
|
+
readonly POLL_RESULT: "poll_result";
|
|
999
|
+
};
|
|
1000
|
+
declare const AttachmentFlag: {
|
|
1001
|
+
readonly IS_CLIP: number;
|
|
1002
|
+
readonly IS_THUMBNAIL: number;
|
|
1003
|
+
readonly IS_REMIX: number;
|
|
1004
|
+
readonly IS_SPOILER: number;
|
|
1005
|
+
readonly IS_ANIMATED: number;
|
|
1006
|
+
};
|
|
1007
|
+
|
|
1008
|
+
declare const GuildScheduledEventPrivacyLevel: {
|
|
1009
|
+
readonly GUILD_ONLY: 2;
|
|
1010
|
+
};
|
|
1011
|
+
declare const GuildScheduledEventStatus: {
|
|
1012
|
+
readonly SCHEDULED: 1;
|
|
1013
|
+
readonly ACTIVE: 2;
|
|
1014
|
+
readonly COMPLETED: 3;
|
|
1015
|
+
readonly CANCELED: 4;
|
|
1016
|
+
};
|
|
1017
|
+
declare const GuildScheduledEventEntityType: {
|
|
1018
|
+
readonly STAGE_INSTANCE: 1;
|
|
1019
|
+
readonly VOICE: 2;
|
|
1020
|
+
readonly EXTERNAL: 3;
|
|
1021
|
+
};
|
|
1022
|
+
interface GuildScheduledEventEntityMetadata {
|
|
1023
|
+
location?: string;
|
|
1024
|
+
}
|
|
1025
|
+
interface GuildScheduledEvent {
|
|
1026
|
+
id: string;
|
|
1027
|
+
guildId: string;
|
|
1028
|
+
channelId: string | null;
|
|
1029
|
+
creatorId?: string | null;
|
|
1030
|
+
name: string;
|
|
1031
|
+
description?: string | null;
|
|
1032
|
+
scheduledStartTime: number;
|
|
1033
|
+
scheduledEndTime: number | null;
|
|
1034
|
+
privacyLevel: number;
|
|
1035
|
+
status: number;
|
|
1036
|
+
entityType: number;
|
|
1037
|
+
entityId: string | null;
|
|
1038
|
+
entityMetadata: GuildScheduledEventEntityMetadata | null;
|
|
1039
|
+
creator?: User;
|
|
1040
|
+
userCount?: number;
|
|
1041
|
+
image?: string | null;
|
|
1042
|
+
}
|
|
1043
|
+
|
|
1044
|
+
declare const WebhookType: {
|
|
1045
|
+
readonly INCOMING: 1;
|
|
1046
|
+
readonly CHANNEL_FOLLOWER: 2;
|
|
1047
|
+
readonly APPLICATION: 3;
|
|
1048
|
+
};
|
|
1049
|
+
interface Webhook {
|
|
1050
|
+
id: string;
|
|
1051
|
+
type: number;
|
|
1052
|
+
guildId?: string;
|
|
1053
|
+
channelId?: string | null;
|
|
1054
|
+
user?: User;
|
|
1055
|
+
name: string | null;
|
|
1056
|
+
avatar: string | null;
|
|
1057
|
+
token?: string;
|
|
1058
|
+
applicationId: string | null;
|
|
1059
|
+
sourceGuild?: Partial<Guild>;
|
|
1060
|
+
sourceChannel?: Partial<Channel>;
|
|
1061
|
+
url?: string;
|
|
1062
|
+
}
|
|
1063
|
+
|
|
1064
|
+
declare const IntentBits: {
|
|
1065
|
+
readonly Guilds: number;
|
|
1066
|
+
readonly GuildMembers: number;
|
|
1067
|
+
readonly GuildModeration: number;
|
|
1068
|
+
readonly GuildEmojisAndStickers: number;
|
|
1069
|
+
readonly GuildIntegrations: number;
|
|
1070
|
+
readonly GuildWebhooks: number;
|
|
1071
|
+
readonly GuildInvites: number;
|
|
1072
|
+
readonly GuildVoiceStates: number;
|
|
1073
|
+
readonly GuildPresences: number;
|
|
1074
|
+
readonly GuildMessages: number;
|
|
1075
|
+
readonly GuildMessageReactions: number;
|
|
1076
|
+
readonly GuildMessageTyping: number;
|
|
1077
|
+
readonly DirectMessages: number;
|
|
1078
|
+
readonly DirectMessageReactions: number;
|
|
1079
|
+
readonly DirectMessageTyping: number;
|
|
1080
|
+
readonly MessageContent: number;
|
|
1081
|
+
readonly GuildScheduledEvents: number;
|
|
1082
|
+
readonly AutoModerationConfiguration: number;
|
|
1083
|
+
readonly AutoModerationExecution: number;
|
|
1084
|
+
readonly GuildMessagePolls: number;
|
|
1085
|
+
readonly DirectMessagePolls: number;
|
|
1086
|
+
};
|
|
1087
|
+
declare const Intents: {
|
|
1088
|
+
readonly Moderation: readonly [number, number, number];
|
|
1089
|
+
readonly Guilds: number;
|
|
1090
|
+
readonly GuildMembers: number;
|
|
1091
|
+
readonly GuildModeration: number;
|
|
1092
|
+
readonly GuildEmojisAndStickers: number;
|
|
1093
|
+
readonly GuildIntegrations: number;
|
|
1094
|
+
readonly GuildWebhooks: number;
|
|
1095
|
+
readonly GuildInvites: number;
|
|
1096
|
+
readonly GuildVoiceStates: number;
|
|
1097
|
+
readonly GuildPresences: number;
|
|
1098
|
+
readonly GuildMessages: number;
|
|
1099
|
+
readonly GuildMessageReactions: number;
|
|
1100
|
+
readonly GuildMessageTyping: number;
|
|
1101
|
+
readonly DirectMessages: number;
|
|
1102
|
+
readonly DirectMessageReactions: number;
|
|
1103
|
+
readonly DirectMessageTyping: number;
|
|
1104
|
+
readonly MessageContent: number;
|
|
1105
|
+
readonly GuildScheduledEvents: number;
|
|
1106
|
+
readonly AutoModerationConfiguration: number;
|
|
1107
|
+
readonly AutoModerationExecution: number;
|
|
1108
|
+
readonly GuildMessagePolls: number;
|
|
1109
|
+
readonly DirectMessagePolls: number;
|
|
1110
|
+
};
|
|
1111
|
+
type IntentString = keyof typeof IntentBits;
|
|
1112
|
+
type IntentResolvable = IntentString | number | IntentResolvable[] | readonly IntentResolvable[];
|
|
1113
|
+
declare enum DISCORD_GATEWAY_OPCODES {
|
|
1114
|
+
DISPATCH = 0,
|
|
1115
|
+
HEARTBEAT = 1,
|
|
1116
|
+
IDENTIFY = 2,
|
|
1117
|
+
PRESENCE_UPDATE = 3,
|
|
1118
|
+
VOICE_STATE_UPDATE = 4,
|
|
1119
|
+
RESUME = 6,
|
|
1120
|
+
RECONNECT = 7,
|
|
1121
|
+
REQUEST_GUILD_MEMBERS = 8,
|
|
1122
|
+
INVALID_SESSION = 9,
|
|
1123
|
+
HELLO = 10,
|
|
1124
|
+
HEARTBEAT_ACK = 11,
|
|
1125
|
+
REQUEST_SOUNDBOARD_SOUNDS = 31,
|
|
1126
|
+
REQUEST_CHANNEL_INFO = 43
|
|
1127
|
+
}
|
|
1128
|
+
declare const DISCORD_PERMISSIONS: {
|
|
1129
|
+
readonly CREATE_INSTANT_INVITE: bigint;
|
|
1130
|
+
readonly KICK_MEMBERS: bigint;
|
|
1131
|
+
readonly BAN_MEMBERS: bigint;
|
|
1132
|
+
readonly ADMINISTRATOR: bigint;
|
|
1133
|
+
readonly MANAGE_CHANNELS: bigint;
|
|
1134
|
+
readonly MANAGE_GUILD: bigint;
|
|
1135
|
+
readonly ADD_REACTIONS: bigint;
|
|
1136
|
+
readonly VIEW_AUDIT_LOG: bigint;
|
|
1137
|
+
readonly PRIORITY_SPEAKER: bigint;
|
|
1138
|
+
readonly STREAM: bigint;
|
|
1139
|
+
readonly VIEW_CHANNEL: bigint;
|
|
1140
|
+
readonly SEND_MESSAGES: bigint;
|
|
1141
|
+
readonly SEND_TTS_MESSAGES: bigint;
|
|
1142
|
+
readonly MANAGE_MESSAGES: bigint;
|
|
1143
|
+
readonly EMBED_LINKS: bigint;
|
|
1144
|
+
readonly ATTACH_FILES: bigint;
|
|
1145
|
+
readonly READ_MESSAGE_HISTORY: bigint;
|
|
1146
|
+
readonly MENTION_EVERYONE: bigint;
|
|
1147
|
+
readonly USE_EXTERNAL_EMOJIS: bigint;
|
|
1148
|
+
readonly VIEW_GUILD_INSIGHTS: bigint;
|
|
1149
|
+
readonly CONNECT: bigint;
|
|
1150
|
+
readonly SPEAK: bigint;
|
|
1151
|
+
readonly MUTE_MEMBERS: bigint;
|
|
1152
|
+
readonly DEAFEN_MEMBERS: bigint;
|
|
1153
|
+
readonly MOVE_MEMBERS: bigint;
|
|
1154
|
+
readonly USE_VAD: bigint;
|
|
1155
|
+
readonly CHANGE_NICKNAME: bigint;
|
|
1156
|
+
readonly MANAGE_NICKNAMES: bigint;
|
|
1157
|
+
readonly MANAGE_ROLES: bigint;
|
|
1158
|
+
readonly MANAGE_WEBHOOKS: bigint;
|
|
1159
|
+
readonly MANAGE_GUILD_EXPRESSIONS: bigint;
|
|
1160
|
+
readonly USE_APPLICATION_COMMANDS: bigint;
|
|
1161
|
+
readonly REQUEST_TO_SPEAK: bigint;
|
|
1162
|
+
readonly MANAGE_EVENTS: bigint;
|
|
1163
|
+
readonly MANAGE_THREADS: bigint;
|
|
1164
|
+
readonly CREATE_PUBLIC_THREADS: bigint;
|
|
1165
|
+
readonly CREATE_PRIVATE_THREADS: bigint;
|
|
1166
|
+
readonly USE_EXTERNAL_STICKERS: bigint;
|
|
1167
|
+
readonly SEND_MESSAGES_IN_THREADS: bigint;
|
|
1168
|
+
readonly USE_EMBEDDED_ACTIVITIES: bigint;
|
|
1169
|
+
readonly MODERATE_MEMBERS: bigint;
|
|
1170
|
+
readonly VIEW_CREATOR_MONETIZATION_ANALYTICS: bigint;
|
|
1171
|
+
readonly USE_SOUNDBOARD: bigint;
|
|
1172
|
+
readonly CREATE_GUILD_EXPRESSIONS: bigint;
|
|
1173
|
+
readonly CREATE_EVENTS: bigint;
|
|
1174
|
+
readonly USE_EXTERNAL_SOUNDS: bigint;
|
|
1175
|
+
readonly SEND_VOICE_MESSAGES: bigint;
|
|
1176
|
+
readonly SET_VOICE_CHANNEL_STATUS: bigint;
|
|
1177
|
+
readonly SEND_POLLS: bigint;
|
|
1178
|
+
readonly USE_EXTERNAL_APPS: bigint;
|
|
1179
|
+
readonly PIN_MESSAGES: bigint;
|
|
1180
|
+
readonly BYPASS_SLOWMODE: bigint;
|
|
1181
|
+
};
|
|
1182
|
+
declare const AUDIT_LOG_EVENT_TYPES: {
|
|
1183
|
+
readonly GUILD_UPDATE: 1;
|
|
1184
|
+
readonly CHANNEL_CREATE: 10;
|
|
1185
|
+
readonly CHANNEL_UPDATE: 11;
|
|
1186
|
+
readonly CHANNEL_DELETE: 12;
|
|
1187
|
+
readonly CHANNEL_OVERWRITE_CREATE: 13;
|
|
1188
|
+
readonly CHANNEL_OVERWRITE_UPDATE: 14;
|
|
1189
|
+
readonly CHANNEL_OVERWRITE_DELETE: 15;
|
|
1190
|
+
readonly MEMBER_KICK: 20;
|
|
1191
|
+
readonly MEMBER_PRUNE: 21;
|
|
1192
|
+
readonly MEMBER_BAN_ADD: 22;
|
|
1193
|
+
readonly MEMBER_BAN_REMOVE: 23;
|
|
1194
|
+
readonly MEMBER_UPDATE: 24;
|
|
1195
|
+
readonly MEMBER_ROLE_UPDATE: 25;
|
|
1196
|
+
readonly MEMBER_MOVE: 26;
|
|
1197
|
+
readonly MEMBER_DISCONNECT: 27;
|
|
1198
|
+
readonly BOT_ADD: 28;
|
|
1199
|
+
readonly ROLE_CREATE: 30;
|
|
1200
|
+
readonly ROLE_UPDATE: 31;
|
|
1201
|
+
readonly ROLE_DELETE: 32;
|
|
1202
|
+
readonly INVITE_CREATE: 40;
|
|
1203
|
+
readonly INVITE_UPDATE: 41;
|
|
1204
|
+
readonly INVITE_DELETE: 42;
|
|
1205
|
+
readonly WEBHOOK_CREATE: 50;
|
|
1206
|
+
readonly WEBHOOK_UPDATE: 51;
|
|
1207
|
+
readonly WEBHOOK_DELETE: 52;
|
|
1208
|
+
readonly EMOJI_CREATE: 60;
|
|
1209
|
+
readonly EMOJI_UPDATE: 61;
|
|
1210
|
+
readonly EMOJI_DELETE: 62;
|
|
1211
|
+
readonly MESSAGE_DELETE: 72;
|
|
1212
|
+
readonly MESSAGE_BULK_DELETE: 73;
|
|
1213
|
+
readonly MESSAGE_PIN: 74;
|
|
1214
|
+
readonly MESSAGE_UNPIN: 75;
|
|
1215
|
+
readonly INTEGRATION_CREATE: 80;
|
|
1216
|
+
readonly INTEGRATION_UPDATE: 81;
|
|
1217
|
+
readonly INTEGRATION_DELETE: 82;
|
|
1218
|
+
readonly STAGE_INSTANCE_CREATE: 83;
|
|
1219
|
+
readonly STAGE_INSTANCE_UPDATE: 84;
|
|
1220
|
+
readonly STAGE_INSTANCE_DELETE: 85;
|
|
1221
|
+
readonly STICKER_CREATE: 90;
|
|
1222
|
+
readonly STICKER_UPDATE: 91;
|
|
1223
|
+
readonly STICKER_DELETE: 92;
|
|
1224
|
+
readonly GUILD_SCHEDULED_EVENT_CREATE: 100;
|
|
1225
|
+
readonly GUILD_SCHEDULED_EVENT_UPDATE: 101;
|
|
1226
|
+
readonly GUILD_SCHEDULED_EVENT_DELETE: 102;
|
|
1227
|
+
readonly THREAD_CREATE: 110;
|
|
1228
|
+
readonly THREAD_UPDATE: 111;
|
|
1229
|
+
readonly THREAD_DELETE: 112;
|
|
1230
|
+
readonly APPLICATION_COMMAND_PERMISSION_UPDATE: 121;
|
|
1231
|
+
readonly SOUNDBOARD_SOUND_CREATE: 130;
|
|
1232
|
+
readonly SOUNDBOARD_SOUND_UPDATE: 131;
|
|
1233
|
+
readonly SOUNDBOARD_SOUND_DELETE: 132;
|
|
1234
|
+
readonly AUTO_MODERATION_RULE_CREATE: 140;
|
|
1235
|
+
readonly AUTO_MODERATION_RULE_UPDATE: 141;
|
|
1236
|
+
readonly AUTO_MODERATION_RULE_DELETE: 142;
|
|
1237
|
+
readonly AUTO_MODERATION_BLOCK_MESSAGE: 143;
|
|
1238
|
+
readonly AUTO_MODERATION_FLAG_TO_CHANNEL: 144;
|
|
1239
|
+
readonly AUTO_MODERATION_USER_COMMUNICATION_DISABLED: 145;
|
|
1240
|
+
readonly AUTO_MODERATION_QUARANTINE_USER: 146;
|
|
1241
|
+
readonly CREATOR_MONETIZATION_REQUEST_CREATED: 150;
|
|
1242
|
+
readonly CREATOR_MONETIZATION_TERMS_ACCEPTED: 151;
|
|
1243
|
+
readonly ONBOARDING_PROMPT_CREATE: 163;
|
|
1244
|
+
readonly ONBOARDING_PROMPT_UPDATE: 164;
|
|
1245
|
+
readonly ONBOARDING_PROMPT_DELETE: 165;
|
|
1246
|
+
readonly ONBOARDING_CREATE: 166;
|
|
1247
|
+
readonly ONBOARDING_UPDATE: 167;
|
|
1248
|
+
readonly HOME_SETTINGS_CREATE: 190;
|
|
1249
|
+
readonly HOME_SETTINGS_UPDATE: 191;
|
|
1250
|
+
readonly VOICE_CHANNEL_STATUS_UPDATE: 192;
|
|
1251
|
+
readonly VOICE_CHANNEL_STATUS_DELETE: 193;
|
|
1252
|
+
};
|
|
1253
|
+
declare enum Activity {
|
|
1254
|
+
PLAYING = 0,
|
|
1255
|
+
STREAMING = 1,
|
|
1256
|
+
LISTENING = 2,
|
|
1257
|
+
WATCHING = 3,
|
|
1258
|
+
CUSTOM = 4,
|
|
1259
|
+
COMPETING = 5
|
|
1260
|
+
}
|
|
1261
|
+
|
|
1262
|
+
declare const AutoModerationEventType: {
|
|
1263
|
+
readonly MESSAGE_SEND: 1;
|
|
1264
|
+
readonly MEMBER_UPDATE: 2;
|
|
1265
|
+
};
|
|
1266
|
+
declare const AutoModerationTriggerType: {
|
|
1267
|
+
readonly KEYWORD: 1;
|
|
1268
|
+
readonly SPAM: 3;
|
|
1269
|
+
readonly KEYWORD_PRESET: 4;
|
|
1270
|
+
readonly MENTION_SPAM: 5;
|
|
1271
|
+
readonly MEMBER_PROFILE: 6;
|
|
1272
|
+
};
|
|
1273
|
+
declare const AutoModerationKeywordPresetType: {
|
|
1274
|
+
readonly PROFANITY: 1;
|
|
1275
|
+
readonly SEXUAL_CONTENT: 2;
|
|
1276
|
+
readonly SLURS: 3;
|
|
1277
|
+
};
|
|
1278
|
+
declare const AutoModerationActionType: {
|
|
1279
|
+
readonly BLOCK_MESSAGE: 1;
|
|
1280
|
+
readonly SEND_ALERT_MESSAGE: 2;
|
|
1281
|
+
readonly TIMEOUT: 3;
|
|
1282
|
+
readonly BLOCK_MEMBER_INTERACTION: 4;
|
|
1283
|
+
};
|
|
1284
|
+
interface AutoModerationTriggerMetadata {
|
|
1285
|
+
keywordFilter?: string[];
|
|
1286
|
+
regexPatterns?: string[];
|
|
1287
|
+
presets?: number[];
|
|
1288
|
+
allowList?: string[];
|
|
1289
|
+
mentionTotalLimit?: number;
|
|
1290
|
+
mentionRaidProtectionEnabled?: boolean;
|
|
1291
|
+
}
|
|
1292
|
+
interface AutoModerationActionMetadata {
|
|
1293
|
+
channelId?: string;
|
|
1294
|
+
durationSeconds?: number;
|
|
1295
|
+
customMessage?: string;
|
|
1296
|
+
}
|
|
1297
|
+
interface AutoModerationAction {
|
|
1298
|
+
type: number;
|
|
1299
|
+
metadata?: AutoModerationActionMetadata;
|
|
1300
|
+
}
|
|
1301
|
+
interface AutoModerationRule {
|
|
1302
|
+
id: string;
|
|
1303
|
+
guildId: string;
|
|
1304
|
+
name: string;
|
|
1305
|
+
creatorId: string;
|
|
1306
|
+
eventType: number;
|
|
1307
|
+
triggerType: number;
|
|
1308
|
+
triggerMetadata: AutoModerationTriggerMetadata;
|
|
1309
|
+
actions: AutoModerationAction[];
|
|
1310
|
+
enabled: boolean;
|
|
1311
|
+
exemptRoles: string[];
|
|
1312
|
+
exemptChannels: string[];
|
|
1313
|
+
}
|
|
1314
|
+
|
|
1315
|
+
interface AuditLogChange {
|
|
1316
|
+
newValue?: unknown;
|
|
1317
|
+
oldValue?: unknown;
|
|
1318
|
+
key: string;
|
|
1319
|
+
}
|
|
1320
|
+
interface OptionalAuditEntryInfo {
|
|
1321
|
+
applicationId?: string;
|
|
1322
|
+
autoModerationRuleName?: string;
|
|
1323
|
+
autoModerationRuleTriggerType?: string;
|
|
1324
|
+
channelId?: string;
|
|
1325
|
+
count?: string;
|
|
1326
|
+
deleteMemberDays?: string;
|
|
1327
|
+
id?: string;
|
|
1328
|
+
membersRemoved?: string;
|
|
1329
|
+
messageId?: string;
|
|
1330
|
+
roleName?: string;
|
|
1331
|
+
type?: string;
|
|
1332
|
+
integrationType?: string;
|
|
1333
|
+
status?: string;
|
|
1334
|
+
}
|
|
1335
|
+
interface AuditLogEntry {
|
|
1336
|
+
targetId: string | null;
|
|
1337
|
+
changes?: AuditLogChange[];
|
|
1338
|
+
userId: string | null;
|
|
1339
|
+
id: string;
|
|
1340
|
+
actionType: (typeof AUDIT_LOG_EVENT_TYPES)[keyof typeof AUDIT_LOG_EVENT_TYPES];
|
|
1341
|
+
options?: OptionalAuditEntryInfo;
|
|
1342
|
+
reason?: string;
|
|
1343
|
+
}
|
|
1344
|
+
interface AuditLog {
|
|
1345
|
+
applicationCommands: Partial<ApplicationCommand>[];
|
|
1346
|
+
auditLogEntries: AuditLogEntry[];
|
|
1347
|
+
autoModerationRules: AutoModerationRule[];
|
|
1348
|
+
guildScheduledEvents: GuildScheduledEvent[];
|
|
1349
|
+
integrations: Partial<Integration>[];
|
|
1350
|
+
threads: Channel[];
|
|
1351
|
+
users: User[];
|
|
1352
|
+
webhooks: Webhook[];
|
|
1353
|
+
}
|
|
1354
|
+
|
|
1355
|
+
declare const InviteType: {
|
|
1356
|
+
readonly GUILD: 0;
|
|
1357
|
+
readonly GROUP_DM: 1;
|
|
1358
|
+
readonly FRIEND: 2;
|
|
1359
|
+
};
|
|
1360
|
+
declare const InviteTargetType: {
|
|
1361
|
+
readonly STREAM: 1;
|
|
1362
|
+
readonly EMBEDDED_APPLICATION: 2;
|
|
1363
|
+
};
|
|
1364
|
+
declare const GuildInviteFlag: {
|
|
1365
|
+
readonly IS_GUEST_INVITE: number;
|
|
1366
|
+
};
|
|
1367
|
+
interface Invite {
|
|
1368
|
+
type: number;
|
|
1369
|
+
code: string;
|
|
1370
|
+
guild?: Partial<Guild>;
|
|
1371
|
+
channel: Partial<Channel> | null;
|
|
1372
|
+
inviter?: User;
|
|
1373
|
+
targetType?: number;
|
|
1374
|
+
targetUser?: User;
|
|
1375
|
+
targetApplication?: Partial<Application>;
|
|
1376
|
+
approximatePresenceCount?: number;
|
|
1377
|
+
approximateMemberCount?: number;
|
|
1378
|
+
expiresAt: number | null;
|
|
1379
|
+
guildScheduledEvent?: GuildScheduledEvent;
|
|
1380
|
+
flags?: number;
|
|
1381
|
+
roles?: Partial<{
|
|
1382
|
+
id: string;
|
|
1383
|
+
name: string;
|
|
1384
|
+
position: number;
|
|
1385
|
+
color: number;
|
|
1386
|
+
icon: string | null;
|
|
1387
|
+
unicodeEmoji: string | null;
|
|
1388
|
+
}>[];
|
|
1389
|
+
}
|
|
1390
|
+
interface InviteMetadata {
|
|
1391
|
+
uses: number;
|
|
1392
|
+
maxUses: number;
|
|
1393
|
+
maxAge: number;
|
|
1394
|
+
temporary: boolean;
|
|
1395
|
+
createdAt: number;
|
|
1396
|
+
}
|
|
1397
|
+
interface InviteStageInstance {
|
|
1398
|
+
members: Partial<Member>[];
|
|
1399
|
+
participantCount: number;
|
|
1400
|
+
speakerCount: number;
|
|
1401
|
+
topic: string;
|
|
1402
|
+
}
|
|
1403
|
+
|
|
1404
|
+
declare const LobbyMemberFlag: {
|
|
1405
|
+
readonly CAN_LINK_LOBBY: number;
|
|
1406
|
+
};
|
|
1407
|
+
interface LobbyMember {
|
|
1408
|
+
id: string;
|
|
1409
|
+
metadata?: Record<string, string> | null;
|
|
1410
|
+
flags?: number;
|
|
1411
|
+
}
|
|
1412
|
+
interface Lobby {
|
|
1413
|
+
id: string;
|
|
1414
|
+
applicationId: string;
|
|
1415
|
+
metadata: Record<string, string> | null;
|
|
1416
|
+
members: LobbyMember[];
|
|
1417
|
+
linkedChannel?: Channel;
|
|
1418
|
+
}
|
|
1419
|
+
|
|
1420
|
+
declare const SkuType: {
|
|
1421
|
+
readonly DURABLE: 2;
|
|
1422
|
+
readonly CONSUMABLE: 3;
|
|
1423
|
+
readonly SUBSCRIPTION: 5;
|
|
1424
|
+
readonly SUBSCRIPTION_GROUP: 6;
|
|
1425
|
+
};
|
|
1426
|
+
declare const SkuFlag: {
|
|
1427
|
+
readonly AVAILABLE: number;
|
|
1428
|
+
readonly GUILD_SUBSCRIPTION: number;
|
|
1429
|
+
readonly USER_SUBSCRIPTION: number;
|
|
1430
|
+
};
|
|
1431
|
+
interface Sku {
|
|
1432
|
+
id: string;
|
|
1433
|
+
type: number;
|
|
1434
|
+
applicationId: string;
|
|
1435
|
+
name: string;
|
|
1436
|
+
slug: string;
|
|
1437
|
+
flags: number;
|
|
1438
|
+
}
|
|
1439
|
+
|
|
1440
|
+
interface SoundboardSound {
|
|
1441
|
+
name: string;
|
|
1442
|
+
soundId: string;
|
|
1443
|
+
volume: number;
|
|
1444
|
+
emojiId: string | null;
|
|
1445
|
+
emojiName: string | null;
|
|
1446
|
+
guildId?: string;
|
|
1447
|
+
available: boolean;
|
|
1448
|
+
user?: User;
|
|
1449
|
+
}
|
|
1450
|
+
|
|
1451
|
+
declare const StagePrivacyLevel: {
|
|
1452
|
+
readonly PUBLIC: 1;
|
|
1453
|
+
readonly GUILD_ONLY: 2;
|
|
1454
|
+
};
|
|
1455
|
+
interface StageInstance {
|
|
1456
|
+
id: string;
|
|
1457
|
+
guildId: string;
|
|
1458
|
+
channelId: string;
|
|
1459
|
+
topic: string;
|
|
1460
|
+
privacyLevel: number;
|
|
1461
|
+
discoverableDisabled: boolean;
|
|
1462
|
+
guildScheduledEventId: string | null;
|
|
1463
|
+
}
|
|
1464
|
+
|
|
1465
|
+
declare const SubscriptionStatus: {
|
|
1466
|
+
readonly ACTIVE: 0;
|
|
1467
|
+
readonly ENDING: 1;
|
|
1468
|
+
readonly INACTIVE: 2;
|
|
1469
|
+
};
|
|
1470
|
+
interface Subscription {
|
|
1471
|
+
id: string;
|
|
1472
|
+
userId: string;
|
|
1473
|
+
skuIds: string[];
|
|
1474
|
+
entitlementIds: string[];
|
|
1475
|
+
renewalSkuIds: string[] | null;
|
|
1476
|
+
currentPeriodStart: number;
|
|
1477
|
+
currentPeriodEnd: number;
|
|
1478
|
+
status: number;
|
|
1479
|
+
canceledAt: number | null;
|
|
1480
|
+
country?: string;
|
|
1481
|
+
}
|
|
1482
|
+
|
|
1483
|
+
interface GuildTemplate {
|
|
1484
|
+
code: string;
|
|
1485
|
+
name: string;
|
|
1486
|
+
description: string | null;
|
|
1487
|
+
usageCount: number;
|
|
1488
|
+
creatorId: string;
|
|
1489
|
+
creator: User;
|
|
1490
|
+
createdAt: number;
|
|
1491
|
+
updatedAt: number;
|
|
1492
|
+
sourceGuildId: string;
|
|
1493
|
+
serializedSourceGuild: Partial<Guild>;
|
|
1494
|
+
isDirty: boolean | null;
|
|
1495
|
+
}
|
|
1496
|
+
|
|
1497
|
+
interface Voice {
|
|
1498
|
+
guildId?: string;
|
|
1499
|
+
channelId: string;
|
|
1500
|
+
userId: string;
|
|
1501
|
+
member?: Member;
|
|
1502
|
+
sessionId: string;
|
|
1503
|
+
deaf: boolean;
|
|
1504
|
+
mute: boolean;
|
|
1505
|
+
selfDeaf: boolean;
|
|
1506
|
+
selfMute: boolean;
|
|
1507
|
+
selfStream: boolean;
|
|
1508
|
+
selfVideo: boolean;
|
|
1509
|
+
suppress: boolean;
|
|
1510
|
+
requestToSpeakTimestamp: number | null;
|
|
1511
|
+
}
|
|
1512
|
+
declare const CHAMELEON_SELF_MAP: {
|
|
1513
|
+
readonly selfMute: "userMuted";
|
|
1514
|
+
readonly selfDeaf: "userDeafened";
|
|
1515
|
+
readonly selfStream: "userStreaming";
|
|
1516
|
+
readonly selfVideo: "userVideo";
|
|
1517
|
+
};
|
|
1518
|
+
type ChameleonSelfKey = typeof CHAMELEON_SELF_MAP[keyof typeof CHAMELEON_SELF_MAP];
|
|
1519
|
+
|
|
1520
|
+
/**
|
|
1521
|
+
* Chameleon's internal store structure,
|
|
1522
|
+
* acts as an least recently used cache to optimize memory usage
|
|
1523
|
+
* it's named Tongue because a chameleon catches things with its tongue, you get it right? Right??? RIGHT?!?!?
|
|
1524
|
+
*/
|
|
1525
|
+
declare class Tongue<K, V> {
|
|
1526
|
+
private map;
|
|
1527
|
+
private max;
|
|
1528
|
+
constructor(maxSize?: number);
|
|
1529
|
+
get(key: K): V | undefined;
|
|
1530
|
+
set(key: K, val: V): this;
|
|
1531
|
+
has(key: K): boolean;
|
|
1532
|
+
delete(key: K): boolean;
|
|
1533
|
+
clear(): void;
|
|
1534
|
+
get size(): number;
|
|
1535
|
+
values(): IterableIterator<V>;
|
|
1536
|
+
keys(): IterableIterator<K>;
|
|
1537
|
+
}
|
|
1538
|
+
|
|
1539
|
+
interface StoreOptions {
|
|
1540
|
+
messages?: number;
|
|
1541
|
+
users?: number;
|
|
1542
|
+
members?: number;
|
|
1543
|
+
guilds?: number;
|
|
1544
|
+
roles?: number;
|
|
1545
|
+
channels?: number;
|
|
1546
|
+
emojis?: number;
|
|
1547
|
+
stickers?: number;
|
|
1548
|
+
stageInstances?: number;
|
|
1549
|
+
scheduledEvents?: number;
|
|
1550
|
+
autoModRules?: number;
|
|
1551
|
+
integrations?: number;
|
|
1552
|
+
}
|
|
1553
|
+
declare class TongueStore {
|
|
1554
|
+
guilds: Tongue<string, Guild>;
|
|
1555
|
+
roles: Tongue<string, Role>;
|
|
1556
|
+
channels: Tongue<string, Channel>;
|
|
1557
|
+
users: Tongue<string, User>;
|
|
1558
|
+
members: Tongue<string, Member>;
|
|
1559
|
+
messages: Tongue<string, Message>;
|
|
1560
|
+
emojis: Tongue<string, Emoji>;
|
|
1561
|
+
stickers: Tongue<string, Sticker>;
|
|
1562
|
+
stageInstances: Tongue<string, StageInstance>;
|
|
1563
|
+
scheduledEvents: Tongue<string, GuildScheduledEvent>;
|
|
1564
|
+
autoModRules: Tongue<string, AutoModerationRule>;
|
|
1565
|
+
integrations: Tongue<string, Integration>;
|
|
1566
|
+
constructor(options?: StoreOptions);
|
|
1567
|
+
static memberKey(guildId: string, userId: string): string;
|
|
1568
|
+
}
|
|
1569
|
+
|
|
1570
|
+
type ChameleonAPIResult<T> = {
|
|
1571
|
+
ok: true;
|
|
1572
|
+
data: T;
|
|
1573
|
+
} | {
|
|
1574
|
+
ok: false;
|
|
1575
|
+
status: number;
|
|
1576
|
+
code?: number;
|
|
1577
|
+
message: string;
|
|
1578
|
+
raw?: unknown;
|
|
1579
|
+
};
|
|
1580
|
+
interface ChameleonRESTOptions {
|
|
1581
|
+
token: string;
|
|
1582
|
+
version?: number;
|
|
1583
|
+
}
|
|
1584
|
+
type HttpMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
|
|
1585
|
+
|
|
1586
|
+
declare class ChameleonREST {
|
|
1587
|
+
readonly token: string;
|
|
1588
|
+
readonly version: number;
|
|
1589
|
+
private readonly baseUrl;
|
|
1590
|
+
private readonly limiter;
|
|
1591
|
+
constructor(options: ChameleonRESTOptions);
|
|
1592
|
+
/**
|
|
1593
|
+
* Internal generic request handler that doesn't throw, returning `{ ok: boolean, ... }` shape
|
|
1594
|
+
*/
|
|
1595
|
+
request<T = unknown>(method: HttpMethod, endpoint: string, body?: unknown, headers?: Record<string, string>): Promise<ChameleonAPIResult<T>>;
|
|
1596
|
+
get<T = unknown>(endpoint: string, headers?: Record<string, string>): Promise<ChameleonAPIResult<T>>;
|
|
1597
|
+
post<T = unknown>(endpoint: string, body?: unknown, headers?: Record<string, string>): Promise<ChameleonAPIResult<T>>;
|
|
1598
|
+
put<T = unknown>(endpoint: string, body?: unknown, headers?: Record<string, string>): Promise<ChameleonAPIResult<T>>;
|
|
1599
|
+
patch<T = unknown>(endpoint: string, body?: unknown, headers?: Record<string, string>): Promise<ChameleonAPIResult<T>>;
|
|
1600
|
+
delete<T = unknown>(endpoint: string, headers?: Record<string, string>): Promise<ChameleonAPIResult<T>>;
|
|
1601
|
+
}
|
|
1602
|
+
|
|
1603
|
+
interface ChameleonGatewayOptions {
|
|
1604
|
+
token: string;
|
|
1605
|
+
intents: number;
|
|
1606
|
+
version?: number;
|
|
1607
|
+
encoding?: 'json' | 'etf';
|
|
1608
|
+
largeThreshold?: number;
|
|
1609
|
+
shard?: [number, number];
|
|
1610
|
+
}
|
|
1611
|
+
type GatewayPayload<T = unknown> = {
|
|
1612
|
+
op: number;
|
|
1613
|
+
d: T;
|
|
1614
|
+
s?: number | null;
|
|
1615
|
+
t?: string | null;
|
|
1616
|
+
};
|
|
1617
|
+
type GatewayStatus = 'idle' | 'connecting' | 'connected' | 'resuming' | 'disconnected';
|
|
1618
|
+
declare class ChameleonGateway {
|
|
1619
|
+
readonly token: string;
|
|
1620
|
+
readonly intents: number;
|
|
1621
|
+
readonly version: number;
|
|
1622
|
+
ms: number;
|
|
1623
|
+
readonly encoding: string;
|
|
1624
|
+
readonly largeThreshold: number;
|
|
1625
|
+
readonly shard?: [number, number];
|
|
1626
|
+
status: GatewayStatus;
|
|
1627
|
+
private ws;
|
|
1628
|
+
private heartbeatTimer;
|
|
1629
|
+
private heartbeatIntervalMs;
|
|
1630
|
+
private heartbeatAcked;
|
|
1631
|
+
private seq;
|
|
1632
|
+
private sessionId;
|
|
1633
|
+
private baseUrl;
|
|
1634
|
+
private resumeUrl;
|
|
1635
|
+
private reconnectAttempts;
|
|
1636
|
+
private reconnectTimer;
|
|
1637
|
+
private _lastHeartbeatSend;
|
|
1638
|
+
private listeners;
|
|
1639
|
+
constructor(options: ChameleonGatewayOptions);
|
|
1640
|
+
/**
|
|
1641
|
+
* Open a new WebSocket connection to the Gateway,
|
|
1642
|
+
* if resuming, uses the resume_gateway_url, otherwise uses the base URL
|
|
1643
|
+
*/
|
|
1644
|
+
connect(): void;
|
|
1645
|
+
/**
|
|
1646
|
+
* Gracefully close the connection
|
|
1647
|
+
* code 1000/1001 invalidates the session
|
|
1648
|
+
* any other code keeps the session alive for resume
|
|
1649
|
+
*/
|
|
1650
|
+
disconnect(code?: number, reason?: string): void;
|
|
1651
|
+
/**
|
|
1652
|
+
* Send a payload to the Gateway.
|
|
1653
|
+
*/
|
|
1654
|
+
send(op: number, d: unknown): void;
|
|
1655
|
+
pendingPresence: Record<string, any> | null;
|
|
1656
|
+
/**
|
|
1657
|
+
* Update the presence/status for this shard
|
|
1658
|
+
*/
|
|
1659
|
+
updatePresence(options: {
|
|
1660
|
+
status?: 'online' | 'dnd' | 'idle' | 'invisible' | 'offline';
|
|
1661
|
+
activities?: Array<{
|
|
1662
|
+
name: string;
|
|
1663
|
+
type: number;
|
|
1664
|
+
url?: string;
|
|
1665
|
+
state?: string;
|
|
1666
|
+
}>;
|
|
1667
|
+
afk?: boolean;
|
|
1668
|
+
since?: number | null;
|
|
1669
|
+
}): void;
|
|
1670
|
+
/**
|
|
1671
|
+
* request offline/large guild members from the Gateway
|
|
1672
|
+
* this is used to lazy-load members into the cache via GUILD_MEMBERS_CHUNK events
|
|
1673
|
+
*/
|
|
1674
|
+
requestGuildMembers(options: {
|
|
1675
|
+
guildId: string | string[];
|
|
1676
|
+
query?: string;
|
|
1677
|
+
limit: number;
|
|
1678
|
+
presences?: boolean;
|
|
1679
|
+
userIds?: string | string[];
|
|
1680
|
+
nonce?: string;
|
|
1681
|
+
}): void;
|
|
1682
|
+
/**
|
|
1683
|
+
* Register an event listener.
|
|
1684
|
+
*/
|
|
1685
|
+
on<T = unknown>(event: string, listener: (data: T) => void): void;
|
|
1686
|
+
/**
|
|
1687
|
+
* Remove all listeners for a specific event, or all listeners entirely.
|
|
1688
|
+
*/
|
|
1689
|
+
removeAllListeners(event?: string): void;
|
|
1690
|
+
private emit;
|
|
1691
|
+
private onOpen;
|
|
1692
|
+
private onMessage;
|
|
1693
|
+
private onClose;
|
|
1694
|
+
private onError;
|
|
1695
|
+
private handleDispatch;
|
|
1696
|
+
/**
|
|
1697
|
+
* Start the heartbeat loop
|
|
1698
|
+
* first heartbeat is sent after interval * jitter
|
|
1699
|
+
* subsequent heartbeats are sent every interval ms
|
|
1700
|
+
*/
|
|
1701
|
+
private startHeartbeat;
|
|
1702
|
+
/**
|
|
1703
|
+
* send a single heartbeat, if the previous one was not ACKed,
|
|
1704
|
+
* we close and reconnect
|
|
1705
|
+
*/
|
|
1706
|
+
private sendHeartbeat;
|
|
1707
|
+
private stopHeartbeat;
|
|
1708
|
+
private canResume;
|
|
1709
|
+
/**
|
|
1710
|
+
* send Identify or Resume depending on whether we have an active session
|
|
1711
|
+
*/
|
|
1712
|
+
private identify;
|
|
1713
|
+
/**
|
|
1714
|
+
* schedule a reconnect with exponential backoff
|
|
1715
|
+
* delay: min(1s * 2^attempt, 30s) + jitter
|
|
1716
|
+
*/
|
|
1717
|
+
private scheduleReconnect;
|
|
1718
|
+
private clearReconnectTimer;
|
|
1719
|
+
}
|
|
1720
|
+
|
|
1721
|
+
type PartialChannel = Partial<Channel> & {
|
|
1722
|
+
id: string;
|
|
1723
|
+
};
|
|
1724
|
+
type PartialGuild = Partial<Guild> & {
|
|
1725
|
+
id: string;
|
|
1726
|
+
};
|
|
1727
|
+
type ChameleonEvent = {
|
|
1728
|
+
type: 'READY';
|
|
1729
|
+
} | {
|
|
1730
|
+
type: 'RESUMED';
|
|
1731
|
+
} | {
|
|
1732
|
+
type: 'GUILD_CREATE';
|
|
1733
|
+
guild: Guild;
|
|
1734
|
+
partial?: boolean;
|
|
1735
|
+
} | {
|
|
1736
|
+
type: 'GUILD_AVAILABLE';
|
|
1737
|
+
guild: Guild;
|
|
1738
|
+
reason: 'hydration' | 'outage';
|
|
1739
|
+
partial?: boolean;
|
|
1740
|
+
} | {
|
|
1741
|
+
type: 'GUILD_UNAVAILABLE';
|
|
1742
|
+
guildId: string;
|
|
1743
|
+
} | {
|
|
1744
|
+
type: 'GUILD_UPDATE';
|
|
1745
|
+
oldGuild?: Guild;
|
|
1746
|
+
guild: Guild;
|
|
1747
|
+
} | {
|
|
1748
|
+
type: 'GUILD_DELETE';
|
|
1749
|
+
guildId: string;
|
|
1750
|
+
} | {
|
|
1751
|
+
type: 'CHANNEL_CREATE';
|
|
1752
|
+
channel: Channel;
|
|
1753
|
+
guild?: PartialGuild;
|
|
1754
|
+
} | {
|
|
1755
|
+
type: 'CHANNEL_UPDATE';
|
|
1756
|
+
oldChannel?: Channel;
|
|
1757
|
+
channel: Channel;
|
|
1758
|
+
guild?: PartialGuild;
|
|
1759
|
+
} | {
|
|
1760
|
+
type: 'CHANNEL_DELETE';
|
|
1761
|
+
channelId: string;
|
|
1762
|
+
guild?: PartialGuild;
|
|
1763
|
+
} | {
|
|
1764
|
+
type: 'CHANNEL_PINS_UPDATE';
|
|
1765
|
+
channelId: string;
|
|
1766
|
+
guildId?: string;
|
|
1767
|
+
lastPinTimestamp?: number | null;
|
|
1768
|
+
} | {
|
|
1769
|
+
type: 'THREAD_CREATE';
|
|
1770
|
+
channel: Channel;
|
|
1771
|
+
} | {
|
|
1772
|
+
type: 'THREAD_UPDATE';
|
|
1773
|
+
oldChannel?: Channel;
|
|
1774
|
+
channel: Channel;
|
|
1775
|
+
} | {
|
|
1776
|
+
type: 'THREAD_DELETE';
|
|
1777
|
+
id: string;
|
|
1778
|
+
guildId: string;
|
|
1779
|
+
parentId: string;
|
|
1780
|
+
channelType: number;
|
|
1781
|
+
} | {
|
|
1782
|
+
type: 'THREAD_LIST_SYNC';
|
|
1783
|
+
guildId: string;
|
|
1784
|
+
channelIds?: string[];
|
|
1785
|
+
threads: Channel[];
|
|
1786
|
+
members: unknown[];
|
|
1787
|
+
} | {
|
|
1788
|
+
type: 'GUILD_MEMBER_ADD';
|
|
1789
|
+
member: Member;
|
|
1790
|
+
guildId: string;
|
|
1791
|
+
} | {
|
|
1792
|
+
type: 'GUILD_MEMBER_UPDATE';
|
|
1793
|
+
oldMember?: Member;
|
|
1794
|
+
guildId: string;
|
|
1795
|
+
user: User;
|
|
1796
|
+
roles: string[];
|
|
1797
|
+
nick?: string | null;
|
|
1798
|
+
joinedAt?: number | null;
|
|
1799
|
+
} | {
|
|
1800
|
+
type: 'GUILD_MEMBER_REMOVE';
|
|
1801
|
+
user: User;
|
|
1802
|
+
guildId: string;
|
|
1803
|
+
} | {
|
|
1804
|
+
type: 'GUILD_MEMBERS_CHUNK';
|
|
1805
|
+
guildId: string;
|
|
1806
|
+
members: Member[];
|
|
1807
|
+
chunkIndex: number;
|
|
1808
|
+
chunkCount: number;
|
|
1809
|
+
notFound?: string[];
|
|
1810
|
+
nonce?: string;
|
|
1811
|
+
} | {
|
|
1812
|
+
type: 'GUILD_ROLE_CREATE';
|
|
1813
|
+
guildId: string;
|
|
1814
|
+
role: Role;
|
|
1815
|
+
} | {
|
|
1816
|
+
type: 'GUILD_ROLE_UPDATE';
|
|
1817
|
+
oldRole?: Role;
|
|
1818
|
+
guildId: string;
|
|
1819
|
+
role: Role;
|
|
1820
|
+
} | {
|
|
1821
|
+
type: 'GUILD_ROLE_DELETE';
|
|
1822
|
+
guildId: string;
|
|
1823
|
+
roleId: string;
|
|
1824
|
+
} | {
|
|
1825
|
+
type: 'GUILD_BAN_ADD';
|
|
1826
|
+
guildId: string;
|
|
1827
|
+
user: User;
|
|
1828
|
+
} | {
|
|
1829
|
+
type: 'GUILD_BAN_REMOVE';
|
|
1830
|
+
guildId: string;
|
|
1831
|
+
user: User;
|
|
1832
|
+
} | {
|
|
1833
|
+
type: 'GUILD_EMOJIS_UPDATE';
|
|
1834
|
+
guildId: string;
|
|
1835
|
+
emojis: Emoji[];
|
|
1836
|
+
} | {
|
|
1837
|
+
type: 'GUILD_STICKERS_UPDATE';
|
|
1838
|
+
guildId: string;
|
|
1839
|
+
stickers: Sticker[];
|
|
1840
|
+
} | {
|
|
1841
|
+
type: 'MESSAGE_CREATE';
|
|
1842
|
+
message: Message;
|
|
1843
|
+
channel: PartialChannel;
|
|
1844
|
+
} | {
|
|
1845
|
+
type: 'MESSAGE_UPDATE';
|
|
1846
|
+
oldMessage?: Message;
|
|
1847
|
+
message: Message;
|
|
1848
|
+
channel: PartialChannel;
|
|
1849
|
+
} | {
|
|
1850
|
+
type: 'MESSAGE_DELETE';
|
|
1851
|
+
messageId: string;
|
|
1852
|
+
channelId: string;
|
|
1853
|
+
guildId?: string;
|
|
1854
|
+
message?: Message;
|
|
1855
|
+
} | {
|
|
1856
|
+
type: 'MESSAGE_DELETE_BULK';
|
|
1857
|
+
messageIds: string[];
|
|
1858
|
+
channelId: string;
|
|
1859
|
+
guildId?: string;
|
|
1860
|
+
messages?: Message[];
|
|
1861
|
+
} | {
|
|
1862
|
+
type: 'MESSAGE_REACTION_ADD';
|
|
1863
|
+
userId: string;
|
|
1864
|
+
channelId: string;
|
|
1865
|
+
messageId: string;
|
|
1866
|
+
guildId?: string;
|
|
1867
|
+
emoji: Partial<Emoji>;
|
|
1868
|
+
member?: Member;
|
|
1869
|
+
} | {
|
|
1870
|
+
type: 'MESSAGE_REACTION_REMOVE';
|
|
1871
|
+
userId: string;
|
|
1872
|
+
channelId: string;
|
|
1873
|
+
messageId: string;
|
|
1874
|
+
guildId?: string;
|
|
1875
|
+
emoji: Partial<Emoji>;
|
|
1876
|
+
} | {
|
|
1877
|
+
type: 'MESSAGE_REACTION_REMOVE_ALL';
|
|
1878
|
+
channelId: string;
|
|
1879
|
+
messageId: string;
|
|
1880
|
+
guildId?: string;
|
|
1881
|
+
} | {
|
|
1882
|
+
type: 'MESSAGE_REACTION_REMOVE_EMOJI';
|
|
1883
|
+
channelId: string;
|
|
1884
|
+
messageId: string;
|
|
1885
|
+
guildId?: string;
|
|
1886
|
+
emoji: Partial<Emoji>;
|
|
1887
|
+
} | {
|
|
1888
|
+
type: 'INTERACTION_CREATE';
|
|
1889
|
+
interaction: Interaction;
|
|
1890
|
+
} | {
|
|
1891
|
+
type: 'VOICE_STATE_UPDATE';
|
|
1892
|
+
voiceState: Voice;
|
|
1893
|
+
} | {
|
|
1894
|
+
type: 'VOICE_SERVER_UPDATE';
|
|
1895
|
+
token: string;
|
|
1896
|
+
guildId: string;
|
|
1897
|
+
endpoint: string | null;
|
|
1898
|
+
} | {
|
|
1899
|
+
type: 'STAGE_INSTANCE_CREATE';
|
|
1900
|
+
stageInstance: StageInstance;
|
|
1901
|
+
} | {
|
|
1902
|
+
type: 'STAGE_INSTANCE_UPDATE';
|
|
1903
|
+
stageInstance: StageInstance;
|
|
1904
|
+
} | {
|
|
1905
|
+
type: 'STAGE_INSTANCE_DELETE';
|
|
1906
|
+
stageInstance: StageInstance;
|
|
1907
|
+
} | {
|
|
1908
|
+
type: 'GUILD_SOUNDBOARD_SOUND_CREATE';
|
|
1909
|
+
guildId: string;
|
|
1910
|
+
sound: SoundboardSound;
|
|
1911
|
+
} | {
|
|
1912
|
+
type: 'GUILD_SOUNDBOARD_SOUND_UPDATE';
|
|
1913
|
+
guildId: string;
|
|
1914
|
+
sound: SoundboardSound;
|
|
1915
|
+
} | {
|
|
1916
|
+
type: 'GUILD_SOUNDBOARD_SOUND_DELETE';
|
|
1917
|
+
guildId: string;
|
|
1918
|
+
soundId: string;
|
|
1919
|
+
} | {
|
|
1920
|
+
type: 'GUILD_SOUNDBOARD_SOUNDS_UPDATE';
|
|
1921
|
+
guildId: string;
|
|
1922
|
+
sounds: SoundboardSound[];
|
|
1923
|
+
} | {
|
|
1924
|
+
type: 'SUBSCRIPTION_CREATE';
|
|
1925
|
+
subscription: Subscription;
|
|
1926
|
+
} | {
|
|
1927
|
+
type: 'SUBSCRIPTION_UPDATE';
|
|
1928
|
+
subscription: Subscription;
|
|
1929
|
+
} | {
|
|
1930
|
+
type: 'SUBSCRIPTION_DELETE';
|
|
1931
|
+
subscription: Subscription;
|
|
1932
|
+
} | {
|
|
1933
|
+
type: 'VOICE_CHANNEL_EFFECT_SEND';
|
|
1934
|
+
channelId: string;
|
|
1935
|
+
guildId: string;
|
|
1936
|
+
userId: string;
|
|
1937
|
+
emoji?: Partial<Emoji>;
|
|
1938
|
+
} | {
|
|
1939
|
+
type: 'GUILD_AUDIT_LOG_ENTRY_CREATE';
|
|
1940
|
+
guildId: string;
|
|
1941
|
+
entry: AuditLogEntry;
|
|
1942
|
+
} | {
|
|
1943
|
+
type: 'THREAD_MEMBERS_UPDATE';
|
|
1944
|
+
id: string;
|
|
1945
|
+
guildId: string;
|
|
1946
|
+
memberCount: number;
|
|
1947
|
+
addedMembers?: Partial<Member>[];
|
|
1948
|
+
removedMemberIds?: string[];
|
|
1949
|
+
} | {
|
|
1950
|
+
type: 'THREAD_MEMBER_UPDATE';
|
|
1951
|
+
member: Partial<Member>;
|
|
1952
|
+
guildId: string;
|
|
1953
|
+
} | {
|
|
1954
|
+
type: 'APPLICATION_COMMAND_PERMISSIONS_UPDATE';
|
|
1955
|
+
permissions: {
|
|
1956
|
+
applicationId: string;
|
|
1957
|
+
guildId: string;
|
|
1958
|
+
id: string;
|
|
1959
|
+
permissions: string[];
|
|
1960
|
+
}[];
|
|
1961
|
+
} | {
|
|
1962
|
+
type: 'GUILD_SCHEDULED_EVENT_CREATE';
|
|
1963
|
+
scheduledEvent: GuildScheduledEvent;
|
|
1964
|
+
} | {
|
|
1965
|
+
type: 'GUILD_SCHEDULED_EVENT_UPDATE';
|
|
1966
|
+
scheduledEvent: GuildScheduledEvent;
|
|
1967
|
+
} | {
|
|
1968
|
+
type: 'GUILD_SCHEDULED_EVENT_DELETE';
|
|
1969
|
+
scheduledEvent: GuildScheduledEvent;
|
|
1970
|
+
} | {
|
|
1971
|
+
type: 'GUILD_SCHEDULED_EVENT_USER_ADD';
|
|
1972
|
+
guildScheduledEventId: string;
|
|
1973
|
+
userId: string;
|
|
1974
|
+
guildId: string;
|
|
1975
|
+
} | {
|
|
1976
|
+
type: 'GUILD_SCHEDULED_EVENT_USER_REMOVE';
|
|
1977
|
+
guildScheduledEventId: string;
|
|
1978
|
+
userId: string;
|
|
1979
|
+
guildId: string;
|
|
1980
|
+
} | {
|
|
1981
|
+
type: 'AUTO_MODERATION_RULE_CREATE';
|
|
1982
|
+
rule: AutoModerationRule;
|
|
1983
|
+
} | {
|
|
1984
|
+
type: 'AUTO_MODERATION_RULE_UPDATE';
|
|
1985
|
+
rule: AutoModerationRule;
|
|
1986
|
+
} | {
|
|
1987
|
+
type: 'AUTO_MODERATION_RULE_DELETE';
|
|
1988
|
+
rule: AutoModerationRule;
|
|
1989
|
+
} | {
|
|
1990
|
+
type: 'AUTO_MODERATION_ACTION_EXECUTION';
|
|
1991
|
+
guildId: string;
|
|
1992
|
+
action: AutoModerationAction;
|
|
1993
|
+
ruleId: string;
|
|
1994
|
+
ruleTriggerType: number;
|
|
1995
|
+
userId: string;
|
|
1996
|
+
channelId?: string;
|
|
1997
|
+
messageId?: string;
|
|
1998
|
+
content?: string;
|
|
1999
|
+
matchedKeyword?: string | null;
|
|
2000
|
+
matchedContent?: string | null;
|
|
2001
|
+
} | {
|
|
2002
|
+
type: 'INVITE_CREATE';
|
|
2003
|
+
channelId: string;
|
|
2004
|
+
code: string;
|
|
2005
|
+
guildId?: string;
|
|
2006
|
+
inviter?: User;
|
|
2007
|
+
maxAge: number;
|
|
2008
|
+
maxUses: number;
|
|
2009
|
+
temporary: boolean;
|
|
2010
|
+
} | {
|
|
2011
|
+
type: 'INVITE_DELETE';
|
|
2012
|
+
channelId: string;
|
|
2013
|
+
code: string;
|
|
2014
|
+
guildId?: string;
|
|
2015
|
+
} | {
|
|
2016
|
+
type: 'GUILD_INTEGRATIONS_UPDATE';
|
|
2017
|
+
guildId: string;
|
|
2018
|
+
} | {
|
|
2019
|
+
type: 'INTEGRATION_CREATE';
|
|
2020
|
+
guildId: string;
|
|
2021
|
+
integration: Integration;
|
|
2022
|
+
} | {
|
|
2023
|
+
type: 'INTEGRATION_UPDATE';
|
|
2024
|
+
guildId: string;
|
|
2025
|
+
integration: Integration;
|
|
2026
|
+
} | {
|
|
2027
|
+
type: 'INTEGRATION_DELETE';
|
|
2028
|
+
id: string;
|
|
2029
|
+
guildId: string;
|
|
2030
|
+
applicationId?: string;
|
|
2031
|
+
} | {
|
|
2032
|
+
type: 'ENTITLEMENT_CREATE';
|
|
2033
|
+
entitlement: Entitlement;
|
|
2034
|
+
} | {
|
|
2035
|
+
type: 'ENTITLEMENT_UPDATE';
|
|
2036
|
+
entitlement: Entitlement;
|
|
2037
|
+
} | {
|
|
2038
|
+
type: 'ENTITLEMENT_DELETE';
|
|
2039
|
+
entitlement: Entitlement;
|
|
2040
|
+
} | {
|
|
2041
|
+
type: 'PRESENCE_UPDATE';
|
|
2042
|
+
user: Partial<User> & {
|
|
2043
|
+
id: string;
|
|
2044
|
+
};
|
|
2045
|
+
guildId: string;
|
|
2046
|
+
status: string;
|
|
2047
|
+
activities: unknown[];
|
|
2048
|
+
clientStatus: unknown;
|
|
2049
|
+
} | {
|
|
2050
|
+
type: 'TYPING_START';
|
|
2051
|
+
channelId: string;
|
|
2052
|
+
guildId?: string;
|
|
2053
|
+
userId: string;
|
|
2054
|
+
timestamp: number;
|
|
2055
|
+
member?: Member;
|
|
2056
|
+
} | {
|
|
2057
|
+
type: 'USER_UPDATE';
|
|
2058
|
+
oldUser?: User;
|
|
2059
|
+
user: User;
|
|
2060
|
+
} | {
|
|
2061
|
+
type: 'WEBHOOKS_UPDATE';
|
|
2062
|
+
guildId: string;
|
|
2063
|
+
channelId: string;
|
|
2064
|
+
} | {
|
|
2065
|
+
type: 'MESSAGE_POLL_VOTE_ADD';
|
|
2066
|
+
userId: string;
|
|
2067
|
+
channelId: string;
|
|
2068
|
+
messageId: string;
|
|
2069
|
+
guildId?: string;
|
|
2070
|
+
answerId: number;
|
|
2071
|
+
} | {
|
|
2072
|
+
type: 'MESSAGE_POLL_VOTE_REMOVE';
|
|
2073
|
+
userId: string;
|
|
2074
|
+
channelId: string;
|
|
2075
|
+
messageId: string;
|
|
2076
|
+
guildId?: string;
|
|
2077
|
+
answerId: number;
|
|
2078
|
+
};
|
|
2079
|
+
type ChameleonEventHandler = (event: ChameleonEvent) => void | Promise<void>;
|
|
2080
|
+
|
|
2081
|
+
type OptionType = 'string' | 'integer' | 'boolean' | 'user' | 'channel' | 'role' | 'number';
|
|
2082
|
+
interface OptionDef<T extends OptionType, R extends boolean> {
|
|
2083
|
+
type: T;
|
|
2084
|
+
description: string;
|
|
2085
|
+
required: R;
|
|
2086
|
+
min?: number;
|
|
2087
|
+
max?: number;
|
|
2088
|
+
choices?: {
|
|
2089
|
+
name: string;
|
|
2090
|
+
value: string | number;
|
|
2091
|
+
}[];
|
|
2092
|
+
}
|
|
2093
|
+
type ResolveOptionType<T extends OptionType> = T extends 'string' ? string : T extends 'integer' | 'number' ? number : T extends 'boolean' ? boolean : T extends 'user' ? User : T extends 'channel' ? Channel : T extends 'role' ? Role : never;
|
|
2094
|
+
type ResolveOption<O extends OptionDef<any, boolean>> = O['required'] extends true ? ResolveOptionType<O['type']> : ResolveOptionType<O['type']> | undefined;
|
|
2095
|
+
type ResolveOptions<O extends Record<string, OptionDef<any, boolean>>> = {
|
|
2096
|
+
[K in keyof O]: ResolveOption<O[K]>;
|
|
2097
|
+
};
|
|
2098
|
+
declare const opt: {
|
|
2099
|
+
string: <R extends boolean = false>(description: string, options?: {
|
|
2100
|
+
required?: R;
|
|
2101
|
+
choices?: {
|
|
2102
|
+
name: string;
|
|
2103
|
+
value: string;
|
|
2104
|
+
}[];
|
|
2105
|
+
minLength?: number;
|
|
2106
|
+
maxLength?: number;
|
|
2107
|
+
}) => OptionDef<"string", R>;
|
|
2108
|
+
integer: <R extends boolean = false>(description: string, options?: {
|
|
2109
|
+
required?: R;
|
|
2110
|
+
choices?: {
|
|
2111
|
+
name: string;
|
|
2112
|
+
value: number;
|
|
2113
|
+
}[];
|
|
2114
|
+
min?: number;
|
|
2115
|
+
max?: number;
|
|
2116
|
+
}) => OptionDef<"integer", R>;
|
|
2117
|
+
number: <R extends boolean = false>(description: string, options?: {
|
|
2118
|
+
required?: R;
|
|
2119
|
+
choices?: {
|
|
2120
|
+
name: string;
|
|
2121
|
+
value: number;
|
|
2122
|
+
}[];
|
|
2123
|
+
min?: number;
|
|
2124
|
+
max?: number;
|
|
2125
|
+
}) => OptionDef<"number", R>;
|
|
2126
|
+
boolean: <R extends boolean = false>(description: string, options?: {
|
|
2127
|
+
required?: R;
|
|
2128
|
+
}) => OptionDef<"boolean", R>;
|
|
2129
|
+
user: <R extends boolean = false>(description: string, options?: {
|
|
2130
|
+
required?: R;
|
|
2131
|
+
}) => OptionDef<"user", R>;
|
|
2132
|
+
channel: <R extends boolean = false>(description: string, options?: {
|
|
2133
|
+
required?: R;
|
|
2134
|
+
}) => OptionDef<"channel", R>;
|
|
2135
|
+
role: <R extends boolean = false>(description: string, options?: {
|
|
2136
|
+
required?: R;
|
|
2137
|
+
}) => OptionDef<"role", R>;
|
|
2138
|
+
};
|
|
2139
|
+
|
|
2140
|
+
type InteractionReplyOptions = string | {
|
|
2141
|
+
content?: string;
|
|
2142
|
+
embeds?: any[];
|
|
2143
|
+
components?: any[];
|
|
2144
|
+
ephemeral?: boolean;
|
|
2145
|
+
};
|
|
2146
|
+
declare class CommandContext<Options = Record<string, any>> {
|
|
2147
|
+
options: Options;
|
|
2148
|
+
user: User;
|
|
2149
|
+
guild?: Guild | {
|
|
2150
|
+
id: string;
|
|
2151
|
+
} | undefined;
|
|
2152
|
+
channel?: Channel | {
|
|
2153
|
+
id: string;
|
|
2154
|
+
} | undefined;
|
|
2155
|
+
interactionId: string;
|
|
2156
|
+
interactionToken: string;
|
|
2157
|
+
private _client;
|
|
2158
|
+
private _deferred;
|
|
2159
|
+
private _replied;
|
|
2160
|
+
constructor(client: Client, rawInteraction: Record<string, any>, parsedOptions: Options, user: User, guild?: Guild | {
|
|
2161
|
+
id: string;
|
|
2162
|
+
}, channel?: Channel | {
|
|
2163
|
+
id: string;
|
|
2164
|
+
});
|
|
2165
|
+
get replied(): boolean;
|
|
2166
|
+
get deferred(): boolean;
|
|
2167
|
+
reply(payload: InteractionReplyOptions): Promise<void>;
|
|
2168
|
+
defer(options?: {
|
|
2169
|
+
ephemeral?: boolean;
|
|
2170
|
+
}): Promise<void>;
|
|
2171
|
+
followUp(payload: InteractionReplyOptions): Promise<void>;
|
|
2172
|
+
showModal(modal: any): Promise<void>;
|
|
2173
|
+
}
|
|
2174
|
+
|
|
2175
|
+
type ExecuteFunction<O extends Record<string, OptionDef<any, boolean>>> = (ctx: CommandContext<ResolveOptions<O>>) => void | Promise<void>;
|
|
2176
|
+
interface Subcommand<O extends Record<string, OptionDef<any, boolean>> = Record<string, never>> {
|
|
2177
|
+
description: string;
|
|
2178
|
+
options?: O;
|
|
2179
|
+
execute: ExecuteFunction<O>;
|
|
2180
|
+
}
|
|
2181
|
+
declare function defineSubcommand<O extends Record<string, OptionDef<any, boolean>>>(def: Subcommand<O>): Subcommand<O>;
|
|
2182
|
+
type CommandDef<O extends Record<string, OptionDef<any, boolean>> = Record<string, never>, S extends Record<string, Subcommand<any>> = Record<string, never>> = {
|
|
2183
|
+
name: string;
|
|
2184
|
+
description: string;
|
|
2185
|
+
options?: O;
|
|
2186
|
+
subcommands?: S;
|
|
2187
|
+
execute?: ExecuteFunction<O>;
|
|
2188
|
+
};
|
|
2189
|
+
declare function defineCommand<O extends Record<string, OptionDef<any, boolean>>, S extends Record<string, Subcommand<any>>>(def: CommandDef<O, S>): CommandDef<O, S>;
|
|
2190
|
+
|
|
2191
|
+
declare class ComponentContext$1 {
|
|
2192
|
+
customId: string;
|
|
2193
|
+
user: User;
|
|
2194
|
+
guild?: Guild | {
|
|
2195
|
+
id: string;
|
|
2196
|
+
} | undefined;
|
|
2197
|
+
channel?: Channel | {
|
|
2198
|
+
id: string;
|
|
2199
|
+
} | undefined;
|
|
2200
|
+
message?: Record<string, unknown>;
|
|
2201
|
+
interactionId: string;
|
|
2202
|
+
interactionToken: string;
|
|
2203
|
+
private _client;
|
|
2204
|
+
private _deferred;
|
|
2205
|
+
private _replied;
|
|
2206
|
+
constructor(client: Client, raw: Record<string, any>, user: User, guild?: Guild | {
|
|
2207
|
+
id: string;
|
|
2208
|
+
}, channel?: Channel | {
|
|
2209
|
+
id: string;
|
|
2210
|
+
});
|
|
2211
|
+
get replied(): boolean;
|
|
2212
|
+
get deferred(): boolean;
|
|
2213
|
+
/** Values from a select menu interaction */
|
|
2214
|
+
get values(): string[];
|
|
2215
|
+
reply(payload: InteractionReplyOptions): Promise<void>;
|
|
2216
|
+
deferUpdate(): Promise<void>;
|
|
2217
|
+
update(payload: InteractionReplyOptions): Promise<void>;
|
|
2218
|
+
followUp(payload: InteractionReplyOptions): Promise<void>;
|
|
2219
|
+
}
|
|
2220
|
+
declare class ModalContext {
|
|
2221
|
+
customId: string;
|
|
2222
|
+
user: User;
|
|
2223
|
+
guild?: Guild | {
|
|
2224
|
+
id: string;
|
|
2225
|
+
} | undefined;
|
|
2226
|
+
channel?: Channel | {
|
|
2227
|
+
id: string;
|
|
2228
|
+
} | undefined;
|
|
2229
|
+
interactionId: string;
|
|
2230
|
+
interactionToken: string;
|
|
2231
|
+
private _fields;
|
|
2232
|
+
private _client;
|
|
2233
|
+
private _replied;
|
|
2234
|
+
private _deferred;
|
|
2235
|
+
constructor(client: Client, raw: Record<string, any>, user: User, guild?: Guild | {
|
|
2236
|
+
id: string;
|
|
2237
|
+
}, channel?: Channel | {
|
|
2238
|
+
id: string;
|
|
2239
|
+
});
|
|
2240
|
+
get replied(): boolean;
|
|
2241
|
+
get deferred(): boolean;
|
|
2242
|
+
/** Get a text input value by its customId */
|
|
2243
|
+
getField(customId: string): string | undefined;
|
|
2244
|
+
/** Get all field values as a plain object */
|
|
2245
|
+
get fields(): Record<string, string>;
|
|
2246
|
+
reply(payload: InteractionReplyOptions): Promise<void>;
|
|
2247
|
+
defer(options?: {
|
|
2248
|
+
ephemeral?: boolean;
|
|
2249
|
+
}): Promise<void>;
|
|
2250
|
+
followUp(payload: InteractionReplyOptions): Promise<void>;
|
|
2251
|
+
}
|
|
2252
|
+
|
|
2253
|
+
interface ComponentHandler {
|
|
2254
|
+
customId: string | RegExp;
|
|
2255
|
+
execute: (ctx: ComponentContext$1) => any | Promise<any>;
|
|
2256
|
+
}
|
|
2257
|
+
interface ModalHandler {
|
|
2258
|
+
customId: string | RegExp;
|
|
2259
|
+
execute: (ctx: ModalContext) => any | Promise<any>;
|
|
2260
|
+
}
|
|
2261
|
+
declare class CommandManager {
|
|
2262
|
+
private _commands;
|
|
2263
|
+
private _components;
|
|
2264
|
+
private _modals;
|
|
2265
|
+
private _client;
|
|
2266
|
+
constructor(client: Client);
|
|
2267
|
+
register(...commands: CommandDef<any, any>[]): void;
|
|
2268
|
+
registerComponent(handler: ComponentHandler): void;
|
|
2269
|
+
registerModal(handler: ModalHandler): void;
|
|
2270
|
+
load(directory: string): Promise<void>;
|
|
2271
|
+
private _deployCommands;
|
|
2272
|
+
private _transformCommand;
|
|
2273
|
+
handleInteraction(raw: any): Promise<void>;
|
|
2274
|
+
private _handleComponentInteraction;
|
|
2275
|
+
private _handleModalInteraction;
|
|
2276
|
+
}
|
|
2277
|
+
|
|
2278
|
+
declare class ComponentContext<Values = any, Fields = any> {
|
|
2279
|
+
user: User;
|
|
2280
|
+
guild?: Guild | {
|
|
2281
|
+
id: string;
|
|
2282
|
+
} | undefined;
|
|
2283
|
+
channel?: Channel | {
|
|
2284
|
+
id: string;
|
|
2285
|
+
} | undefined;
|
|
2286
|
+
interactionId: string;
|
|
2287
|
+
interactionToken: string;
|
|
2288
|
+
customId: string;
|
|
2289
|
+
values: Values;
|
|
2290
|
+
fields: Fields;
|
|
2291
|
+
private _client;
|
|
2292
|
+
private _deferred;
|
|
2293
|
+
private _replied;
|
|
2294
|
+
constructor(client: Client, rawInteraction: Record<string, any>, user: User, guild?: Guild | {
|
|
2295
|
+
id: string;
|
|
2296
|
+
}, channel?: Channel | {
|
|
2297
|
+
id: string;
|
|
2298
|
+
});
|
|
2299
|
+
get replied(): boolean;
|
|
2300
|
+
get deferred(): boolean;
|
|
2301
|
+
reply(payload: InteractionReplyOptions): Promise<void>;
|
|
2302
|
+
defer(options?: {
|
|
2303
|
+
ephemeral?: boolean;
|
|
2304
|
+
}): Promise<void>;
|
|
2305
|
+
update(payload: InteractionReplyOptions): Promise<void>;
|
|
2306
|
+
deferUpdate(): Promise<void>;
|
|
2307
|
+
followUp(payload: InteractionReplyOptions): Promise<void>;
|
|
2308
|
+
showModal(modal: any): Promise<void>;
|
|
2309
|
+
}
|
|
2310
|
+
declare function buildModalPayload(def: any): {
|
|
2311
|
+
custom_id: any;
|
|
2312
|
+
title: any;
|
|
2313
|
+
components: any;
|
|
2314
|
+
};
|
|
2315
|
+
|
|
2316
|
+
declare enum COMPONENT_TYPES {
|
|
2317
|
+
ACTION_ROW = 1,
|
|
2318
|
+
BUTTON = 2,
|
|
2319
|
+
STRING_SELECT = 3,
|
|
2320
|
+
TEXT_INPUT = 4,
|
|
2321
|
+
USER_SELECT = 5,
|
|
2322
|
+
ROLE_SELECT = 6,
|
|
2323
|
+
MENTIONABLE_SELECT = 7,
|
|
2324
|
+
CHANNEL_SELECT = 8
|
|
2325
|
+
}
|
|
2326
|
+
declare enum TEXT_INPUT_STYLES {
|
|
2327
|
+
SHORT = 1,
|
|
2328
|
+
PARAGRAPH = 2
|
|
2329
|
+
}
|
|
2330
|
+
|
|
2331
|
+
type ButtonStyleString = 'primary' | 'secondary' | 'success' | 'danger' | 'link' | 'premium';
|
|
2332
|
+
interface ButtonDef {
|
|
2333
|
+
customId?: string;
|
|
2334
|
+
url?: string;
|
|
2335
|
+
label?: string;
|
|
2336
|
+
style: ButtonStyleString | number;
|
|
2337
|
+
disabled?: boolean;
|
|
2338
|
+
emoji?: Partial<Emoji>;
|
|
2339
|
+
skuId?: string;
|
|
2340
|
+
execute?: (ctx: ComponentContext) => void | Promise<void>;
|
|
2341
|
+
}
|
|
2342
|
+
declare function resolveButtonStyle(style: string | number): number;
|
|
2343
|
+
declare function defineButton(def: ButtonDef): ButtonDef & {
|
|
2344
|
+
type: 'button';
|
|
2345
|
+
};
|
|
2346
|
+
interface StringSelectDef {
|
|
2347
|
+
customId: string;
|
|
2348
|
+
options: SelectOption[];
|
|
2349
|
+
placeholder?: string;
|
|
2350
|
+
minValues?: number;
|
|
2351
|
+
maxValues?: number;
|
|
2352
|
+
disabled?: boolean;
|
|
2353
|
+
execute: (ctx: ComponentContext<string[]>) => void | Promise<void>;
|
|
2354
|
+
}
|
|
2355
|
+
declare function defineStringSelect(def: StringSelectDef): StringSelectDef & {
|
|
2356
|
+
type: 'string_select';
|
|
2357
|
+
};
|
|
2358
|
+
interface UserSelectDef {
|
|
2359
|
+
customId: string;
|
|
2360
|
+
placeholder?: string;
|
|
2361
|
+
minValues?: number;
|
|
2362
|
+
maxValues?: number;
|
|
2363
|
+
disabled?: boolean;
|
|
2364
|
+
execute: (ctx: ComponentContext<User[]>) => void | Promise<void>;
|
|
2365
|
+
}
|
|
2366
|
+
declare function defineUserSelect(def: UserSelectDef): UserSelectDef & {
|
|
2367
|
+
type: 'user_select';
|
|
2368
|
+
};
|
|
2369
|
+
interface RoleSelectDef {
|
|
2370
|
+
customId: string;
|
|
2371
|
+
placeholder?: string;
|
|
2372
|
+
minValues?: number;
|
|
2373
|
+
maxValues?: number;
|
|
2374
|
+
disabled?: boolean;
|
|
2375
|
+
execute: (ctx: ComponentContext<Role[]>) => void | Promise<void>;
|
|
2376
|
+
}
|
|
2377
|
+
declare function defineRoleSelect(def: RoleSelectDef): RoleSelectDef & {
|
|
2378
|
+
type: 'role_select';
|
|
2379
|
+
};
|
|
2380
|
+
interface ChannelSelectDef {
|
|
2381
|
+
customId: string;
|
|
2382
|
+
channelTypes?: number[];
|
|
2383
|
+
placeholder?: string;
|
|
2384
|
+
minValues?: number;
|
|
2385
|
+
maxValues?: number;
|
|
2386
|
+
disabled?: boolean;
|
|
2387
|
+
execute: (ctx: ComponentContext<Partial<Channel>[]>) => void | Promise<void>;
|
|
2388
|
+
}
|
|
2389
|
+
declare function defineChannelSelect(def: ChannelSelectDef): ChannelSelectDef & {
|
|
2390
|
+
type: 'channel_select';
|
|
2391
|
+
};
|
|
2392
|
+
interface MentionableSelectDef {
|
|
2393
|
+
customId: string;
|
|
2394
|
+
placeholder?: string;
|
|
2395
|
+
minValues?: number;
|
|
2396
|
+
maxValues?: number;
|
|
2397
|
+
disabled?: boolean;
|
|
2398
|
+
execute: (ctx: ComponentContext<(User | Role)[]>) => void | Promise<void>;
|
|
2399
|
+
}
|
|
2400
|
+
declare function defineMentionableSelect(def: MentionableSelectDef): MentionableSelectDef & {
|
|
2401
|
+
type: 'mentionable_select';
|
|
2402
|
+
};
|
|
2403
|
+
interface ModalFieldDef<Required extends boolean = true> {
|
|
2404
|
+
id: string;
|
|
2405
|
+
type: TEXT_INPUT_STYLES;
|
|
2406
|
+
label: string;
|
|
2407
|
+
required?: Required;
|
|
2408
|
+
minLength?: number;
|
|
2409
|
+
maxLength?: number;
|
|
2410
|
+
placeholder?: string;
|
|
2411
|
+
value?: string;
|
|
2412
|
+
}
|
|
2413
|
+
declare const field: {
|
|
2414
|
+
short: <ID extends string, Req extends boolean = true>(id: ID, label: string, options?: {
|
|
2415
|
+
required?: Req;
|
|
2416
|
+
minLength?: number;
|
|
2417
|
+
maxLength?: number;
|
|
2418
|
+
placeholder?: string;
|
|
2419
|
+
value?: string;
|
|
2420
|
+
}) => ModalFieldDef<Req> & {
|
|
2421
|
+
id: ID;
|
|
2422
|
+
};
|
|
2423
|
+
paragraph: <ID extends string, Req extends boolean = true>(id: ID, label: string, options?: {
|
|
2424
|
+
required?: Req;
|
|
2425
|
+
minLength?: number;
|
|
2426
|
+
maxLength?: number;
|
|
2427
|
+
placeholder?: string;
|
|
2428
|
+
value?: string;
|
|
2429
|
+
}) => ModalFieldDef<Req> & {
|
|
2430
|
+
id: ID;
|
|
2431
|
+
};
|
|
2432
|
+
};
|
|
2433
|
+
type ResolveModalFields<F extends ReadonlyArray<ModalFieldDef<any>>> = {
|
|
2434
|
+
[K in F[number] as K['id']]: K['required'] extends false ? string | undefined : string;
|
|
2435
|
+
};
|
|
2436
|
+
interface ModalDef<F extends ReadonlyArray<ModalFieldDef<any>>> {
|
|
2437
|
+
customId: string;
|
|
2438
|
+
title: string;
|
|
2439
|
+
fields: F;
|
|
2440
|
+
execute: (ctx: ComponentContext<never, ResolveModalFields<F>>) => void | Promise<void>;
|
|
2441
|
+
}
|
|
2442
|
+
declare function defineModal<F extends ReadonlyArray<ModalFieldDef<any>>>(def: ModalDef<F>): ModalDef<F> & {
|
|
2443
|
+
type: 'modal';
|
|
2444
|
+
};
|
|
2445
|
+
|
|
2446
|
+
declare const ActionRow: {
|
|
2447
|
+
of: (...components: any[]) => {
|
|
2448
|
+
type: COMPONENT_TYPES;
|
|
2449
|
+
components: any[];
|
|
2450
|
+
};
|
|
2451
|
+
};
|
|
2452
|
+
|
|
2453
|
+
declare class ComponentManager {
|
|
2454
|
+
private client;
|
|
2455
|
+
private handlers;
|
|
2456
|
+
constructor(client: Client);
|
|
2457
|
+
register(...components: any[]): void;
|
|
2458
|
+
handleInteraction(raw: Record<string, any>): Promise<void>;
|
|
2459
|
+
}
|
|
2460
|
+
|
|
2461
|
+
declare abstract class BaseManager<T extends {
|
|
2462
|
+
id: string;
|
|
2463
|
+
}> {
|
|
2464
|
+
protected rest: ChameleonREST;
|
|
2465
|
+
protected store: TongueStore;
|
|
2466
|
+
constructor(rest: ChameleonREST, store: TongueStore);
|
|
2467
|
+
protected abstract endpoint(id: string): string;
|
|
2468
|
+
protected abstract build(raw: unknown): T;
|
|
2469
|
+
protected abstract storeKey: keyof TongueStore;
|
|
2470
|
+
fetch(id: string, force?: boolean): Promise<ChameleonAPIResult<T>>;
|
|
2471
|
+
}
|
|
2472
|
+
|
|
2473
|
+
declare const Colors: {
|
|
2474
|
+
readonly Blue: 2003199;
|
|
2475
|
+
readonly Purple: 10181046;
|
|
2476
|
+
readonly Orange: 16744272;
|
|
2477
|
+
readonly Pink: 16739201;
|
|
2478
|
+
readonly White: 16777215;
|
|
2479
|
+
readonly Blurple: 5793266;
|
|
2480
|
+
readonly Green: 5763719;
|
|
2481
|
+
readonly Yellow: 16705372;
|
|
2482
|
+
readonly Fuchsia: 15418782;
|
|
2483
|
+
readonly Red: 15548997;
|
|
2484
|
+
readonly Black: 2303786;
|
|
2485
|
+
readonly Transparent: 3092790;
|
|
2486
|
+
};
|
|
2487
|
+
declare class EmbedBuilder {
|
|
2488
|
+
private data;
|
|
2489
|
+
constructor(data?: Partial<Embed> | Record<string, unknown>);
|
|
2490
|
+
setTitle(title: string): this;
|
|
2491
|
+
setDescription(description: string): this;
|
|
2492
|
+
setColor(color: number): this;
|
|
2493
|
+
setURL(url: string): this;
|
|
2494
|
+
setTimestamp(ts?: Date | number): this;
|
|
2495
|
+
setFooter(text: string, iconUrl?: string): this;
|
|
2496
|
+
setAuthor(name: string, iconUrl?: string, url?: string): this;
|
|
2497
|
+
setImage(url: string): this;
|
|
2498
|
+
setThumbnail(url: string): this;
|
|
2499
|
+
addField(name: string, value: string, inline?: boolean): this;
|
|
2500
|
+
addFields(...fields: EmbedField[]): this;
|
|
2501
|
+
build(): Embed;
|
|
2502
|
+
toJSON(): Record<string, unknown>;
|
|
2503
|
+
}
|
|
2504
|
+
|
|
2505
|
+
declare class ButtonBuilder {
|
|
2506
|
+
private data;
|
|
2507
|
+
setCustomId(id: string): this;
|
|
2508
|
+
setLabel(label: string): this;
|
|
2509
|
+
setStyle(style: number): this;
|
|
2510
|
+
setEmoji(emoji: Partial<Emoji>): this;
|
|
2511
|
+
setDisabled(disabled?: boolean): this;
|
|
2512
|
+
setURL(url: string): this;
|
|
2513
|
+
build(): MessageComponent;
|
|
2514
|
+
toJSON(): MessageComponent;
|
|
2515
|
+
}
|
|
2516
|
+
declare class SelectMenuBuilder {
|
|
2517
|
+
private data;
|
|
2518
|
+
setCustomId(id: string): this;
|
|
2519
|
+
setPlaceholder(placeholder: string): this;
|
|
2520
|
+
setMinValues(min: number): this;
|
|
2521
|
+
setMaxValues(max: number): this;
|
|
2522
|
+
setDisabled(disabled?: boolean): this;
|
|
2523
|
+
addOption(option: SelectOption): this;
|
|
2524
|
+
addOptions(...options: SelectOption[]): this;
|
|
2525
|
+
setType(type: number): this;
|
|
2526
|
+
build(): MessageComponent;
|
|
2527
|
+
toJSON(): MessageComponent;
|
|
2528
|
+
}
|
|
2529
|
+
declare class TextInputBuilder {
|
|
2530
|
+
private data;
|
|
2531
|
+
setCustomId(id: string): this;
|
|
2532
|
+
setLabel(label: string): this;
|
|
2533
|
+
setStyle(style: number): this;
|
|
2534
|
+
setPlaceholder(placeholder: string): this;
|
|
2535
|
+
private _minLength?;
|
|
2536
|
+
private _maxLength?;
|
|
2537
|
+
private _required?;
|
|
2538
|
+
private _value?;
|
|
2539
|
+
setMinLength(length: number): this;
|
|
2540
|
+
setMaxLength(length: number): this;
|
|
2541
|
+
setRequired(required?: boolean): this;
|
|
2542
|
+
setValue(value: string): this;
|
|
2543
|
+
build(): MessageComponent;
|
|
2544
|
+
toJSON(): any;
|
|
2545
|
+
}
|
|
2546
|
+
declare class ActionRowBuilder {
|
|
2547
|
+
private data;
|
|
2548
|
+
addComponent(component: MessageComponent | {
|
|
2549
|
+
build(): MessageComponent;
|
|
2550
|
+
}): this;
|
|
2551
|
+
addComponents(...components: (MessageComponent | {
|
|
2552
|
+
build(): MessageComponent;
|
|
2553
|
+
})[]): this;
|
|
2554
|
+
build(): MessageComponent;
|
|
2555
|
+
toJSON(): MessageComponent;
|
|
2556
|
+
}
|
|
2557
|
+
declare class ModalBuilder {
|
|
2558
|
+
private _title;
|
|
2559
|
+
private _customId;
|
|
2560
|
+
private _components;
|
|
2561
|
+
setTitle(title: string): this;
|
|
2562
|
+
setCustomId(id: string): this;
|
|
2563
|
+
addComponent(row: MessageComponent | {
|
|
2564
|
+
build(): MessageComponent;
|
|
2565
|
+
}): this;
|
|
2566
|
+
addComponents(...rows: (MessageComponent | {
|
|
2567
|
+
build(): MessageComponent;
|
|
2568
|
+
})[]): this;
|
|
2569
|
+
build(): {
|
|
2570
|
+
title: string;
|
|
2571
|
+
custom_id: string;
|
|
2572
|
+
components: MessageComponent[];
|
|
2573
|
+
};
|
|
2574
|
+
toJSON(): {
|
|
2575
|
+
title: string;
|
|
2576
|
+
custom_id: string;
|
|
2577
|
+
components: MessageComponent[];
|
|
2578
|
+
};
|
|
2579
|
+
}
|
|
2580
|
+
|
|
2581
|
+
declare function buildUser(raw: Record<string, unknown>): User;
|
|
2582
|
+
declare function buildChannel(raw: Record<string, unknown>, guildId?: string): Channel;
|
|
2583
|
+
declare function buildGuild(raw: Record<string, unknown>): Guild;
|
|
2584
|
+
declare function buildRole(raw: Record<string, unknown>): Role;
|
|
2585
|
+
declare function buildMember(raw: Record<string, unknown>, guildId: string, cache: TongueStore): Member;
|
|
2586
|
+
declare function buildMessage(raw: Record<string, unknown>, cache: TongueStore, oldMessage?: Message): Message;
|
|
2587
|
+
declare function resolveChannel(channelId: string, cache: TongueStore): Channel | {
|
|
2588
|
+
id: string;
|
|
2589
|
+
};
|
|
2590
|
+
declare function resolveGuild(guildId: string, cache: TongueStore): Guild | {
|
|
2591
|
+
id: string;
|
|
2592
|
+
};
|
|
2593
|
+
declare function resolveUser(userId: string, cache: TongueStore): User | {
|
|
2594
|
+
id: string;
|
|
2595
|
+
};
|
|
2596
|
+
declare function resolveRole(roleId: string, cache: TongueStore): Role | {
|
|
2597
|
+
id: string;
|
|
2598
|
+
};
|
|
2599
|
+
|
|
2600
|
+
declare class UserManager extends BaseManager<User> {
|
|
2601
|
+
protected storeKey: "users";
|
|
2602
|
+
protected endpoint(id: string): string;
|
|
2603
|
+
protected build: typeof buildUser;
|
|
2604
|
+
}
|
|
2605
|
+
|
|
2606
|
+
declare class GuildManager extends BaseManager<Guild> {
|
|
2607
|
+
protected storeKey: "guilds";
|
|
2608
|
+
protected endpoint(id: string): string;
|
|
2609
|
+
protected build: typeof buildGuild;
|
|
2610
|
+
fetchChannels(guildId: string): Promise<ChameleonAPIResult<Channel[]>>;
|
|
2611
|
+
ban(guildId: string, userId: string, options?: {
|
|
2612
|
+
deleteMessageSeconds?: number;
|
|
2613
|
+
reason?: string;
|
|
2614
|
+
}): Promise<ChameleonAPIResult<void>>;
|
|
2615
|
+
unban(guildId: string, userId: string, reason?: string): Promise<ChameleonAPIResult<void>>;
|
|
2616
|
+
kick(guildId: string, userId: string, reason?: string): Promise<ChameleonAPIResult<void>>;
|
|
2617
|
+
}
|
|
2618
|
+
|
|
2619
|
+
declare class ChannelManager extends BaseManager<Channel> {
|
|
2620
|
+
protected storeKey: "channels";
|
|
2621
|
+
protected endpoint(id: string): string;
|
|
2622
|
+
protected build: typeof buildChannel;
|
|
2623
|
+
}
|
|
2624
|
+
|
|
2625
|
+
declare class MemberManager {
|
|
2626
|
+
protected rest: ChameleonREST;
|
|
2627
|
+
protected store: TongueStore;
|
|
2628
|
+
private guildId;
|
|
2629
|
+
constructor(rest: ChameleonREST, store: TongueStore, guildId: string);
|
|
2630
|
+
fetch(userId: string, force?: boolean): Promise<ChameleonAPIResult<Member>>;
|
|
2631
|
+
}
|
|
2632
|
+
|
|
2633
|
+
declare class MessageManager {
|
|
2634
|
+
protected rest: ChameleonREST;
|
|
2635
|
+
protected store: TongueStore;
|
|
2636
|
+
constructor(rest: ChameleonREST, store: TongueStore);
|
|
2637
|
+
fetch(channelId: string, messageId: string, force?: boolean): Promise<ChameleonAPIResult<Message>>;
|
|
2638
|
+
send(channelId: string, payload: string | Record<string, any>): Promise<ChameleonAPIResult<Message>>;
|
|
2639
|
+
edit(channelId: string, messageId: string, payload: string | Record<string, any>): Promise<ChameleonAPIResult<Message>>;
|
|
2640
|
+
delete(channelId: string, messageId: string): Promise<ChameleonAPIResult<void>>;
|
|
2641
|
+
}
|
|
2642
|
+
|
|
2643
|
+
interface AwaitMessagesOptions {
|
|
2644
|
+
filter?: (message: Message) => boolean;
|
|
2645
|
+
max?: number;
|
|
2646
|
+
time?: number;
|
|
2647
|
+
}
|
|
2648
|
+
interface AwaitComponentOptions {
|
|
2649
|
+
filter?: (ctx: ComponentContext$1) => boolean;
|
|
2650
|
+
time?: number;
|
|
2651
|
+
}
|
|
2652
|
+
declare class CollectorManager {
|
|
2653
|
+
private client;
|
|
2654
|
+
constructor(client: Client);
|
|
2655
|
+
/**
|
|
2656
|
+
* Waits for a specified number of messages in a given channel that pass the filter, if the time limit
|
|
2657
|
+
* is reached, resolves with the messages collected so far
|
|
2658
|
+
*/
|
|
2659
|
+
awaitMessages(channelId: string, options?: AwaitMessagesOptions): Promise<Message[]>;
|
|
2660
|
+
/**
|
|
2661
|
+
* waits for a single component interaction on a specific message,
|
|
2662
|
+
* resolves with the ComponentContext if successful, or null if it timed out
|
|
2663
|
+
*/
|
|
2664
|
+
awaitComponent(messageId: string, options?: AwaitComponentOptions): Promise<ComponentContext$1 | null>;
|
|
2665
|
+
}
|
|
2666
|
+
|
|
2667
|
+
interface ClientOptions<TIntents extends readonly IntentResolvable[]> {
|
|
2668
|
+
token: string;
|
|
2669
|
+
intents: TIntents;
|
|
2670
|
+
largeThreshold?: number;
|
|
2671
|
+
sharding?: 'auto' | {
|
|
2672
|
+
shards: number[];
|
|
2673
|
+
total: number;
|
|
2674
|
+
};
|
|
2675
|
+
cluster?: boolean;
|
|
2676
|
+
cache?: StoreOptions;
|
|
2677
|
+
debug?: boolean;
|
|
2678
|
+
}
|
|
2679
|
+
type EventMap = {
|
|
2680
|
+
[K in ChameleonEvent['type']]: Extract<ChameleonEvent, {
|
|
2681
|
+
type: K;
|
|
2682
|
+
}>;
|
|
2683
|
+
};
|
|
2684
|
+
type MiddlewareFn = (event: ChameleonEvent, next: () => void) => void | Promise<void>;
|
|
2685
|
+
declare class Client<TIntents extends readonly IntentResolvable[] = readonly IntentResolvable[]> {
|
|
2686
|
+
token: string;
|
|
2687
|
+
intents: number;
|
|
2688
|
+
cache: TongueStore;
|
|
2689
|
+
rest: ChameleonREST;
|
|
2690
|
+
gateways: Map<number, ChameleonGateway>;
|
|
2691
|
+
totalShards: number;
|
|
2692
|
+
gateway: ChameleonGateway;
|
|
2693
|
+
user: User | null;
|
|
2694
|
+
private unavailableGuilds;
|
|
2695
|
+
private outageGuilds;
|
|
2696
|
+
private pendingChunks;
|
|
2697
|
+
debug: boolean;
|
|
2698
|
+
commands: CommandManager;
|
|
2699
|
+
components: ComponentManager;
|
|
2700
|
+
users: UserManager;
|
|
2701
|
+
guilds: GuildManager;
|
|
2702
|
+
channels: ChannelManager;
|
|
2703
|
+
messages: MessageManager;
|
|
2704
|
+
collectors: CollectorManager;
|
|
2705
|
+
private listeners;
|
|
2706
|
+
private middlewares;
|
|
2707
|
+
constructor(options: ClientOptions<TIntents>);
|
|
2708
|
+
private resolveIntents;
|
|
2709
|
+
/**
|
|
2710
|
+
* register an event listener with full type-safety via discriminated unions
|
|
2711
|
+
*/
|
|
2712
|
+
on<K extends keyof EventMap>(event: K, listener: (data: EventMap[K]) => void): this;
|
|
2713
|
+
/**
|
|
2714
|
+
* remove an event listener
|
|
2715
|
+
*/
|
|
2716
|
+
off<K extends keyof EventMap>(event: K, listener: (data: EventMap[K]) => void): this;
|
|
2717
|
+
/**
|
|
2718
|
+
* register middleware that runs between dispatch and event handlers
|
|
2719
|
+
*/
|
|
2720
|
+
use(fn: MiddlewareFn): this;
|
|
2721
|
+
getShardForGuild(guildId: string): number;
|
|
2722
|
+
/**
|
|
2723
|
+
* request offline/large guild members from the Gateway.
|
|
2724
|
+
* This is used to lazy-load members into the cache or search for specific members
|
|
2725
|
+
*/
|
|
2726
|
+
requestGuildMembers(options: {
|
|
2727
|
+
guildId: string | string[];
|
|
2728
|
+
query?: string;
|
|
2729
|
+
limit: number;
|
|
2730
|
+
presences?: boolean;
|
|
2731
|
+
userIds?: string | string[];
|
|
2732
|
+
nonce?: string;
|
|
2733
|
+
}): void;
|
|
2734
|
+
/**
|
|
2735
|
+
* Connect to all Gateways
|
|
2736
|
+
*/
|
|
2737
|
+
login(): Promise<void>;
|
|
2738
|
+
/**
|
|
2739
|
+
* Gracefully disconnect from all Gateways
|
|
2740
|
+
*/
|
|
2741
|
+
destroy(): void;
|
|
2742
|
+
/**
|
|
2743
|
+
* Update presence/status across all shards
|
|
2744
|
+
*/
|
|
2745
|
+
presence(options: {
|
|
2746
|
+
status?: 'online' | 'dnd' | 'idle' | 'invisible' | 'offline';
|
|
2747
|
+
activities?: Array<{
|
|
2748
|
+
name: string;
|
|
2749
|
+
type: number;
|
|
2750
|
+
url?: string;
|
|
2751
|
+
state?: string;
|
|
2752
|
+
}>;
|
|
2753
|
+
afk?: boolean;
|
|
2754
|
+
since?: number | null;
|
|
2755
|
+
}): void;
|
|
2756
|
+
/**
|
|
2757
|
+
* dispatch an event through the middleware pipeline, then to listeners
|
|
2758
|
+
*/
|
|
2759
|
+
private dispatch;
|
|
2760
|
+
/**
|
|
2761
|
+
* emit to registered listeners
|
|
2762
|
+
*/
|
|
2763
|
+
private emit;
|
|
2764
|
+
private setupGateway;
|
|
2765
|
+
private handleDispatch;
|
|
2766
|
+
}
|
|
2767
|
+
|
|
2768
|
+
type PermissionFlag = typeof DISCORD_PERMISSIONS[keyof typeof DISCORD_PERMISSIONS];
|
|
2769
|
+
/**
|
|
2770
|
+
* Check if a permission string contains a specific flag
|
|
2771
|
+
*/
|
|
2772
|
+
declare function hasPermission(permissions: string | bigint, flag: bigint): boolean;
|
|
2773
|
+
/**
|
|
2774
|
+
* Check if a permission string contains ALL of the given flags
|
|
2775
|
+
*/
|
|
2776
|
+
declare function hasAllPermissions(permissions: string | bigint, ...flags: bigint[]): boolean;
|
|
2777
|
+
/**
|
|
2778
|
+
* Check if a permission string contains ANY of the given flags
|
|
2779
|
+
*/
|
|
2780
|
+
declare function hasAnyPermission(permissions: string | bigint, ...flags: bigint[]): boolean;
|
|
2781
|
+
/**
|
|
2782
|
+
* Combine multiple permission flags into one bigint
|
|
2783
|
+
*/
|
|
2784
|
+
declare function combinePermissions(...flags: bigint[]): bigint;
|
|
2785
|
+
/**
|
|
2786
|
+
* List all permission names present in a permission string
|
|
2787
|
+
*/
|
|
2788
|
+
declare function listPermissions(permissions: string | bigint): string[];
|
|
2789
|
+
|
|
2790
|
+
declare class Chameleon {
|
|
2791
|
+
static get lifespan(): {
|
|
2792
|
+
readonly ram: number;
|
|
2793
|
+
readonly cpu: number | undefined;
|
|
2794
|
+
};
|
|
2795
|
+
}
|
|
2796
|
+
|
|
2797
|
+
export { AUDIT_LOG_EVENT_TYPES, ActionRow, ActionRowBuilder, Activity, type ActivityInstance, type ActivityLocation, ActivityLocationKind, type Application, type ApplicationCommand, type ApplicationCommandOption, type ApplicationCommandOptionChoice, ApplicationCommandOptionType, ApplicationCommandType, ApplicationEventWebhookStatus, ApplicationFlag, ApplicationIntegrationType, type ApplicationIntegrationTypeConfiguration, type ApplicationRoleConnection, type ApplicationRoleConnectionMetadata, ApplicationRoleConnectionMetadataType, type Attachment, AttachmentFlag, type AuditLog, type AuditLogChange, type AuditLogEntry, type AutoModerationAction, type AutoModerationActionMetadata, AutoModerationActionType, AutoModerationEventType, AutoModerationKeywordPresetType, type AutoModerationRule, type AutoModerationTriggerMetadata, AutoModerationTriggerType, type AvatarDecorationData, BaseManager, ButtonBuilder, type ButtonDef, ButtonStyle, type ButtonStyleString, CHAMELEON_SELF_MAP, Chameleon, type ChameleonAPIResult, type ChameleonEvent, type ChameleonEventHandler, ChameleonGateway, type ChameleonGatewayOptions, ChameleonREST, type ChameleonRESTOptions, type ChameleonSelfKey, type Channel, ChannelFlag, ChannelManager, type ChannelMention, type ChannelSelectDef, ChannelType, Client, type ClientOptions, type Collectibles, CollectorManager, Colors, CommandContext, type CommandDef, CommandManager, ComponentContext, type ComponentHandler, ComponentManager, ComponentType, type Connection, DISCORD_GATEWAY_OPCODES, DISCORD_PERMISSIONS, DefaultMessageNotificationLevel, type DefaultReaction, type Embed, type EmbedAuthor, EmbedBuilder, type EmbedField, type EmbedFooter, type EmbedImage, type EmbedProvider, EmbedType, type EmbedVideo, type Emoji, type Entitlement, EntitlementType, type ExecuteFunction, ExplicitContentFilterLevel, ForumLayoutType, type ForumTag, type GatewayPayload, type GatewayStatus, type Guild, GuildInviteFlag, GuildManager, GuildMemberFlag, GuildNSFWLevel, type GuildScheduledEvent, type GuildScheduledEventEntityMetadata, GuildScheduledEventEntityType, GuildScheduledEventPrivacyLevel, GuildScheduledEventStatus, type GuildTemplate, type HttpMethod, type IncidentsData, type InstallParams, type Integration, type IntegrationAccount, IntegrationExpireBehavior, IntentBits, type IntentResolvable, type IntentString, Intents, type InteractionReplyOptions, type Invite, type InviteMetadata, type InviteStageInstance, InviteTargetType, InviteType, type Lobby, type LobbyMember, LobbyMemberFlag, MFALevel, type Member, MemberManager, type MentionableSelectDef, type Message, type MessageActivity, MessageActivityType, type MessageCall, type MessageComponent, MessageFlag, type MessageInteractionMetadata, MessageManager, type MessageReference, MessageReferenceType, type MessageSnapshot, MessageType, type MiddlewareFn, ModalBuilder, type ModalDef, type ModalFieldDef, type ModalHandler, type Nameplate, type OptionDef, type OptionType, type OptionalAuditEntryInfo, type Overwrite, type PartialChannel, type PartialGuild, type PermissionFlag, type Poll, type PollAnswer, type PollAnswerCount, type PollCreateRequest, type PollMedia, type PollResults, PremiumTier, PremiumType, type Reaction, type ReactionCountDetails, type ResolveModalFields, type ResolveOption, type ResolveOptionType, type ResolveOptions, type Role, type RoleSelectDef, type RoleSubscriptionData, type RoleTags, SelectMenuBuilder, type SelectOption, type SharedClientTheme, type Sku, SkuFlag, SkuType, SortOrderType, type SoundboardSound, type StageInstance, StagePrivacyLevel, type Sticker, StickerFormatType, type StickerItem, type StickerPack, StickerType, type StoreOptions, type StringSelectDef, type Subcommand, type Subscription, SubscriptionStatus, SystemChannelFlag, type Team, type TeamMember, TextInputBuilder, type ThreadMember, type ThreadMetadata, Tongue, TongueStore, type User, UserFlag, UserManager, type UserPrimaryGuild, type UserSelectDef, VerificationLevel, VideoQualityMode, VisibilityType, type Voice, type Webhook, WebhookType, type WelcomeScreen, type WelcomeScreenChannel, buildChannel, buildGuild, buildMember, buildMessage, buildModalPayload, buildRole, buildUser, combinePermissions, defineButton, defineChannelSelect, defineCommand, defineMentionableSelect, defineModal, defineRoleSelect, defineStringSelect, defineSubcommand, defineUserSelect, field, hasAllPermissions, hasAnyPermission, hasPermission, listPermissions, opt, resolveButtonStyle, resolveChannel, resolveGuild, resolveRole, resolveUser };
|