djs-selfbot-v13 3.1.7 → 3.1.8
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 +1 -1
- package/README.md +18 -45
- package/package.json +8 -37
- package/src/client/BaseClient.js +2 -3
- package/src/client/Client.js +187 -539
- package/src/client/actions/Action.js +18 -13
- package/src/client/actions/ActionsManager.js +7 -1
- package/src/client/actions/AutoModerationActionExecution.js +1 -0
- package/src/client/actions/AutoModerationRuleCreate.js +1 -0
- package/src/client/actions/AutoModerationRuleDelete.js +1 -0
- package/src/client/actions/AutoModerationRuleUpdate.js +1 -0
- package/src/client/actions/MessageCreate.js +0 -4
- package/src/client/actions/PresenceUpdate.js +17 -16
- package/src/client/websocket/WebSocketManager.js +11 -31
- package/src/client/websocket/WebSocketShard.js +39 -38
- package/src/client/websocket/handlers/CALL_CREATE.js +3 -3
- package/src/client/websocket/handlers/CALL_DELETE.js +2 -2
- package/src/client/websocket/handlers/CALL_UPDATE.js +2 -2
- package/src/client/websocket/handlers/CHANNEL_RECIPIENT_ADD.js +16 -13
- package/src/client/websocket/handlers/CHANNEL_RECIPIENT_REMOVE.js +11 -11
- package/src/client/websocket/handlers/GUILD_CREATE.js +7 -0
- package/src/client/websocket/handlers/INTERACTION_MODAL_CREATE.js +1 -0
- package/src/client/websocket/handlers/READY.js +47 -137
- package/src/client/websocket/handlers/RELATIONSHIP_ADD.js +7 -5
- package/src/client/websocket/handlers/RELATIONSHIP_REMOVE.js +6 -4
- package/src/client/websocket/handlers/RELATIONSHIP_UPDATE.js +32 -9
- package/src/client/websocket/handlers/USER_GUILD_SETTINGS_UPDATE.js +2 -8
- package/src/client/websocket/handlers/USER_NOTE_UPDATE.js +1 -1
- package/src/client/websocket/handlers/USER_REQUIRED_ACTION_UPDATE.js +78 -0
- package/src/client/websocket/handlers/USER_SETTINGS_UPDATE.js +1 -5
- package/src/client/websocket/handlers/VOICE_CHANNEL_STATUS_UPDATE.js +12 -0
- package/src/client/websocket/handlers/index.js +15 -20
- package/src/errors/Messages.js +24 -69
- package/src/index.js +12 -43
- package/src/managers/ApplicationCommandManager.js +9 -12
- package/src/managers/ApplicationCommandPermissionsManager.js +3 -11
- package/src/managers/ChannelManager.js +3 -4
- package/src/managers/ClientUserSettingManager.js +161 -279
- package/src/managers/GuildBanManager.js +1 -1
- package/src/managers/GuildChannelManager.js +2 -0
- package/src/managers/GuildForumThreadManager.js +22 -28
- package/src/managers/GuildMemberManager.js +40 -216
- package/src/managers/GuildSettingManager.js +22 -15
- package/src/managers/MessageManager.js +42 -44
- package/src/managers/PermissionOverwriteManager.js +1 -1
- package/src/managers/ReactionUserManager.js +5 -5
- package/src/managers/RelationshipManager.js +81 -74
- package/src/managers/ThreadManager.js +12 -45
- package/src/managers/ThreadMemberManager.js +1 -1
- package/src/managers/UserManager.js +6 -10
- package/src/managers/UserNoteManager.js +53 -0
- package/src/rest/APIRequest.js +42 -20
- package/src/rest/DiscordAPIError.js +17 -16
- package/src/rest/RESTManager.js +1 -21
- package/src/rest/RequestHandler.js +35 -21
- package/src/structures/ApplicationCommand.js +19 -456
- package/src/structures/ApplicationRoleConnectionMetadata.js +3 -0
- package/src/structures/AutoModerationRule.js +5 -5
- package/src/structures/AutocompleteInteraction.js +1 -0
- package/src/structures/BaseGuildTextChannel.js +10 -12
- package/src/structures/BaseGuildVoiceChannel.js +16 -18
- package/src/structures/{Call.js → CallState.js} +17 -12
- package/src/structures/CategoryChannel.js +2 -0
- package/src/structures/Channel.js +2 -3
- package/src/structures/ClientPresence.js +12 -8
- package/src/structures/ClientUser.js +117 -336
- package/src/structures/ContextMenuInteraction.js +1 -1
- package/src/structures/DMChannel.js +29 -92
- package/src/structures/ForumChannel.js +0 -10
- package/src/structures/GroupDMChannel.js +387 -0
- package/src/structures/Guild.js +135 -271
- package/src/structures/GuildAuditLogs.js +0 -5
- package/src/structures/GuildChannel.js +16 -2
- package/src/structures/GuildMember.js +27 -145
- package/src/structures/Interaction.js +1 -62
- package/src/structures/Invite.js +35 -52
- package/src/structures/Message.js +228 -202
- package/src/structures/MessageAttachment.js +11 -0
- package/src/structures/MessageButton.js +1 -67
- package/src/structures/MessageEmbed.js +1 -1
- package/src/structures/MessageMentions.js +3 -2
- package/src/structures/MessagePayload.js +4 -46
- package/src/structures/MessageReaction.js +1 -1
- package/src/structures/MessageSelectMenu.js +1 -252
- package/src/structures/Modal.js +75 -180
- package/src/structures/Presence.js +2 -2
- package/src/structures/RichPresence.js +14 -34
- package/src/structures/Role.js +18 -2
- package/src/structures/SelectMenuInteraction.js +2 -151
- package/src/structures/Team.js +0 -49
- package/src/structures/TextInputComponent.js +0 -70
- package/src/structures/ThreadChannel.js +0 -19
- package/src/structures/User.js +117 -345
- package/src/structures/UserContextMenuInteraction.js +2 -2
- package/src/structures/VoiceState.js +74 -39
- package/src/structures/WebEmbed.js +38 -52
- package/src/structures/Webhook.js +17 -11
- package/src/structures/interfaces/Application.js +146 -23
- package/src/structures/interfaces/TextBasedChannel.js +411 -256
- package/src/util/ApplicationFlags.js +1 -1
- package/src/util/AttachmentFlags.js +38 -0
- package/src/util/Constants.js +106 -284
- package/src/util/Formatters.js +16 -2
- package/src/util/InviteFlags.js +29 -0
- package/src/util/LimitedCollection.js +1 -1
- package/src/util/Options.js +48 -68
- package/src/util/Permissions.js +5 -0
- package/src/util/PurchasedFlags.js +2 -0
- package/src/util/RemoteAuth.js +221 -356
- package/src/util/RoleFlags.js +37 -0
- package/src/util/Sweepers.js +1 -1
- package/src/util/Util.js +76 -36
- package/typings/enums.d.ts +18 -73
- package/typings/index.d.ts +873 -1225
- package/typings/rawDataTypes.d.ts +68 -9
- package/src/client/actions/InteractionCreate.js +0 -115
- package/src/client/websocket/handlers/APPLICATION_COMMAND_AUTOCOMPLETE_RESPONSE.js +0 -23
- package/src/client/websocket/handlers/GUILD_APPLICATION_COMMANDS_UPDATE.js +0 -11
- package/src/client/websocket/handlers/GUILD_MEMBER_LIST_UPDATE.js +0 -55
- package/src/client/websocket/handlers/GUILD_SOUNDBOARD_SOUNDS_UPDATE.js +0 -0
- package/src/client/websocket/handlers/GUILD_SOUNDBOARD_SOUND_CREATE.js +0 -0
- package/src/client/websocket/handlers/GUILD_SOUNDBOARD_SOUND_DELETE.js +0 -0
- package/src/client/websocket/handlers/GUILD_SOUNDBOARD_SOUND_UPDATE.js +0 -0
- package/src/client/websocket/handlers/INTERACTION_CREATE.js +0 -16
- package/src/client/websocket/handlers/INTERACTION_FAILURE.js +0 -18
- package/src/client/websocket/handlers/INTERACTION_SUCCESS.js +0 -30
- package/src/client/websocket/handlers/MESSAGE_ACK.js +0 -16
- package/src/client/websocket/handlers/SOUNDBOARD_SOUNDS.js +0 -0
- package/src/client/websocket/handlers/VOICE_CHANNEL_EFFECT_SEND.js +0 -0
- package/src/managers/DeveloperPortalManager.js +0 -104
- package/src/managers/GuildApplicationCommandManager.js +0 -28
- package/src/managers/GuildFolderManager.js +0 -24
- package/src/managers/SessionManager.js +0 -57
- package/src/rest/CaptchaSolver.js +0 -132
- package/src/structures/ClientApplication.js +0 -204
- package/src/structures/DeveloperPortalApplication.js +0 -520
- package/src/structures/GuildFolder.js +0 -75
- package/src/structures/InteractionResponse.js +0 -114
- package/src/structures/PartialGroupDMChannel.js +0 -433
- package/src/structures/Session.js +0 -81
- package/src/util/Voice.js +0 -1456
- package/src/util/arRPC/index.js +0 -229
- package/src/util/arRPC/process/detectable.json +0 -1
- package/src/util/arRPC/process/index.js +0 -102
- package/src/util/arRPC/process/native/index.js +0 -5
- package/src/util/arRPC/process/native/linux.js +0 -37
- package/src/util/arRPC/process/native/win32.js +0 -25
- package/src/util/arRPC/transports/ipc.js +0 -281
- package/src/util/arRPC/transports/websocket.js +0 -128
package/typings/index.d.ts
CHANGED
|
@@ -2,7 +2,6 @@ import {
|
|
|
2
2
|
blockQuote,
|
|
3
3
|
bold,
|
|
4
4
|
channelMention,
|
|
5
|
-
chatInputApplicationCommandMention,
|
|
6
5
|
codeBlock,
|
|
7
6
|
ContextMenuCommandBuilder,
|
|
8
7
|
formatEmoji,
|
|
@@ -21,7 +20,6 @@ import {
|
|
|
21
20
|
underscore,
|
|
22
21
|
userMention,
|
|
23
22
|
} from '@discordjs/builders';
|
|
24
|
-
import { VoiceConnection } from '@discordjs/voice';
|
|
25
23
|
import { Collection } from '@discordjs/collection';
|
|
26
24
|
import {
|
|
27
25
|
APIActionRowComponent,
|
|
@@ -47,13 +45,13 @@ import {
|
|
|
47
45
|
APISelectMenuComponent,
|
|
48
46
|
APITemplateSerializedSourceGuild,
|
|
49
47
|
APIUser,
|
|
50
|
-
MessageActivityType,
|
|
51
|
-
GatewayOpcodes,
|
|
52
48
|
GatewayVoiceServerUpdateDispatchData,
|
|
53
49
|
GatewayVoiceStateUpdateDispatchData,
|
|
50
|
+
MessageActivityType,
|
|
54
51
|
RESTPostAPIApplicationCommandsJSONBody,
|
|
55
52
|
Snowflake,
|
|
56
53
|
LocalizationMap,
|
|
54
|
+
LocaleString,
|
|
57
55
|
APIGuildMember,
|
|
58
56
|
APIChannel,
|
|
59
57
|
} from 'discord-api-types/v9';
|
|
@@ -74,10 +72,6 @@ import {
|
|
|
74
72
|
AutoModerationRuleKeywordPresetTypes,
|
|
75
73
|
AutoModerationRuleTriggerTypes,
|
|
76
74
|
ChannelTypes,
|
|
77
|
-
RelationshipTypes,
|
|
78
|
-
localeSetting,
|
|
79
|
-
stickerAnimationMode,
|
|
80
|
-
DMScanLevel,
|
|
81
75
|
DefaultMessageNotificationLevels,
|
|
82
76
|
ExplicitContentFilterLevels,
|
|
83
77
|
InteractionResponseTypes,
|
|
@@ -88,9 +82,6 @@ import {
|
|
|
88
82
|
MessageComponentTypes,
|
|
89
83
|
MessageTypes,
|
|
90
84
|
MFALevels,
|
|
91
|
-
NitroType as NitroTypes,
|
|
92
|
-
HypeSquadType as HypeSquadTypes,
|
|
93
|
-
localeSetting as localeSettings,
|
|
94
85
|
NSFWLevels,
|
|
95
86
|
OverwriteTypes,
|
|
96
87
|
PremiumTiers,
|
|
@@ -103,12 +94,13 @@ import {
|
|
|
103
94
|
GuildScheduledEventEntityTypes,
|
|
104
95
|
GuildScheduledEventStatuses,
|
|
105
96
|
GuildScheduledEventPrivacyLevels,
|
|
106
|
-
HypeSquadType,
|
|
107
97
|
VideoQualityModes,
|
|
108
98
|
SortOrderType,
|
|
109
|
-
SelectMenuComponentTypes,
|
|
110
99
|
ForumLayoutType,
|
|
111
100
|
ApplicationRoleConnectionMetadataTypes,
|
|
101
|
+
RelationshipTypes,
|
|
102
|
+
SelectMenuComponentTypes,
|
|
103
|
+
InviteType,
|
|
112
104
|
} from './enums';
|
|
113
105
|
import {
|
|
114
106
|
APIApplicationRoleConnectionMetadata,
|
|
@@ -120,7 +112,6 @@ import {
|
|
|
120
112
|
RawApplicationData,
|
|
121
113
|
RawBaseGuildData,
|
|
122
114
|
RawChannelData,
|
|
123
|
-
RawClientApplicationData,
|
|
124
115
|
RawDMChannelData,
|
|
125
116
|
RawEmojiData,
|
|
126
117
|
RawGuildAuditLogData,
|
|
@@ -173,106 +164,9 @@ import {
|
|
|
173
164
|
RawWidgetData,
|
|
174
165
|
RawWidgetMemberData,
|
|
175
166
|
} from './rawDataTypes';
|
|
176
|
-
// @ts-ignore
|
|
177
|
-
//#region Classes
|
|
178
|
-
|
|
179
|
-
export class SessionManager extends CachedManager<string, Session, any> {
|
|
180
|
-
private constructor(client: Client, iterable: Iterable<any>);
|
|
181
|
-
public fetch(): Promise<SessionManager>;
|
|
182
|
-
public logoutAllDevices(mfaCode?: string): Promise<undefined>;
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
export class BillingManager extends BaseManager {
|
|
186
|
-
constructor(client: Client);
|
|
187
|
-
public paymentSources: Collection<Snowflake, object>;
|
|
188
|
-
public fetchPaymentSources(): Promise<Collection<Snowflake, object>>;
|
|
189
|
-
public guildBoosts: Collection<Snowflake, GuildBoost>;
|
|
190
|
-
public fetchGuildBoosts(): Promise<Collection<Snowflake, GuildBoost>>;
|
|
191
|
-
public currentSubscription: Collection<Snowflake, object>;
|
|
192
|
-
public fetchCurrentSubscription(): Promise<Collection<Snowflake, object>>;
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
export class GuildBoost extends Base {
|
|
196
|
-
constructor(client: Client, data: object);
|
|
197
|
-
public id: Snowflake;
|
|
198
|
-
public guildId?: Snowflake;
|
|
199
|
-
public readonly guild: Guild | null;
|
|
200
|
-
public subscriptionId: Snowflake;
|
|
201
|
-
public premiumGuildSubscriptionId?: Snowflake;
|
|
202
|
-
public ended?: boolean;
|
|
203
|
-
public canceled: boolean;
|
|
204
|
-
public cooldownEndsAt: Date;
|
|
205
|
-
public unsubscribe(): Promise<this>;
|
|
206
|
-
public subscribe(guild: GuildResolvable): Promise<this>;
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
export class Session extends Base {
|
|
210
|
-
constructor(client: Client);
|
|
211
|
-
public id?: string;
|
|
212
|
-
public clientInfo?: SessionClientInfo;
|
|
213
|
-
public readonly createdTimestamp: number;
|
|
214
|
-
public readonly createdAt: Date;
|
|
215
|
-
public logout(mfaCode?: string): Promise<undefined>;
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
export interface SessionClientInfo {
|
|
219
|
-
location?: string;
|
|
220
|
-
platform?: string;
|
|
221
|
-
os?: string;
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
export class DiscordAuthWebsocket extends EventEmitter {
|
|
225
|
-
constructor(options?: DiscordAuthWebsocketOptions);
|
|
226
|
-
public fingerprint?: string;
|
|
227
|
-
public heartbeatInterval?: number;
|
|
228
|
-
public ws?: WebSocket;
|
|
229
|
-
public token?: string;
|
|
230
|
-
public realToken?: string;
|
|
231
|
-
public user?: RawUserData;
|
|
232
|
-
public captchaCache?: Captcha;
|
|
233
|
-
public captchaHandler(data: Captcha): Promise<string>;
|
|
234
|
-
public readonly exprireTime: string;
|
|
235
|
-
public connect(client?: Client): void;
|
|
236
|
-
public destroy(): void;
|
|
237
|
-
public generateQR(): void;
|
|
238
|
-
public on(event: 'ready', listener: (fingerprint: string, authURL: string) => void): this;
|
|
239
|
-
public on(event: 'finish', listener: (user: RawUserData, token: string) => void): this;
|
|
240
|
-
public on(event: 'cancel' | 'pending', listener: (user: RawUserData) => void): this;
|
|
241
|
-
public on(event: 'closed', listener: (token?: string) => void): this;
|
|
242
|
-
public on(event: string, listener: (...args: any[]) => Awaitable<void>): this;
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
export class DiscordRPCServer extends EventEmitter {
|
|
246
|
-
constructor(client: Client, debug?: boolean);
|
|
247
|
-
public debug?: boolean;
|
|
248
|
-
public client: Client;
|
|
249
|
-
public on(event: 'activity', listener: (data: RPCActivityData) => void): this;
|
|
250
|
-
}
|
|
251
|
-
|
|
252
|
-
export class Call extends Base {
|
|
253
|
-
constructor(client: Client, data: object);
|
|
254
|
-
public channelId: Snowflake;
|
|
255
|
-
public ringing: Collection<Snowflake, User>;
|
|
256
|
-
public region?: string;
|
|
257
|
-
public readonly channel: PartialDMChannel | PartialGroupDMChannel;
|
|
258
|
-
public setVoiceRegion(region: string): Promise<undefined>;
|
|
259
|
-
}
|
|
260
167
|
|
|
261
|
-
|
|
262
|
-
activity?: RichPresence;
|
|
263
|
-
pid: number;
|
|
264
|
-
socketId: string;
|
|
265
|
-
}
|
|
168
|
+
//#region Classes
|
|
266
169
|
|
|
267
|
-
export interface DiscordAuthWebsocketOptions {
|
|
268
|
-
debug: boolean;
|
|
269
|
-
hiddenLog: boolean;
|
|
270
|
-
autoLogin: boolean;
|
|
271
|
-
failIfError: boolean;
|
|
272
|
-
generateQR: boolean;
|
|
273
|
-
userAgent?: string;
|
|
274
|
-
wsProperties?: object;
|
|
275
|
-
}
|
|
276
170
|
// RPC by aiko-chan-ai
|
|
277
171
|
export interface RichButton {
|
|
278
172
|
name: string;
|
|
@@ -298,9 +192,9 @@ export class RichPresence {
|
|
|
298
192
|
public type: ActivityType;
|
|
299
193
|
public url: string | null;
|
|
300
194
|
public ipc: boolean;
|
|
301
|
-
public setAssetsLargeImage(image?:
|
|
195
|
+
public setAssetsLargeImage(image?: string): this;
|
|
302
196
|
public setAssetsLargeText(text?: string): this;
|
|
303
|
-
public setAssetsSmallImage(image?:
|
|
197
|
+
public setAssetsSmallImage(image?: string): this;
|
|
304
198
|
public setAssetsSmallText(text?: string): this;
|
|
305
199
|
public setName(name?: string): this;
|
|
306
200
|
public setURL(url?: string): this;
|
|
@@ -319,11 +213,31 @@ export class RichPresence {
|
|
|
319
213
|
image1: string,
|
|
320
214
|
image2: string,
|
|
321
215
|
): Promise<ExternalAssets[]>;
|
|
322
|
-
public static getUUID(): string;
|
|
323
216
|
public toJSON(): object;
|
|
324
217
|
public toString(): string;
|
|
325
218
|
}
|
|
326
219
|
|
|
220
|
+
export class DiscordAuthWebsocket extends EventEmitter {
|
|
221
|
+
constructor();
|
|
222
|
+
public token: string;
|
|
223
|
+
public readonly user: {
|
|
224
|
+
id: Snowflake;
|
|
225
|
+
username: string;
|
|
226
|
+
discriminator: number;
|
|
227
|
+
avatar: string;
|
|
228
|
+
};
|
|
229
|
+
public readonly exprire: Date;
|
|
230
|
+
public readonly AuthURL: string;
|
|
231
|
+
public connect(client?: Client): Promise<void>;
|
|
232
|
+
public destroy(): void;
|
|
233
|
+
public generateQR(): void;
|
|
234
|
+
public on(event: 'ready', listener: (client: this) => void): this;
|
|
235
|
+
public on(event: 'finish', listener: (token: string) => void): this;
|
|
236
|
+
public on(event: 'cancel' | 'pending', listener: (user: RawUserData) => void): this;
|
|
237
|
+
public on(event: 'closed', listener: () => void): this;
|
|
238
|
+
public on(event: string, listener: (...args: any[]) => Awaitable<void>): this;
|
|
239
|
+
}
|
|
240
|
+
|
|
327
241
|
export interface ExternalAssets {
|
|
328
242
|
url: string;
|
|
329
243
|
external_asset_path: string;
|
|
@@ -420,6 +334,11 @@ export class PremiumUsageFlags extends BitField<PremiumUsageFlagsString> {
|
|
|
420
334
|
public static resolve(bit?: BitFieldResolvable<PremiumUsageFlagsString, number>): number;
|
|
421
335
|
}
|
|
422
336
|
|
|
337
|
+
export class InviteFlags extends BitField<InviteFlagsString> {
|
|
338
|
+
public static FLAGS: Record<InviteFlagsString, number>;
|
|
339
|
+
public static resolve(bit?: BitFieldResolvable<InviteFlagsString, number>): number;
|
|
340
|
+
}
|
|
341
|
+
|
|
423
342
|
export abstract class AnonymousGuild extends BaseGuild {
|
|
424
343
|
protected constructor(client: Client, data: RawAnonymousGuildData, immediatePatch?: boolean);
|
|
425
344
|
public banner: string | null;
|
|
@@ -442,103 +361,43 @@ export abstract class Application extends Base {
|
|
|
442
361
|
public id: Snowflake;
|
|
443
362
|
public name: string | null;
|
|
444
363
|
public roleConnectionsVerificationURL: string | null;
|
|
445
|
-
public
|
|
446
|
-
/** @deprecated This method is deprecated as it is unsupported and will be removed in the next major version. */
|
|
447
|
-
public fetchAssets(): Promise<ApplicationAsset[]>;
|
|
448
|
-
public invite(guildID: Snowflake, permissions?: PermissionResolvable, captcha?: string): Promise<undefined>;
|
|
449
|
-
public iconURL(options?: StaticImageURLOptions): string | null;
|
|
450
|
-
public toJSON(): unknown;
|
|
451
|
-
public toString(): string | null;
|
|
452
|
-
}
|
|
453
|
-
|
|
454
|
-
export interface Tester {
|
|
455
|
-
state: number;
|
|
456
|
-
user: User;
|
|
457
|
-
}
|
|
458
|
-
|
|
459
|
-
export interface ApplicationEditData {
|
|
460
|
-
name?: string;
|
|
461
|
-
description?: string;
|
|
462
|
-
icon?: BufferResolvable | Base64Resolvable;
|
|
463
|
-
cover?: BufferResolvable | Base64Resolvable;
|
|
464
|
-
botPublic?: boolean;
|
|
465
|
-
botRequireCodeGrant?: boolean;
|
|
466
|
-
TermsOfService?: string;
|
|
467
|
-
PrivacyPolicy?: string;
|
|
468
|
-
flags?: number;
|
|
469
|
-
redirectURIs?: string[];
|
|
470
|
-
tags?: string[];
|
|
471
|
-
}
|
|
472
|
-
export class DeveloperPortalApplication extends Base {
|
|
473
|
-
private constructor(client: Client, data: object);
|
|
364
|
+
public approximateGuildCount: number | null;
|
|
474
365
|
public botPublic: boolean | null;
|
|
475
366
|
public botRequireCodeGrant: boolean | null;
|
|
476
367
|
public commands: ApplicationCommandManager;
|
|
477
368
|
public cover: string | null;
|
|
478
369
|
public flags: Readonly<ApplicationFlags>;
|
|
370
|
+
public guildId: Snowflake | null;
|
|
371
|
+
public readonly guild: Guild | null;
|
|
479
372
|
public tags: string[];
|
|
480
373
|
public installParams: ClientApplicationInstallParams | null;
|
|
481
374
|
public customInstallURL: string | null;
|
|
482
375
|
public owner: User | Team | null;
|
|
483
376
|
public readonly partial: boolean;
|
|
484
377
|
public rpcOrigins: string[];
|
|
485
|
-
public
|
|
486
|
-
public
|
|
487
|
-
public description: string | null;
|
|
488
|
-
public icon: string | null;
|
|
489
|
-
public id: Snowflake;
|
|
490
|
-
public name: string | null;
|
|
491
|
-
public redirectURIs: string[];
|
|
492
|
-
public interactionEndpointURL: string | null;
|
|
493
|
-
public publicKey: string;
|
|
494
|
-
public testers: Collection<Snowflake, Tester>;
|
|
495
|
-
public TermsOfService: string | null;
|
|
496
|
-
public PrivacyPolicy: string | null;
|
|
497
|
-
public roleConnectionsVerificationURL: string | null;
|
|
498
|
-
public fetch(): Promise<ClientApplication>;
|
|
378
|
+
public fetch(): Promise<Application>;
|
|
379
|
+
public fetchRoleConnectionMetadataRecords(): Promise<ApplicationRoleConnectionMetadata[]>;
|
|
499
380
|
public coverURL(options?: StaticImageURLOptions): string | null;
|
|
500
381
|
/** @deprecated This method is deprecated as it is unsupported and will be removed in the next major version. */
|
|
501
382
|
public fetchAssets(): Promise<ApplicationAsset[]>;
|
|
502
383
|
public iconURL(options?: StaticImageURLOptions): string | null;
|
|
503
384
|
public toJSON(): unknown;
|
|
504
385
|
public toString(): string | null;
|
|
505
|
-
public fetchTesters(): Promise<this>;
|
|
506
|
-
public addTester(username: string, discriminator: string): Promise<DeveloperPortalApplication>;
|
|
507
|
-
public deleteTester(user: UserResolvable): Promise<DeveloperPortalApplication>;
|
|
508
|
-
public edit(data: ApplicationEditData): Promise<DeveloperPortalApplication>;
|
|
509
|
-
public createBot(): Promise<DeveloperPortalApplication>;
|
|
510
|
-
public resetClientSecret(MFACode?: number): Promise<string>;
|
|
511
|
-
public resetBotToken(MFACode?: number): Promise<string>;
|
|
512
|
-
public delete(MFACode?: number): Promise<undefined>;
|
|
513
|
-
public addAsset(image: BufferResolvable | Base64Resolvable, name: string): Promise<ApplicationAsset>;
|
|
514
|
-
public deleteAsset(id: string): Promise<undefined>;
|
|
515
|
-
public fetchRoleConnectionMetadataRecords(): Promise<ApplicationRoleConnectionMetadata[]>;
|
|
516
|
-
public editRoleConnectionMetadataRecords(
|
|
517
|
-
records: ApplicationRoleConnectionMetadataEditOptions[],
|
|
518
|
-
): Promise<ApplicationRoleConnectionMetadata[]>;
|
|
519
|
-
}
|
|
520
|
-
|
|
521
|
-
export class DeveloperPortalManager extends BaseManager {
|
|
522
|
-
constructor(client: Client);
|
|
523
|
-
public applications: Collection<Snowflake, DeveloperPortalApplication>;
|
|
524
|
-
public teams: Collection<Snowflake, Team>;
|
|
525
|
-
public fetch(): Promise<DeveloperPortalManager>;
|
|
526
|
-
public createTeam(name: string): Promise<Team>;
|
|
527
|
-
public createApplication(name: string, teamId?: Team | Snowflake): Promise<DeveloperPortalApplication>;
|
|
528
|
-
public deleteApplication(id: Snowflake, MFACode?: number): Promise<undefined>;
|
|
529
386
|
}
|
|
530
387
|
|
|
531
388
|
export class ApplicationCommand<PermissionsFetchType = {}> extends Base {
|
|
532
|
-
private constructor(client: Client, data: RawApplicationCommandData);
|
|
389
|
+
private constructor(client: Client, data: RawApplicationCommandData, guild?: Guild, guildId?: Snowflake);
|
|
533
390
|
public applicationId: Snowflake;
|
|
534
391
|
public readonly createdAt: Date;
|
|
535
392
|
public readonly createdTimestamp: number;
|
|
536
393
|
/** @deprecated Use {@link defaultMemberPermissions} and {@link dmPermission} instead. */
|
|
537
394
|
public defaultPermission: boolean;
|
|
395
|
+
public defaultMemberPermissions: Readonly<Permissions> | null;
|
|
538
396
|
public description: string;
|
|
539
397
|
public descriptionLocalizations: LocalizationMap | null;
|
|
540
398
|
public descriptionLocalized: string | null;
|
|
541
|
-
public
|
|
399
|
+
public dmPermission: boolean | null;
|
|
400
|
+
public guild: Guild | null;
|
|
542
401
|
public guildId: Snowflake | null;
|
|
543
402
|
public readonly manager: ApplicationCommandManager;
|
|
544
403
|
public id: Snowflake;
|
|
@@ -587,13 +446,6 @@ export class ApplicationCommand<PermissionsFetchType = {}> extends Base {
|
|
|
587
446
|
private static transformOption(option: ApplicationCommandOptionData, received?: boolean): unknown;
|
|
588
447
|
private static transformCommand(command: ApplicationCommandData): RESTPostAPIApplicationCommandsJSONBody;
|
|
589
448
|
private static isAPICommandData(command: object): command is RESTPostAPIApplicationCommandsJSONBody;
|
|
590
|
-
// Add
|
|
591
|
-
public static sendSlashCommand(
|
|
592
|
-
message: Message,
|
|
593
|
-
subCommandArray?: string[],
|
|
594
|
-
options?: any[],
|
|
595
|
-
): Promise<InteractionResponse>;
|
|
596
|
-
public static sendContextMenu(message: Message): Promise<InteractionResponse>;
|
|
597
449
|
}
|
|
598
450
|
|
|
599
451
|
export class ApplicationRoleConnectionMetadata {
|
|
@@ -768,6 +620,7 @@ export class BaseGuildEmoji extends Emoji {
|
|
|
768
620
|
export class BaseGuildTextChannel extends TextBasedChannelMixin(GuildChannel) {
|
|
769
621
|
protected constructor(guild: Guild, data?: RawGuildChannelData, client?: Client, immediatePatch?: boolean);
|
|
770
622
|
public defaultAutoArchiveDuration?: ThreadAutoArchiveDuration;
|
|
623
|
+
public defaultThreadRateLimitPerUser: number | null;
|
|
771
624
|
public rateLimitPerUser: number | null;
|
|
772
625
|
public nsfw: boolean;
|
|
773
626
|
public threads: GuildTextThreadManager<AllowedThreadTypeForTextChannel | AllowedThreadTypeForNewsChannel>;
|
|
@@ -794,6 +647,7 @@ export class BaseGuildVoiceChannel extends TextBasedChannelMixin(GuildChannel, [
|
|
|
794
647
|
public rateLimitPerUser: number | null;
|
|
795
648
|
public userLimit: number;
|
|
796
649
|
public videoQualityMode: VideoQualityMode | null;
|
|
650
|
+
public status?: string;
|
|
797
651
|
public createInvite(options?: CreateInviteOptions): Promise<Invite>;
|
|
798
652
|
public setRTCRegion(rtcRegion: string | null, reason?: string): Promise<this>;
|
|
799
653
|
public fetchInvites(cache?: boolean): Promise<Collection<string, Invite>>;
|
|
@@ -885,7 +739,6 @@ export class CategoryChannel extends GuildChannel {
|
|
|
885
739
|
name: string,
|
|
886
740
|
options: CategoryCreateChannelOptions & { type: T },
|
|
887
741
|
): Promise<MappedChannelCategoryTypes[T]>;
|
|
888
|
-
|
|
889
742
|
/** @deprecated See [Self-serve Game Selling Deprecation](https://support-dev.discord.com/hc/en-us/articles/6309018858647) for more information */
|
|
890
743
|
public createChannel(
|
|
891
744
|
name: string,
|
|
@@ -917,31 +770,12 @@ export abstract class Channel extends Base {
|
|
|
917
770
|
|
|
918
771
|
export type If<T extends boolean, A, B = null> = T extends true ? A : T extends false ? B : A | B;
|
|
919
772
|
|
|
920
|
-
export interface OAuth2AuthorizeOptions {
|
|
921
|
-
guild_id: Snowflake;
|
|
922
|
-
permissions?: PermissionResolvable;
|
|
923
|
-
authorize?: boolean;
|
|
924
|
-
code?: string;
|
|
925
|
-
webhook_channel_id?: Snowflake;
|
|
926
|
-
}
|
|
927
|
-
|
|
928
773
|
export class Client<Ready extends boolean = boolean> extends BaseClient {
|
|
929
|
-
public constructor(options?: ClientOptions);
|
|
774
|
+
public constructor(options?: ClientOptions);
|
|
930
775
|
private actions: unknown;
|
|
931
776
|
private presence: ClientPresence;
|
|
932
777
|
private _eval(script: string): unknown;
|
|
933
778
|
private _validateOptions(options: ClientOptions): void;
|
|
934
|
-
private autoRedeemNitro(message: Message): object;
|
|
935
|
-
|
|
936
|
-
public application: If<Ready, ClientApplication>;
|
|
937
|
-
// Added
|
|
938
|
-
public settings: ClientUserSettingManager;
|
|
939
|
-
public relationships: RelationshipManager;
|
|
940
|
-
public readonly callVoice?: VoiceConnection;
|
|
941
|
-
public voiceStates: VoiceStateManager;
|
|
942
|
-
public sessions: SessionManager;
|
|
943
|
-
public billing: BillingManager;
|
|
944
|
-
// End
|
|
945
779
|
public channels: ChannelManager;
|
|
946
780
|
public readonly emojis: BaseGuildEmojiManager;
|
|
947
781
|
public guilds: GuildManager;
|
|
@@ -956,36 +790,36 @@ export class Client<Ready extends boolean = boolean> extends BaseClient {
|
|
|
956
790
|
public users: UserManager;
|
|
957
791
|
public voice: ClientVoiceManager;
|
|
958
792
|
public ws: WebSocketManager;
|
|
959
|
-
public
|
|
960
|
-
public
|
|
793
|
+
public notes: UserNoteManager;
|
|
794
|
+
public relationships: RelationshipManager;
|
|
795
|
+
public voiceStates: VoiceStateManager;
|
|
796
|
+
public presences: PresenceManager;
|
|
797
|
+
public billing: BillingManager;
|
|
798
|
+
public settings: ClientUserSettingManager;
|
|
799
|
+
public readonly sessionId: If<Ready, string, undefined>;
|
|
961
800
|
public destroy(): void;
|
|
962
|
-
public logout(): Promise<void>;
|
|
963
801
|
public fetchGuildPreview(guild: GuildResolvable): Promise<GuildPreview>;
|
|
964
802
|
public fetchInvite(invite: InviteResolvable, options?: ClientFetchInviteOptions): Promise<Invite>;
|
|
965
|
-
public acceptInvite(invite: InviteResolvable): Promise<undefined>;
|
|
966
803
|
public fetchGuildTemplate(template: GuildTemplateResolvable): Promise<GuildTemplate>;
|
|
967
804
|
public fetchVoiceRegions(): Promise<Collection<string, VoiceRegion>>;
|
|
968
805
|
public fetchSticker(id: Snowflake): Promise<Sticker>;
|
|
969
806
|
public fetchPremiumStickerPacks(): Promise<Collection<Snowflake, StickerPack>>;
|
|
970
807
|
public fetchWebhook(id: Snowflake, token?: string): Promise<Webhook>;
|
|
971
808
|
public fetchGuildWidget(guild: GuildResolvable): Promise<Widget>;
|
|
972
|
-
public
|
|
973
|
-
public generateInvite(options?: InviteGenerationOptions): string;
|
|
809
|
+
public sleep(timeout: number): Promise<void>;
|
|
974
810
|
public login(token?: string): Promise<string>;
|
|
975
|
-
public
|
|
976
|
-
public
|
|
977
|
-
public QRLogin(options?: DiscordAuthWebsocketOptions): DiscordAuthWebsocket;
|
|
978
|
-
public remoteAuth(url: string): Promise<undefined>;
|
|
979
|
-
public createToken(): Promise<string>;
|
|
980
|
-
public checkUpdate(): Promise<this>;
|
|
811
|
+
public QRLogin(): Promise<void>;
|
|
812
|
+
public logout(): Promise<void>;
|
|
981
813
|
public isReady(): this is Client<true>;
|
|
982
814
|
/** @deprecated Use {@link Sweepers#sweepMessages} instead */
|
|
983
815
|
public sweepMessages(lifetime?: number): number;
|
|
984
|
-
private customStatusAuto(client?: this): undefined;
|
|
985
|
-
public authorizeURL(url: string, options?: object): Promise<object>;
|
|
986
|
-
public sleep(milliseconds: number): Promise<void> | null;
|
|
987
|
-
private _clearCache(cache: Collection<any, any>): void;
|
|
988
816
|
public toJSON(): unknown;
|
|
817
|
+
public acceptInvite(
|
|
818
|
+
invite: InviteResolvable,
|
|
819
|
+
options?: AcceptInviteOptions,
|
|
820
|
+
): Promise<Guild | DMChannel | GroupDMChannel>;
|
|
821
|
+
public redeemNitro(nitro: string, channel?: TextChannelResolvable, paymentSourceId?: Snowflake): Promise<any>;
|
|
822
|
+
public authorizeURL(url: string, options?: OAuth2AuthorizeOptions): Promise<any>;
|
|
989
823
|
|
|
990
824
|
public on<K extends keyof ClientEvents>(event: K, listener: (...args: ClientEvents[K]) => Awaitable<void>): this;
|
|
991
825
|
public on<S extends string | symbol>(
|
|
@@ -1012,25 +846,17 @@ export class Client<Ready extends boolean = boolean> extends BaseClient {
|
|
|
1012
846
|
public removeAllListeners<S extends string | symbol>(event?: Exclude<S, keyof ClientEvents>): this;
|
|
1013
847
|
}
|
|
1014
848
|
|
|
1015
|
-
export
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
public owner: User | Team | null;
|
|
1027
|
-
public readonly partial: boolean;
|
|
1028
|
-
public rpcOrigins: string[];
|
|
1029
|
-
public fetch(): Promise<ClientApplication>;
|
|
1030
|
-
public fetchRoleConnectionMetadataRecords(): Promise<ApplicationRoleConnectionMetadata[]>;
|
|
1031
|
-
public editRoleConnectionMetadataRecords(
|
|
1032
|
-
records: ApplicationRoleConnectionMetadataEditOptions[],
|
|
1033
|
-
): Promise<ApplicationRoleConnectionMetadata[]>;
|
|
849
|
+
export interface AcceptInviteOptions {
|
|
850
|
+
bypassOnboarding: boolean;
|
|
851
|
+
bypassVerify: boolean;
|
|
852
|
+
}
|
|
853
|
+
|
|
854
|
+
export interface OAuth2AuthorizeOptions {
|
|
855
|
+
guild_id?: Snowflake;
|
|
856
|
+
permissions?: PermissionResolvable;
|
|
857
|
+
authorize?: boolean;
|
|
858
|
+
code?: string;
|
|
859
|
+
webhook_channel_id?: Snowflake;
|
|
1034
860
|
}
|
|
1035
861
|
|
|
1036
862
|
export class ClientPresence extends Presence {
|
|
@@ -1044,57 +870,38 @@ export class ClientUser extends User {
|
|
|
1044
870
|
public mfaEnabled: boolean;
|
|
1045
871
|
public readonly presence: ClientPresence;
|
|
1046
872
|
public verified: boolean;
|
|
1047
|
-
public notes: Collection<Snowflake, string>;
|
|
1048
|
-
public friendNicknames: Collection<Snowflake, string>;
|
|
1049
|
-
public purchasedFlags: PurchasedFlags;
|
|
1050
|
-
public premiumUsageFlags: PremiumUsageFlags;
|
|
1051
|
-
public setThemeColors(primary?: ColorResolvable, accent?: ColorResolvable): ClientUser;
|
|
1052
873
|
public edit(data: ClientUserEditData): Promise<this>;
|
|
1053
|
-
public setActivity(options?:
|
|
1054
|
-
public setActivity(name: string, options?: ActivityOptions): ClientPresence;
|
|
874
|
+
public setActivity(options?: ActivityOptions): ClientPresence;
|
|
875
|
+
public setActivity(name: string, options?: Omit<ActivityOptions, 'name'>): ClientPresence;
|
|
1055
876
|
public setAFK(afk?: boolean, shardId?: number | number[]): ClientPresence;
|
|
1056
877
|
public setAvatar(avatar: BufferResolvable | Base64Resolvable | null): Promise<this>;
|
|
1057
|
-
public setBanner(banner: BufferResolvable | Base64Resolvable | null): Promise<this>;
|
|
1058
878
|
public setPresence(data: PresenceData): ClientPresence;
|
|
1059
879
|
public setStatus(status: PresenceStatusData, shardId?: number | number[]): ClientPresence;
|
|
1060
880
|
public setUsername(username: string, password: string): Promise<this>;
|
|
1061
|
-
public
|
|
881
|
+
public purchasedFlags: Readonly<PurchasedFlags>;
|
|
882
|
+
public premiumUsageFlags: Readonly<PremiumUsageFlags>;
|
|
883
|
+
public phone: string | null;
|
|
884
|
+
public nsfwAllowed?: boolean;
|
|
885
|
+
public email: string | null;
|
|
886
|
+
public bio?: string;
|
|
887
|
+
public pronouns?: string;
|
|
888
|
+
public premiumType: number;
|
|
889
|
+
public setBanner(banner: BufferResolvable | Base64Resolvable | null): Promise<this>;
|
|
890
|
+
public setHypeSquad(
|
|
891
|
+
hypesquad: 0 | 1 | 2 | 3 | 'LEAVE' | 'HOUSE_BRAVERY' | 'HOUSE_BRILLIANCE' | 'HOUSE_BALANCE',
|
|
892
|
+
): Promise<void>;
|
|
1062
893
|
public setAccentColor(color: ColorResolvable): Promise<this>;
|
|
1063
|
-
public setDiscriminator(discriminator: string, password: string): Promise<this>;
|
|
1064
894
|
public setAboutMe(bio: string | null): Promise<this>;
|
|
1065
|
-
public setEmail(email: string, password: string): Promise<this>;
|
|
1066
|
-
public setPassword(oldPassword: string, newPassword: string): Promise<this>;
|
|
1067
|
-
public disableAccount(password: string): Promise<this>;
|
|
1068
|
-
public deleteAccount(password: string): Promise<this>;
|
|
1069
|
-
public setDeaf(status: boolean): Promise<boolean>;
|
|
1070
|
-
public setMute(status: boolean): Promise<boolean>;
|
|
1071
895
|
public createFriendInvite(): Promise<Invite>;
|
|
1072
896
|
public getAllFriendInvites(): Promise<Collection<string, Invite>>;
|
|
1073
|
-
public revokeAllFriendInvites(): Promise<
|
|
1074
|
-
public setSamsungActivity(packageName: string, type
|
|
1075
|
-
public getMentions(
|
|
1076
|
-
limit?: number,
|
|
1077
|
-
mentionRoles?: boolean,
|
|
1078
|
-
mentionEveryone?: boolean,
|
|
1079
|
-
): Promise<Collection<Snowflake, Message>>;
|
|
1080
|
-
/**
|
|
1081
|
-
* Nitro Status
|
|
1082
|
-
* `0`: None
|
|
1083
|
-
* `1`: Classic
|
|
1084
|
-
* `2`: Boost
|
|
1085
|
-
* @external https://discord.com/developers/docs/resources/user#user-object-premium-types
|
|
1086
|
-
*/
|
|
1087
|
-
public readonly nitroType: NitroType;
|
|
1088
|
-
public readonly phoneNumber: string;
|
|
1089
|
-
public readonly nsfwAllowed: boolean;
|
|
1090
|
-
public readonly emailAddress: string;
|
|
897
|
+
public revokeAllFriendInvites(): Promise<void>;
|
|
898
|
+
public setSamsungActivity(packageName: string, type: 'START' | 'UPDATE' | 'STOP'): Promise<this>;
|
|
1091
899
|
public stopRinging(channel: ChannelResolvable): Promise<void>;
|
|
1092
|
-
public
|
|
1093
|
-
public setPronouns(pronouns?: string): Promise<this>;
|
|
900
|
+
public fetchBurstCredit(): Promise<number>;
|
|
901
|
+
public setPronouns(pronouns?: string | null): Promise<this>;
|
|
902
|
+
public setGlobalName(globalName?: string | null): Promise<this>;
|
|
1094
903
|
}
|
|
1095
904
|
|
|
1096
|
-
type NitroType = 'NONE' | 'NITRO_CLASSIC' | 'NITRO_BOOST' | 'NITRO_BASIC';
|
|
1097
|
-
|
|
1098
905
|
export class Options extends null {
|
|
1099
906
|
private constructor();
|
|
1100
907
|
public static defaultMakeCacheSettings: CacheWithLimitsOptions;
|
|
@@ -1118,6 +925,12 @@ export interface CollectorEventTypes<K, V, F extends unknown[] = []> {
|
|
|
1118
925
|
end: [collected: Collection<K, V>, reason: string];
|
|
1119
926
|
}
|
|
1120
927
|
|
|
928
|
+
export type ChannelFlagsString = 'PINNED' | 'REQUIRE_TAG';
|
|
929
|
+
export class ChannelFlags extends BitField<ChannelFlagsString> {
|
|
930
|
+
public static FLAGS: Record<ChannelFlagsString, number>;
|
|
931
|
+
public static resolve(bit?: BitFieldResolvable<ChannelFlagsString, number>): number;
|
|
932
|
+
}
|
|
933
|
+
|
|
1121
934
|
export abstract class Collector<K, V, F extends unknown[] = []> extends EventEmitter {
|
|
1122
935
|
protected constructor(client: Client, options?: CollectorOptions<[V, ...F]>);
|
|
1123
936
|
private _timeout: NodeJS.Timeout | null;
|
|
@@ -1303,27 +1116,28 @@ export class DataResolver extends null {
|
|
|
1303
1116
|
public static resolveGuildTemplateCode(data: GuildTemplateResolvable): string;
|
|
1304
1117
|
}
|
|
1305
1118
|
|
|
1306
|
-
export interface Captcha {
|
|
1307
|
-
captcha_key: string[];
|
|
1308
|
-
captcha_service: string;
|
|
1309
|
-
captcha_sitekey: string;
|
|
1310
|
-
captcha_rqdata?: string;
|
|
1311
|
-
captcha_rqtoken?: string;
|
|
1312
|
-
}
|
|
1313
1119
|
export class DiscordAPIError extends Error {
|
|
1314
1120
|
private constructor(error: unknown, status: number, request: unknown);
|
|
1315
1121
|
private static flattenErrors(obj: unknown, key: string): string[];
|
|
1316
|
-
|
|
1122
|
+
|
|
1317
1123
|
public code: number;
|
|
1318
1124
|
public method: string;
|
|
1319
1125
|
public path: string;
|
|
1320
1126
|
public httpStatus: number;
|
|
1321
1127
|
public requestData: HTTPErrorData;
|
|
1322
1128
|
public retries: number;
|
|
1129
|
+
public captcha: Captcha | null;
|
|
1130
|
+
}
|
|
1131
|
+
|
|
1132
|
+
export interface Captcha {
|
|
1133
|
+
captcha_key: string[];
|
|
1134
|
+
captcha_sitekey: string;
|
|
1135
|
+
captcha_service: 'hcaptcha';
|
|
1136
|
+
captcha_rqdata?: string;
|
|
1137
|
+
captcha_rqtoken?: string;
|
|
1323
1138
|
}
|
|
1324
1139
|
|
|
1325
1140
|
export class DMChannel extends TextBasedChannelMixin(Channel, [
|
|
1326
|
-
'bulkDelete',
|
|
1327
1141
|
'fetchWebhooks',
|
|
1328
1142
|
'createWebhook',
|
|
1329
1143
|
'setRateLimitPerUser',
|
|
@@ -1333,19 +1147,16 @@ export class DMChannel extends TextBasedChannelMixin(Channel, [
|
|
|
1333
1147
|
public recipient: User;
|
|
1334
1148
|
public type: 'DM';
|
|
1335
1149
|
public flags: Readonly<ChannelFlags>;
|
|
1150
|
+
public messageRequest?: boolean;
|
|
1151
|
+
public messageRequestTimestamp?: number;
|
|
1336
1152
|
public fetch(force?: boolean): Promise<this>;
|
|
1153
|
+
public acceptMessageRequest(): Promise<this>;
|
|
1154
|
+
public cancelMessageRequest(): Promise<this>;
|
|
1155
|
+
public sync(): void;
|
|
1156
|
+
public ring(): Promise<void>;
|
|
1337
1157
|
public readonly voiceAdapterCreator: InternalDiscordGatewayAdapterCreator;
|
|
1338
|
-
public call(options?: CallOptions): Promise<VoiceConnection>;
|
|
1339
|
-
public sync(): undefined;
|
|
1340
1158
|
public readonly shard: WebSocketShard;
|
|
1341
1159
|
public readonly voiceUsers: Collection<Snowflake, User>;
|
|
1342
|
-
public readonly voiceConnection?: VoiceConnection;
|
|
1343
|
-
}
|
|
1344
|
-
|
|
1345
|
-
export interface CallOptions {
|
|
1346
|
-
selfDeaf?: boolean;
|
|
1347
|
-
selfMute?: boolean;
|
|
1348
|
-
ring?: boolean;
|
|
1349
1160
|
}
|
|
1350
1161
|
|
|
1351
1162
|
export class Emoji extends Base {
|
|
@@ -1369,17 +1180,17 @@ export class Guild extends AnonymousGuild {
|
|
|
1369
1180
|
private _sortedChannels(channel: NonThreadGuildBasedChannel): Collection<Snowflake, NonThreadGuildBasedChannel>;
|
|
1370
1181
|
|
|
1371
1182
|
public readonly afkChannel: VoiceChannel | null;
|
|
1372
|
-
public topEmojis(): Promise<Collection<number, Emoji>>;
|
|
1373
1183
|
public afkChannelId: Snowflake | null;
|
|
1374
1184
|
public afkTimeout: number;
|
|
1375
1185
|
public applicationId: Snowflake | null;
|
|
1186
|
+
public maxVideoChannelUsers: number | null;
|
|
1187
|
+
public maxStageVideoChannelUsers: number | null;
|
|
1376
1188
|
public approximateMemberCount: number | null;
|
|
1377
1189
|
public approximatePresenceCount: number | null;
|
|
1378
1190
|
public autoModerationRules: AutoModerationRuleManager;
|
|
1379
1191
|
public available: boolean;
|
|
1380
1192
|
public bans: GuildBanManager;
|
|
1381
1193
|
public channels: GuildChannelManager;
|
|
1382
|
-
// public commands: GuildApplicationCommandManager;
|
|
1383
1194
|
public defaultMessageNotifications: DefaultMessageNotificationLevel | number;
|
|
1384
1195
|
/** @deprecated This will be removed in the next major version, see https://github.com/discordjs/discord.js/issues/7091 */
|
|
1385
1196
|
public deleted: boolean;
|
|
@@ -1392,8 +1203,6 @@ export class Guild extends AnonymousGuild {
|
|
|
1392
1203
|
public large: boolean;
|
|
1393
1204
|
public maximumMembers: number | null;
|
|
1394
1205
|
public maximumPresences: number | null;
|
|
1395
|
-
public maxStageVideoChannelUsers: number | null;
|
|
1396
|
-
public maxVideoChannelUsers: number | null;
|
|
1397
1206
|
/** @deprecated Use {@link GuildMemberManager.me} instead. */
|
|
1398
1207
|
public readonly me: GuildMember | null;
|
|
1399
1208
|
public memberCount: number;
|
|
@@ -1401,11 +1210,9 @@ export class Guild extends AnonymousGuild {
|
|
|
1401
1210
|
public mfaLevel: MFALevel;
|
|
1402
1211
|
public ownerId: Snowflake;
|
|
1403
1212
|
public preferredLocale: string;
|
|
1404
|
-
public premiumSubscriptionCount: number | null;
|
|
1405
1213
|
public premiumProgressBarEnabled: boolean;
|
|
1406
1214
|
public premiumTier: PremiumTier;
|
|
1407
1215
|
public presences: PresenceManager;
|
|
1408
|
-
public readonly disableDM: boolean;
|
|
1409
1216
|
public readonly publicUpdatesChannel: TextChannel | null;
|
|
1410
1217
|
public publicUpdatesChannelId: Snowflake | null;
|
|
1411
1218
|
public roles: RoleManager;
|
|
@@ -1414,6 +1221,7 @@ export class Guild extends AnonymousGuild {
|
|
|
1414
1221
|
public readonly safetyAlertsChannel: TextChannel | null;
|
|
1415
1222
|
public safetyAlertsChannelId: Snowflake | null;
|
|
1416
1223
|
public scheduledEvents: GuildScheduledEventManager;
|
|
1224
|
+
public settings: GuildSettingManager;
|
|
1417
1225
|
public readonly shard: WebSocketShard;
|
|
1418
1226
|
public shardId: number;
|
|
1419
1227
|
public stageInstances: StageInstanceManager;
|
|
@@ -1429,8 +1237,7 @@ export class Guild extends AnonymousGuild {
|
|
|
1429
1237
|
public widgetEnabled: boolean | null;
|
|
1430
1238
|
public readonly maximumBitrate: number;
|
|
1431
1239
|
public createTemplate(name: string, description?: string): Promise<GuildTemplate>;
|
|
1432
|
-
public delete(
|
|
1433
|
-
public read(): Promise<undefined>;
|
|
1240
|
+
public delete(): Promise<Guild>;
|
|
1434
1241
|
public discoverySplashURL(options?: StaticImageURLOptions): string | null;
|
|
1435
1242
|
public edit(data: GuildEditData, reason?: string): Promise<Guild>;
|
|
1436
1243
|
public editWelcomeScreen(data: WelcomeScreenEditData): Promise<WelcomeScreen>;
|
|
@@ -1438,7 +1245,6 @@ export class Guild extends AnonymousGuild {
|
|
|
1438
1245
|
public fetchAuditLogs<T extends GuildAuditLogsResolvable = 'ALL'>(
|
|
1439
1246
|
options?: GuildAuditLogsFetchOptions<T>,
|
|
1440
1247
|
): Promise<GuildAuditLogs<T>>;
|
|
1441
|
-
public mute(mute: boolean, time: number | null): boolean;
|
|
1442
1248
|
public fetchIntegrations(): Promise<Collection<Snowflake | string, Integration>>;
|
|
1443
1249
|
public fetchOwner(options?: BaseFetchOptions): Promise<GuildMember>;
|
|
1444
1250
|
public fetchPreview(): Promise<GuildPreview>;
|
|
@@ -1448,8 +1254,8 @@ export class Guild extends AnonymousGuild {
|
|
|
1448
1254
|
public fetchWelcomeScreen(): Promise<WelcomeScreen>;
|
|
1449
1255
|
public fetchWidget(): Promise<Widget>;
|
|
1450
1256
|
public fetchWidgetSettings(): Promise<GuildWidgetSettings>;
|
|
1451
|
-
public disableInvites(disabled?: boolean): Promise<Guild>;
|
|
1452
1257
|
public leave(): Promise<Guild>;
|
|
1258
|
+
public disableInvites(disabled?: boolean): Promise<Guild>;
|
|
1453
1259
|
public setAFKChannel(afkChannel: VoiceChannelResolvable | null, reason?: string): Promise<Guild>;
|
|
1454
1260
|
public setAFKTimeout(afkTimeout: number, reason?: string): Promise<Guild>;
|
|
1455
1261
|
public setBanner(banner: BufferResolvable | Base64Resolvable | null, reason?: string): Promise<Guild>;
|
|
@@ -1470,8 +1276,7 @@ export class Guild extends AnonymousGuild {
|
|
|
1470
1276
|
public setIcon(icon: BufferResolvable | Base64Resolvable | null, reason?: string): Promise<Guild>;
|
|
1471
1277
|
public setName(name: string, reason?: string): Promise<Guild>;
|
|
1472
1278
|
public setOwner(owner: GuildMemberResolvable, reason?: string): Promise<Guild>;
|
|
1473
|
-
public
|
|
1474
|
-
public setPreferredLocale(preferredLocale: string, reason?: string): Promise<Guild>;
|
|
1279
|
+
public setPreferredLocale(preferredLocale: string | null, reason?: string): Promise<Guild>;
|
|
1475
1280
|
public setPublicUpdatesChannel(publicUpdatesChannel: TextChannelResolvable | null, reason?: string): Promise<Guild>;
|
|
1476
1281
|
/** @deprecated Use {@link RoleManager.setPositions} instead */
|
|
1477
1282
|
public setRolePositions(rolePositions: readonly RolePosition[]): Promise<Guild>;
|
|
@@ -1482,15 +1287,17 @@ export class Guild extends AnonymousGuild {
|
|
|
1482
1287
|
public setSystemChannelFlags(systemChannelFlags: SystemChannelFlagsResolvable, reason?: string): Promise<Guild>;
|
|
1483
1288
|
public setVerificationLevel(verificationLevel: VerificationLevel | number | null, reason?: string): Promise<Guild>;
|
|
1484
1289
|
public setPremiumProgressBarEnabled(enabled?: boolean, reason?: string): Promise<Guild>;
|
|
1290
|
+
public setWidgetSettings(settings: GuildWidgetSettingsData, reason?: string): Promise<Guild>;
|
|
1291
|
+
public toJSON(): unknown;
|
|
1292
|
+
public markAsRead(): Promise<void>;
|
|
1485
1293
|
public setCommunity(
|
|
1486
1294
|
stats: boolean,
|
|
1487
|
-
publicUpdatesChannel
|
|
1488
|
-
rulesChannel
|
|
1295
|
+
publicUpdatesChannel?: GuildTextChannelResolvable,
|
|
1296
|
+
rulesChannel?: GuildTextChannelResolvable,
|
|
1489
1297
|
reason?: string,
|
|
1490
|
-
): Promise<
|
|
1491
|
-
public
|
|
1492
|
-
public setVanityCode(code?: string): Promise<
|
|
1493
|
-
public toJSON(): unknown;
|
|
1298
|
+
): Promise<this>;
|
|
1299
|
+
public topEmojis(): Promise<Collection<number, GuildEmoji>>;
|
|
1300
|
+
public setVanityCode(code?: string): Promise<this>;
|
|
1494
1301
|
}
|
|
1495
1302
|
|
|
1496
1303
|
export class GuildAuditLogs<T extends GuildAuditLogsResolvable = 'ALL'> {
|
|
@@ -1541,8 +1348,6 @@ export class GuildAuditLogsEntry<
|
|
|
1541
1348
|
: Role | GuildEmoji | { id: Snowflake } | null;
|
|
1542
1349
|
public targetType: TTargetType;
|
|
1543
1350
|
public toJSON(): unknown;
|
|
1544
|
-
public addIntegration(applicationId: Snowflake): Promise<boolean>;
|
|
1545
|
-
public addBot(bot: UserResolvable | Snowflake, permissions?: PermissionResolvable): Promise<boolean>;
|
|
1546
1351
|
}
|
|
1547
1352
|
|
|
1548
1353
|
export class GuildBan extends Base {
|
|
@@ -1558,7 +1363,6 @@ export abstract class GuildChannel extends Channel {
|
|
|
1558
1363
|
public constructor(guild: Guild, data?: RawGuildChannelData, client?: Client, immediatePatch?: boolean);
|
|
1559
1364
|
private memberPermissions(member: GuildMember, checkAdmin: boolean): Readonly<Permissions>;
|
|
1560
1365
|
private rolePermissions(role: Role, checkAdmin: boolean): Readonly<Permissions>;
|
|
1561
|
-
|
|
1562
1366
|
public readonly createdAt: Date;
|
|
1563
1367
|
public readonly createdTimestamp: number;
|
|
1564
1368
|
public readonly calculatedPosition: number;
|
|
@@ -1609,14 +1413,6 @@ export class GuildEmoji extends BaseGuildEmoji {
|
|
|
1609
1413
|
public setName(name: string, reason?: string): Promise<GuildEmoji>;
|
|
1610
1414
|
}
|
|
1611
1415
|
|
|
1612
|
-
export interface UserBadge {
|
|
1613
|
-
name: string;
|
|
1614
|
-
description: string;
|
|
1615
|
-
icon: string;
|
|
1616
|
-
link?: string;
|
|
1617
|
-
iconURL(): string;
|
|
1618
|
-
}
|
|
1619
|
-
|
|
1620
1416
|
export class GuildMember extends PartialTextBasedChannel(Base) {
|
|
1621
1417
|
private constructor(client: Client, data: RawGuildMemberData, guild: Guild);
|
|
1622
1418
|
private _roles: Snowflake[];
|
|
@@ -1647,9 +1443,6 @@ export class GuildMember extends PartialTextBasedChannel(Base) {
|
|
|
1647
1443
|
public readonly roles: GuildMemberRoleManager;
|
|
1648
1444
|
public user: User;
|
|
1649
1445
|
public readonly voice: VoiceState;
|
|
1650
|
-
public themeColors?: [number, number];
|
|
1651
|
-
public readonly hexThemeColor: [string, string] | null;
|
|
1652
|
-
public badges: UserBadge[] | null;
|
|
1653
1446
|
public avatarURL(options?: ImageURLOptions): string | null;
|
|
1654
1447
|
public ban(options?: BanOptions): Promise<GuildMember>;
|
|
1655
1448
|
public disableCommunicationUntil(timeout: DateResolvable | null, reason?: string): Promise<GuildMember>;
|
|
@@ -1667,14 +1460,12 @@ export class GuildMember extends PartialTextBasedChannel(Base) {
|
|
|
1667
1460
|
public permissionsIn(channel: GuildChannelResolvable): Readonly<Permissions>;
|
|
1668
1461
|
public setNickname(nickname: string | null, reason?: string): Promise<GuildMember>;
|
|
1669
1462
|
public setFlags(flags: GuildMemberFlagsResolvable): Promise<GuildMember>;
|
|
1670
|
-
public setAvatar(avatar: BufferResolvable | Base64Resolvable | null): Promise<GuildMember>;
|
|
1671
|
-
public setBanner(banner: BufferResolvable | Base64Resolvable | null): Promise<GuildMember>;
|
|
1672
|
-
public setAboutMe(bio: string | null): Promise<GuildMember>;
|
|
1673
|
-
public getProfile(): Promise<User>;
|
|
1674
1463
|
public toJSON(): unknown;
|
|
1675
1464
|
public toString(): MemberMention;
|
|
1676
1465
|
public valueOf(): string;
|
|
1677
|
-
public
|
|
1466
|
+
public setAvatar(avatar: BufferResolvable | Base64Resolvable | null): Promise<GuildMember>;
|
|
1467
|
+
public setBanner(banner: BufferResolvable | Base64Resolvable | null): Promise<GuildMember>;
|
|
1468
|
+
public setAboutMe(bio: string | null): Promise<GuildMember>;
|
|
1678
1469
|
}
|
|
1679
1470
|
|
|
1680
1471
|
export class GuildMemberFlags extends BitField<GuildMemberFlagsString> {
|
|
@@ -1728,6 +1519,7 @@ export class GuildScheduledEvent<S extends GuildScheduledEventStatus = GuildSche
|
|
|
1728
1519
|
public readonly scheduledEndAt: Date | null;
|
|
1729
1520
|
public readonly channel: VoiceChannel | StageChannel | null;
|
|
1730
1521
|
public readonly guild: Guild | null;
|
|
1522
|
+
public readonly url: string;
|
|
1731
1523
|
public readonly image: string | null;
|
|
1732
1524
|
public coverImageURL(options?: StaticImageURLOptions): string | null;
|
|
1733
1525
|
public createInviteURL(options?: CreateGuildScheduledEventInviteURLOptions): Promise<string>;
|
|
@@ -1838,6 +1630,7 @@ export class IntegrationApplication extends Application {
|
|
|
1838
1630
|
export class Intents extends BitField<IntentsString> {
|
|
1839
1631
|
public static FLAGS: Record<IntentsString, number>;
|
|
1840
1632
|
public static resolve(bit?: BitFieldResolvable<IntentsString, number>): number;
|
|
1633
|
+
public static ALL: number;
|
|
1841
1634
|
}
|
|
1842
1635
|
|
|
1843
1636
|
export type CacheType = 'cached' | 'raw' | undefined;
|
|
@@ -1895,15 +1688,7 @@ export class Interaction<Cached extends CacheType = CacheType> extends Base {
|
|
|
1895
1688
|
public isMessageContextMenu(): this is MessageContextMenuInteraction<Cached>;
|
|
1896
1689
|
public isMessageComponent(): this is MessageComponentInteraction<Cached>;
|
|
1897
1690
|
public isModalSubmit(): this is ModalSubmitInteraction<Cached>;
|
|
1898
|
-
public
|
|
1899
|
-
public report(breadcrumbs: number[], elements?: object): Promise<{ report_id: Snowflake }>;
|
|
1900
|
-
/** @deprecated Use {@link Interaction#isStringSelect()} instead */
|
|
1901
|
-
public isSelectMenu(): this is StringSelectInteraction<Cached>;
|
|
1902
|
-
public isStringSelect(): this is StringSelectInteraction<Cached>;
|
|
1903
|
-
public isUserSelect(): this is UserSelectInteraction<Cached>;
|
|
1904
|
-
public isMentionableSelect(): this is MentionableSelectInteraction<Cached>;
|
|
1905
|
-
public isRoleSelect(): this is RoleSelectInteraction<Cached>;
|
|
1906
|
-
public isChannelSelect(): this is ChannelSelectInteraction<Cached>;
|
|
1691
|
+
public isSelectMenu(): this is SelectMenuInteraction<Cached>;
|
|
1907
1692
|
public isRepliable(): this is this & InteractionResponseFields<Cached>;
|
|
1908
1693
|
}
|
|
1909
1694
|
|
|
@@ -1943,8 +1728,8 @@ export class InteractionWebhook extends PartialWebhookMixin() {
|
|
|
1943
1728
|
|
|
1944
1729
|
export class Invite extends Base {
|
|
1945
1730
|
private constructor(client: Client, data: RawInviteData);
|
|
1946
|
-
public channel
|
|
1947
|
-
public channelId
|
|
1731
|
+
public channel?: NonThreadGuildBasedChannel | GroupDMChannel;
|
|
1732
|
+
public channelId?: Snowflake;
|
|
1948
1733
|
public code: string;
|
|
1949
1734
|
public readonly deletable: boolean;
|
|
1950
1735
|
public readonly createdAt: Date | null;
|
|
@@ -1958,6 +1743,7 @@ export class Invite extends Base {
|
|
|
1958
1743
|
public maxUses: number | null;
|
|
1959
1744
|
public memberCount: number;
|
|
1960
1745
|
public presenceCount: number;
|
|
1746
|
+
public type: InviteType | null;
|
|
1961
1747
|
public targetApplication: IntegrationApplication | null;
|
|
1962
1748
|
public targetUser: User | null;
|
|
1963
1749
|
public targetType: InviteTargetType | null;
|
|
@@ -1967,10 +1753,10 @@ export class Invite extends Base {
|
|
|
1967
1753
|
public delete(reason?: string): Promise<Invite>;
|
|
1968
1754
|
public toJSON(): unknown;
|
|
1969
1755
|
public toString(): string;
|
|
1970
|
-
public acceptInvite(autoVerify?: boolean): Promise<Guild>;
|
|
1971
1756
|
public static INVITES_PATTERN: RegExp;
|
|
1972
1757
|
public stageInstance: InviteStageInstance | null;
|
|
1973
1758
|
public guildScheduledEvent: GuildScheduledEvent | null;
|
|
1759
|
+
public flags: Readonly<InviteFlags>;
|
|
1974
1760
|
}
|
|
1975
1761
|
|
|
1976
1762
|
export class InviteStageInstance extends Base {
|
|
@@ -2003,32 +1789,30 @@ export class LimitedCollection<K, V> extends Collection<K, V> {
|
|
|
2003
1789
|
public static filterByLifetime<K, V>(options?: LifetimeFilterOptions<K, V>): SweepFilter<K, V>;
|
|
2004
1790
|
}
|
|
2005
1791
|
|
|
2006
|
-
export type MessageCollectorOptionsParams<
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
1792
|
+
export type MessageCollectorOptionsParams<
|
|
1793
|
+
T extends MessageComponentTypeResolvable,
|
|
1794
|
+
Cached extends boolean = boolean,
|
|
1795
|
+
> = {
|
|
1796
|
+
componentType?: T;
|
|
1797
|
+
} & MessageComponentCollectorOptions<MappedInteractionTypes<Cached>[T]>;
|
|
2010
1798
|
|
|
2011
1799
|
export type MessageChannelCollectorOptionsParams<
|
|
2012
1800
|
T extends MessageComponentTypeResolvable,
|
|
2013
1801
|
Cached extends boolean = boolean,
|
|
2014
|
-
> =
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
} & MessageChannelComponentCollectorOptions<MappedInteractionTypes<Cached>[T]>;
|
|
1802
|
+
> = {
|
|
1803
|
+
componentType?: T;
|
|
1804
|
+
} & MessageChannelComponentCollectorOptions<MappedInteractionTypes<Cached>[T]>;
|
|
2018
1805
|
|
|
2019
1806
|
export type AwaitMessageCollectorOptionsParams<
|
|
2020
1807
|
T extends MessageComponentTypeResolvable,
|
|
2021
1808
|
Cached extends boolean = boolean,
|
|
2022
|
-
> =
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
>;
|
|
1809
|
+
> = { componentType?: T } & Pick<
|
|
1810
|
+
InteractionCollectorOptions<MappedInteractionTypes<Cached>[T]>,
|
|
1811
|
+
keyof AwaitMessageComponentOptions<any>
|
|
1812
|
+
>;
|
|
2027
1813
|
|
|
2028
1814
|
export interface StringMappedInteractionTypes<Cached extends CacheType = CacheType> {
|
|
2029
1815
|
BUTTON: ButtonInteraction<Cached>;
|
|
2030
|
-
/** @deprecated */
|
|
2031
|
-
SELECT_MENU: SelectMenuInteraction<Cached>;
|
|
2032
1816
|
STRING_SELECT: SelectMenuInteraction<Cached>;
|
|
2033
1817
|
USER_SELECT: SelectMenuInteraction<Cached>;
|
|
2034
1818
|
ROLE_SELECT: SelectMenuInteraction<Cached>;
|
|
@@ -2043,8 +1827,6 @@ export type MappedInteractionTypes<Cached extends boolean = boolean> = EnumValue
|
|
|
2043
1827
|
typeof MessageComponentTypes,
|
|
2044
1828
|
{
|
|
2045
1829
|
BUTTON: ButtonInteraction<WrapBooleanCache<Cached>>;
|
|
2046
|
-
/** @deprecated */
|
|
2047
|
-
SELECT_MENU: StringSelectInteraction<WrapBooleanCache<Cached>>;
|
|
2048
1830
|
STRING_SELECT: StringSelectInteraction<WrapBooleanCache<Cached>>;
|
|
2049
1831
|
USER_SELECT: UserSelectInteraction<WrapBooleanCache<Cached>>;
|
|
2050
1832
|
ROLE_SELECT: RoleSelectInteraction<WrapBooleanCache<Cached>>;
|
|
@@ -2064,7 +1846,7 @@ export class Message<Cached extends boolean = boolean> extends Base {
|
|
|
2064
1846
|
public applicationId: Snowflake | null;
|
|
2065
1847
|
public attachments: Collection<Snowflake, MessageAttachment>;
|
|
2066
1848
|
public author: User;
|
|
2067
|
-
public
|
|
1849
|
+
public get bulkDeletable(): boolean;
|
|
2068
1850
|
public readonly channel: If<Cached, GuildTextBasedChannel, TextBasedChannel>;
|
|
2069
1851
|
public channelId: Snowflake;
|
|
2070
1852
|
public readonly cleanContent: string;
|
|
@@ -2080,7 +1862,7 @@ export class Message<Cached extends boolean = boolean> extends Base {
|
|
|
2080
1862
|
public readonly editedAt: Date | null;
|
|
2081
1863
|
public editedTimestamp: number | null;
|
|
2082
1864
|
public embeds: MessageEmbed[];
|
|
2083
|
-
public groupActivityApplication:
|
|
1865
|
+
public groupActivityApplication: Application | null;
|
|
2084
1866
|
public guildId: If<Cached, Snowflake>;
|
|
2085
1867
|
public readonly guild: If<Cached, Guild>;
|
|
2086
1868
|
public readonly hasThread: boolean;
|
|
@@ -2103,14 +1885,8 @@ export class Message<Cached extends boolean = boolean> extends Base {
|
|
|
2103
1885
|
public flags: Readonly<MessageFlags>;
|
|
2104
1886
|
public reference: MessageReference | null;
|
|
2105
1887
|
public position: number | null;
|
|
2106
|
-
public awaitMessageComponent<T extends MessageComponentTypeResolvable = 'ACTION_ROW'>(
|
|
2107
|
-
options?: AwaitMessageCollectorOptionsParams<T, Cached>,
|
|
2108
|
-
): Promise<MappedInteractionTypes<Cached>[T]>;
|
|
2109
1888
|
public awaitReactions(options?: AwaitReactionsOptions): Promise<Collection<Snowflake | string, MessageReaction>>;
|
|
2110
1889
|
public createReactionCollector(options?: ReactionCollectorOptions): ReactionCollector;
|
|
2111
|
-
public createMessageComponentCollector<T extends MessageComponentTypeResolvable = 'ACTION_ROW'>(
|
|
2112
|
-
options?: MessageCollectorOptionsParams<T, Cached>,
|
|
2113
|
-
): InteractionCollector<MappedInteractionTypes<Cached>[T]>;
|
|
2114
1890
|
public delete(): Promise<Message>;
|
|
2115
1891
|
public edit(content: string | MessageEditOptions | MessagePayload): Promise<Message>;
|
|
2116
1892
|
public equals(message: Message, rawData: unknown): boolean;
|
|
@@ -2129,13 +1905,25 @@ export class Message<Cached extends boolean = boolean> extends Base {
|
|
|
2129
1905
|
public toString(): string;
|
|
2130
1906
|
public unpin(reason?: string): Promise<Message>;
|
|
2131
1907
|
public inGuild(): this is Message<true> & this;
|
|
2132
|
-
|
|
2133
|
-
public
|
|
2134
|
-
public
|
|
2135
|
-
public
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
|
|
1908
|
+
|
|
1909
|
+
public readonly isMessage: true;
|
|
1910
|
+
public clickButton(button?: { X: number; Y: number } | string): Promise<Message | Modal>;
|
|
1911
|
+
public selectMenu(
|
|
1912
|
+
menu: 0 | 1 | 2 | 3 | 4 | string,
|
|
1913
|
+
vales: (UserResolvable | RoleResolvable | ChannelResolvable | string)[],
|
|
1914
|
+
): Promise<Message | Modal>;
|
|
1915
|
+
public markUnread(): Promise<void>;
|
|
1916
|
+
public markRead(): Promise<void>;
|
|
1917
|
+
public report(breadcrumbs: number[], elements?: object): Promise<{ report_id: Snowflake }>;
|
|
1918
|
+
}
|
|
1919
|
+
|
|
1920
|
+
export class CallState extends Base {
|
|
1921
|
+
private constructor(client: Client, data: any);
|
|
1922
|
+
public channelId: Snowflake;
|
|
1923
|
+
public region: string;
|
|
1924
|
+
public readonly channel?: DMChannel | GroupDMChannel;
|
|
1925
|
+
public readonly ringing: Collection<Snowflake, User>;
|
|
1926
|
+
public setRTCRegion(): Promise<void>;
|
|
2139
1927
|
}
|
|
2140
1928
|
|
|
2141
1929
|
export class MessageActionRow<
|
|
@@ -2145,6 +1933,7 @@ export class MessageActionRow<
|
|
|
2145
1933
|
? APIActionRowComponent<APIModalActionRowComponent>
|
|
2146
1934
|
: APIActionRowComponent<APIMessageActionRowComponent>,
|
|
2147
1935
|
> extends BaseMessageComponent {
|
|
1936
|
+
// tslint:disable-next-line:ban-ts-ignore
|
|
2148
1937
|
// @ts-ignore (TS:2344, Caused by TypeScript 4.8)
|
|
2149
1938
|
// Fixed in DiscordJS >= 14.x / DiscordApiTypes >= 0.37.x, ignoring the type error here.
|
|
2150
1939
|
public constructor(data?: MessageActionRow<T> | MessageActionRowOptions<U> | V);
|
|
@@ -2164,6 +1953,7 @@ export class MessageAttachment {
|
|
|
2164
1953
|
public description: string | null;
|
|
2165
1954
|
public duration: number | null;
|
|
2166
1955
|
public ephemeral: boolean;
|
|
1956
|
+
public flags: Readonly<AttachmentFlags>;
|
|
2167
1957
|
public height: number | null;
|
|
2168
1958
|
public id: Snowflake;
|
|
2169
1959
|
public name: string | null;
|
|
@@ -2180,11 +1970,13 @@ export class MessageAttachment {
|
|
|
2180
1970
|
public toJSON(): unknown;
|
|
2181
1971
|
}
|
|
2182
1972
|
|
|
2183
|
-
export
|
|
2184
|
-
|
|
2185
|
-
|
|
1973
|
+
export class AttachmentFlags extends BitField<AttachmentFlagsString> {
|
|
1974
|
+
public static FLAGS: Record<AttachmentFlagsString, number>;
|
|
1975
|
+
public static resolve(bit?: BitFieldResolvable<AttachmentFlagsString, number>): number;
|
|
2186
1976
|
}
|
|
2187
1977
|
|
|
1978
|
+
export type AttachmentFlagsString = 'IS_REMIX';
|
|
1979
|
+
|
|
2188
1980
|
export class MessageButton extends BaseMessageComponent {
|
|
2189
1981
|
public constructor(data?: MessageButton | MessageButtonOptions | APIButtonComponent);
|
|
2190
1982
|
public customId: string | null;
|
|
@@ -2201,7 +1993,6 @@ export class MessageButton extends BaseMessageComponent {
|
|
|
2201
1993
|
public setStyle(style: MessageButtonStyleResolvable): this;
|
|
2202
1994
|
public setURL(url: string): this;
|
|
2203
1995
|
public toJSON(): APIButtonComponent;
|
|
2204
|
-
public click(message: Message): Promise<InteractionResponse>;
|
|
2205
1996
|
private static resolveStyle(style: MessageButtonStyleResolvable): MessageButtonStyle;
|
|
2206
1997
|
}
|
|
2207
1998
|
|
|
@@ -2314,6 +2105,22 @@ export class MessageEmbed {
|
|
|
2314
2105
|
public static normalizeFields(...fields: EmbedFieldData[] | EmbedFieldData[][]): Required<EmbedFieldData>[];
|
|
2315
2106
|
}
|
|
2316
2107
|
|
|
2108
|
+
export interface WebEmbedOptions {
|
|
2109
|
+
title?: string;
|
|
2110
|
+
description?: string;
|
|
2111
|
+
url?: string;
|
|
2112
|
+
timestamp?: Date | number;
|
|
2113
|
+
color?: ColorResolvable;
|
|
2114
|
+
fields?: EmbedFieldData[];
|
|
2115
|
+
author?: Partial<MessageEmbedAuthor> & { icon_url?: string; proxy_icon_url?: string };
|
|
2116
|
+
thumbnail?: Partial<MessageEmbedThumbnail> & { proxy_url?: string };
|
|
2117
|
+
image?: Partial<MessageEmbedImage> & { proxy_url?: string };
|
|
2118
|
+
video?: Partial<MessageEmbedVideo> & { proxy_url?: string };
|
|
2119
|
+
footer?: Partial<MessageEmbedFooter> & { icon_url?: string; proxy_icon_url?: string };
|
|
2120
|
+
imageType?: 'thumbnail' | 'image';
|
|
2121
|
+
redirect?: string;
|
|
2122
|
+
}
|
|
2123
|
+
|
|
2317
2124
|
export class WebEmbed {
|
|
2318
2125
|
public constructor(data?: WebEmbedOptions);
|
|
2319
2126
|
public author: MessageEmbedAuthor | null;
|
|
@@ -2325,9 +2132,8 @@ export class WebEmbed {
|
|
|
2325
2132
|
public title: string | null;
|
|
2326
2133
|
public url: string | null;
|
|
2327
2134
|
public video: MessageEmbedVideo | null;
|
|
2328
|
-
public hidden: boolean;
|
|
2329
|
-
public shorten: boolean;
|
|
2330
2135
|
public imageType: 'thumbnail' | 'image';
|
|
2136
|
+
public redirect?: string;
|
|
2331
2137
|
public setAuthor(options: EmbedAuthorData | null): this;
|
|
2332
2138
|
public setColor(color: ColorResolvable): this;
|
|
2333
2139
|
public setDescription(description: string): this;
|
|
@@ -2337,7 +2143,33 @@ export class WebEmbed {
|
|
|
2337
2143
|
public setTitle(title: string): this;
|
|
2338
2144
|
public setURL(url: string): this;
|
|
2339
2145
|
public setProvider(options: MessageEmbedProvider | null): this;
|
|
2340
|
-
public
|
|
2146
|
+
public setRedirect(url: string): this;
|
|
2147
|
+
public toString(): string;
|
|
2148
|
+
public static hiddenEmbed: string;
|
|
2149
|
+
}
|
|
2150
|
+
|
|
2151
|
+
export class BillingManager extends BaseManager {
|
|
2152
|
+
constructor(client: Client);
|
|
2153
|
+
public paymentSources: Collection<Snowflake, object>;
|
|
2154
|
+
public fetchPaymentSources(): Promise<Collection<Snowflake, object>>;
|
|
2155
|
+
public guildBoosts: Collection<Snowflake, GuildBoost>;
|
|
2156
|
+
public fetchGuildBoosts(): Promise<Collection<Snowflake, GuildBoost>>;
|
|
2157
|
+
public currentSubscription: Collection<Snowflake, object>;
|
|
2158
|
+
public fetchCurrentSubscription(): Promise<Collection<Snowflake, object>>;
|
|
2159
|
+
}
|
|
2160
|
+
|
|
2161
|
+
export class GuildBoost extends Base {
|
|
2162
|
+
constructor(client: Client, data: object);
|
|
2163
|
+
public id: Snowflake;
|
|
2164
|
+
public guildId?: Snowflake;
|
|
2165
|
+
public readonly guild: Guild | null;
|
|
2166
|
+
public subscriptionId: Snowflake;
|
|
2167
|
+
public premiumGuildSubscriptionId?: Snowflake;
|
|
2168
|
+
public ended?: boolean;
|
|
2169
|
+
public canceled: boolean;
|
|
2170
|
+
public cooldownEndsAt: Date;
|
|
2171
|
+
public unsubscribe(): Promise<this>;
|
|
2172
|
+
public subscribe(guild: GuildResolvable): Promise<this>;
|
|
2341
2173
|
}
|
|
2342
2174
|
|
|
2343
2175
|
export class MessageFlags extends BitField<MessageFlagsString> {
|
|
@@ -2357,6 +2189,7 @@ export class MessageMentions {
|
|
|
2357
2189
|
private readonly _content: string;
|
|
2358
2190
|
private _members: Collection<Snowflake, GuildMember> | null;
|
|
2359
2191
|
private _parsedUsers: Collection<Snowflake, User> | null;
|
|
2192
|
+
|
|
2360
2193
|
public readonly channels: Collection<Snowflake, AnyChannel>;
|
|
2361
2194
|
public readonly client: Client;
|
|
2362
2195
|
public everyone: boolean;
|
|
@@ -2379,7 +2212,6 @@ export class MessageMentions {
|
|
|
2379
2212
|
export class MessagePayload {
|
|
2380
2213
|
public constructor(target: MessageTarget, options: MessageOptions | WebhookMessageOptions);
|
|
2381
2214
|
public data: RawMessagePayloadData | null;
|
|
2382
|
-
public readonly usingNewAttachmentAPI: boolean;
|
|
2383
2215
|
public readonly isUser: boolean;
|
|
2384
2216
|
public readonly isWebhook: boolean;
|
|
2385
2217
|
public readonly isMessage: boolean;
|
|
@@ -2407,14 +2239,14 @@ export class MessageReaction {
|
|
|
2407
2239
|
private constructor(client: Client, data: RawMessageReactionData, message: Message);
|
|
2408
2240
|
private _emoji: GuildEmoji | ReactionEmoji;
|
|
2409
2241
|
|
|
2410
|
-
public
|
|
2242
|
+
public burstColors: string[];
|
|
2243
|
+
public readonly client: Client<true>;
|
|
2411
2244
|
public count: number;
|
|
2412
2245
|
public burstCount: number;
|
|
2413
|
-
public
|
|
2246
|
+
public countDetails: ReactionCountDetailsData;
|
|
2414
2247
|
public isBurst: boolean;
|
|
2415
2248
|
public readonly emoji: GuildEmoji | ReactionEmoji;
|
|
2416
2249
|
public me: boolean;
|
|
2417
|
-
public countDetails: ReactionCountDetailsData;
|
|
2418
2250
|
public message: Message | PartialMessage;
|
|
2419
2251
|
public readonly partial: false;
|
|
2420
2252
|
public users: ReactionUserManager;
|
|
@@ -2438,23 +2270,19 @@ export class MessageSelectMenu extends BaseMessageComponent {
|
|
|
2438
2270
|
public options: MessageSelectOption[];
|
|
2439
2271
|
public placeholder: string | null;
|
|
2440
2272
|
public type: SelectMenuComponentType;
|
|
2441
|
-
public addChannelTypes(...channelTypes: ChannelTypes[]): this;
|
|
2442
2273
|
public addOptions(...options: MessageSelectOptionData[] | MessageSelectOptionData[][]): this;
|
|
2443
2274
|
public setOptions(...options: MessageSelectOptionData[] | MessageSelectOptionData[][]): this;
|
|
2444
|
-
public setChannelTypes(...channelTypes: ChannelTypes[]): this;
|
|
2445
2275
|
public setCustomId(customId: string): this;
|
|
2446
2276
|
public setDisabled(disabled?: boolean): this;
|
|
2447
2277
|
public setMaxValues(maxValues: number): this;
|
|
2448
2278
|
public setMinValues(minValues: number): this;
|
|
2449
2279
|
public setPlaceholder(placeholder: string): this;
|
|
2450
|
-
public setType(type: SelectMenuComponentType | SelectMenuComponentTypes): this;
|
|
2451
2280
|
public spliceOptions(
|
|
2452
2281
|
index: number,
|
|
2453
2282
|
deleteCount: number,
|
|
2454
2283
|
...options: MessageSelectOptionData[] | MessageSelectOptionData[][]
|
|
2455
2284
|
): this;
|
|
2456
2285
|
public toJSON(): APISelectMenuComponent;
|
|
2457
|
-
public select(message: Message, values?: any[]): Promise<InteractionResponse>;
|
|
2458
2286
|
}
|
|
2459
2287
|
|
|
2460
2288
|
export class Modal {
|
|
@@ -2462,45 +2290,13 @@ export class Modal {
|
|
|
2462
2290
|
public components: MessageActionRow<ModalActionRowComponent>[];
|
|
2463
2291
|
public customId: string | null;
|
|
2464
2292
|
public title: string | null;
|
|
2465
|
-
public
|
|
2466
|
-
public
|
|
2467
|
-
public
|
|
2468
|
-
public readonly
|
|
2469
|
-
public
|
|
2470
|
-
|
|
2471
|
-
| MessageActionRow<ModalActionRowComponent>
|
|
2472
|
-
| (Required<BaseMessageComponentOptions> & MessageActionRowOptions<ModalActionRowComponentResolvable>)
|
|
2473
|
-
)[]
|
|
2474
|
-
): this;
|
|
2475
|
-
public setComponents(
|
|
2476
|
-
...components: (
|
|
2477
|
-
| MessageActionRow<ModalActionRowComponent>
|
|
2478
|
-
| (Required<BaseMessageComponentOptions> & MessageActionRowOptions<ModalActionRowComponentResolvable>)
|
|
2479
|
-
)[]
|
|
2480
|
-
): this;
|
|
2481
|
-
public setCustomId(customId: string): this;
|
|
2482
|
-
public spliceComponents(
|
|
2483
|
-
index: number,
|
|
2484
|
-
deleteCount: number,
|
|
2485
|
-
...components: (
|
|
2486
|
-
| MessageActionRow<ModalActionRowComponent>
|
|
2487
|
-
| (Required<BaseMessageComponentOptions> & MessageActionRowOptions<ModalActionRowComponentResolvable>)
|
|
2488
|
-
)[]
|
|
2489
|
-
): this;
|
|
2490
|
-
public setTitle(title: string): this;
|
|
2293
|
+
public readonly isMessage: false;
|
|
2294
|
+
public readonly guildId: Snowflake | null;
|
|
2295
|
+
public channelId: Snowflake;
|
|
2296
|
+
public readonly channel: TextBasedChannel;
|
|
2297
|
+
public readonly guild: Guild | null;
|
|
2298
|
+
public reply(): Promise<Message | Modal>;
|
|
2491
2299
|
public toJSON(): RawModalSubmitInteractionData;
|
|
2492
|
-
public reply(data: ModalReplyData): Promise<InteractionResponse>;
|
|
2493
|
-
}
|
|
2494
|
-
|
|
2495
|
-
export interface ModalReplyData {
|
|
2496
|
-
guild?: GuildResolvable;
|
|
2497
|
-
channel?: TextChannelResolvable;
|
|
2498
|
-
data?: TextInputComponentReplyData[];
|
|
2499
|
-
}
|
|
2500
|
-
|
|
2501
|
-
export interface TextInputComponentReplyData {
|
|
2502
|
-
customId: string;
|
|
2503
|
-
value: string;
|
|
2504
2300
|
}
|
|
2505
2301
|
|
|
2506
2302
|
export class ModalSubmitFieldsResolver {
|
|
@@ -2563,45 +2359,37 @@ export class OAuth2Guild extends BaseGuild {
|
|
|
2563
2359
|
public permissions: Readonly<Permissions>;
|
|
2564
2360
|
}
|
|
2565
2361
|
|
|
2566
|
-
export class
|
|
2567
|
-
'bulkDelete',
|
|
2362
|
+
export class GroupDMChannel extends TextBasedChannelMixin(Channel, [
|
|
2568
2363
|
'fetchWebhooks',
|
|
2569
2364
|
'createWebhook',
|
|
2570
2365
|
'setRateLimitPerUser',
|
|
2571
2366
|
'setNSFW',
|
|
2572
2367
|
]) {
|
|
2573
2368
|
private constructor(client: Client, data: RawPartialGroupDMChannelData);
|
|
2574
|
-
public type: 'GROUP_DM';
|
|
2575
2369
|
public name: string | null;
|
|
2576
2370
|
public icon: string | null;
|
|
2371
|
+
public flags: Readonly<ChannelFlags>;
|
|
2372
|
+
private _recipients: RawUserData[];
|
|
2373
|
+
public type: 'GROUP_DM';
|
|
2374
|
+
public ownerId: Snowflake;
|
|
2577
2375
|
public readonly recipients: Collection<Snowflake, User>;
|
|
2578
|
-
public
|
|
2579
|
-
public invites: Collection<string, Invite>;
|
|
2580
|
-
public lastMessageId: Snowflake | null;
|
|
2581
|
-
public lastPinTimestamp: number | null;
|
|
2582
|
-
public owner: User | null;
|
|
2583
|
-
public ownerId: Snowflake | null;
|
|
2584
|
-
public flags: null;
|
|
2585
|
-
public messageRequest: boolean | undefined;
|
|
2586
|
-
public messageRequestTimestamp: Date | undefined;
|
|
2587
|
-
public acceptMessageRequest(): Promise<this>;
|
|
2588
|
-
public cancelMessageRequest(): Promise<this>;
|
|
2376
|
+
public readonly owner: User;
|
|
2589
2377
|
public iconURL(options?: StaticImageURLOptions): string | null;
|
|
2590
|
-
public
|
|
2591
|
-
public
|
|
2592
|
-
public
|
|
2593
|
-
public
|
|
2378
|
+
public leave(slient?: boolean): Promise<this>;
|
|
2379
|
+
public edit(data: GroupDMChannelEditData): Promise<this>;
|
|
2380
|
+
public setIcon(icon: BufferResolvable | Base64Resolvable | null): Promise<this>;
|
|
2381
|
+
public setName(name: string): Promise<this>;
|
|
2382
|
+
public setOwner(owner: UserResolvable): Promise<this>;
|
|
2383
|
+
public addUser(user: UserResolvable): Promise<this>;
|
|
2384
|
+
public removeUser(user: UserResolvable): Promise<this>;
|
|
2594
2385
|
public getInvite(): Promise<Invite>;
|
|
2595
|
-
public
|
|
2596
|
-
public
|
|
2597
|
-
public
|
|
2598
|
-
public
|
|
2386
|
+
public fetchAllInvite(): Promise<Collection<string, Invite>>;
|
|
2387
|
+
public deleteInvite(invite: InviteResolvable): Promise<this>;
|
|
2388
|
+
public sync(): void;
|
|
2389
|
+
public ring(recipients?: UserResolvable[]): Promise<void>;
|
|
2599
2390
|
public readonly voiceAdapterCreator: InternalDiscordGatewayAdapterCreator;
|
|
2600
|
-
public call(options?: CallOptions): Promise<VoiceConnection>;
|
|
2601
|
-
public sync(): undefined;
|
|
2602
2391
|
public readonly shard: WebSocketShard;
|
|
2603
2392
|
public readonly voiceUsers: Collection<Snowflake, User>;
|
|
2604
|
-
public readonly voiceConnection?: VoiceConnection;
|
|
2605
2393
|
}
|
|
2606
2394
|
|
|
2607
2395
|
export class PermissionOverwrites extends Base {
|
|
@@ -2637,8 +2425,9 @@ export class Permissions extends BitField<PermissionString, bigint> {
|
|
|
2637
2425
|
|
|
2638
2426
|
export class Presence extends Base {
|
|
2639
2427
|
protected constructor(client: Client, data?: RawPresenceData);
|
|
2640
|
-
public activities: Activity[];
|
|
2428
|
+
public activities: (Activity | CustomStatus | RichPresence | SpotifyRPC)[];
|
|
2641
2429
|
public clientStatus: ClientPresenceStatusData | null;
|
|
2430
|
+
public lastModified: number | null;
|
|
2642
2431
|
public guild: Guild | null;
|
|
2643
2432
|
public readonly member: GuildMember | null;
|
|
2644
2433
|
public status: PresenceStatus;
|
|
@@ -2702,6 +2491,7 @@ export class Role extends Base {
|
|
|
2702
2491
|
/** @deprecated This will be removed in the next major version, see https://github.com/discordjs/discord.js/issues/7091 */
|
|
2703
2492
|
public deleted: boolean;
|
|
2704
2493
|
public readonly editable: boolean;
|
|
2494
|
+
public flags: Readonly<RoleFlags>;
|
|
2705
2495
|
public guild: Guild;
|
|
2706
2496
|
public readonly hexColor: HexColorString;
|
|
2707
2497
|
public hoist: boolean;
|
|
@@ -2737,6 +2527,13 @@ export class Role extends Base {
|
|
|
2737
2527
|
public static comparePositions(role1: Role, role2: Role): number;
|
|
2738
2528
|
}
|
|
2739
2529
|
|
|
2530
|
+
export class RoleFlags extends BitField<RoleFlagsString> {
|
|
2531
|
+
public static FLAGS: Record<RoleFlagsString, number>;
|
|
2532
|
+
public static resolve(bit?: BitFieldResolvable<RoleFlagsString, number>): number;
|
|
2533
|
+
}
|
|
2534
|
+
|
|
2535
|
+
export type RoleFlagsString = 'IN_PROMPT';
|
|
2536
|
+
|
|
2740
2537
|
export class BaseSelectMenuInteraction<
|
|
2741
2538
|
Cached extends CacheType = CacheType,
|
|
2742
2539
|
> extends MessageComponentInteraction<Cached> {
|
|
@@ -2829,6 +2626,7 @@ export interface ShardEventTypes {
|
|
|
2829
2626
|
error: [error: Error];
|
|
2830
2627
|
message: [message: any];
|
|
2831
2628
|
}
|
|
2629
|
+
|
|
2832
2630
|
export class Shard extends EventEmitter {
|
|
2833
2631
|
private constructor(manager: ShardingManager, id: number);
|
|
2834
2632
|
private _evals: Map<string, Promise<unknown>>;
|
|
@@ -2932,6 +2730,11 @@ export class ShardingManager extends EventEmitter {
|
|
|
2932
2730
|
public once(event: 'shardCreate', listener: (shard: Shard) => Awaitable<void>): this;
|
|
2933
2731
|
}
|
|
2934
2732
|
|
|
2733
|
+
export interface FetchRecommendedShardsOptions {
|
|
2734
|
+
guildsPerShard?: number;
|
|
2735
|
+
multipleOf?: number;
|
|
2736
|
+
}
|
|
2737
|
+
|
|
2935
2738
|
export class SnowflakeUtil extends null {
|
|
2936
2739
|
private constructor();
|
|
2937
2740
|
public static deconstruct(snowflake: Snowflake): DeconstructedSnowflake;
|
|
@@ -3107,9 +2910,6 @@ export class Team extends Base {
|
|
|
3107
2910
|
public readonly createdTimestamp: number;
|
|
3108
2911
|
|
|
3109
2912
|
public iconURL(options?: StaticImageURLOptions): string | null;
|
|
3110
|
-
public inviteMemeber(user: User, MFACode: number): Promise<TeamMember>;
|
|
3111
|
-
public removeMemeber(userID: Snowflake): boolean;
|
|
3112
|
-
public delete(MFACode: string): Promise<boolean>;
|
|
3113
2913
|
public toJSON(): unknown;
|
|
3114
2914
|
public toString(): string;
|
|
3115
2915
|
}
|
|
@@ -3131,6 +2931,58 @@ export class TextChannel extends BaseGuildTextChannel {
|
|
|
3131
2931
|
public type: 'GUILD_TEXT';
|
|
3132
2932
|
}
|
|
3133
2933
|
|
|
2934
|
+
export interface GuildForumTagEmoji {
|
|
2935
|
+
id: Snowflake | null;
|
|
2936
|
+
name: string | null;
|
|
2937
|
+
}
|
|
2938
|
+
|
|
2939
|
+
export interface GuildForumTag {
|
|
2940
|
+
id: Snowflake;
|
|
2941
|
+
name: string;
|
|
2942
|
+
moderated: boolean;
|
|
2943
|
+
emoji: GuildForumTagEmoji | null;
|
|
2944
|
+
}
|
|
2945
|
+
|
|
2946
|
+
export type GuildForumTagData = Partial<GuildForumTag> & { name: string };
|
|
2947
|
+
|
|
2948
|
+
export interface DefaultReactionEmoji {
|
|
2949
|
+
id: Snowflake | null;
|
|
2950
|
+
name: string | null;
|
|
2951
|
+
}
|
|
2952
|
+
|
|
2953
|
+
export class ForumChannel extends TextBasedChannelMixin(GuildChannel, [
|
|
2954
|
+
'send',
|
|
2955
|
+
'lastMessage',
|
|
2956
|
+
'lastPinAt',
|
|
2957
|
+
'sendTyping',
|
|
2958
|
+
'createMessageCollector',
|
|
2959
|
+
'awaitMessages',
|
|
2960
|
+
]) {
|
|
2961
|
+
public type: 'GUILD_FORUM';
|
|
2962
|
+
public threads: GuildForumThreadManager;
|
|
2963
|
+
public availableTags: GuildForumTag[];
|
|
2964
|
+
public defaultReactionEmoji: DefaultReactionEmoji | null;
|
|
2965
|
+
public defaultThreadRateLimitPerUser: number | null;
|
|
2966
|
+
public rateLimitPerUser: number | null;
|
|
2967
|
+
public defaultAutoArchiveDuration: ThreadAutoArchiveDuration | null;
|
|
2968
|
+
public nsfw: boolean;
|
|
2969
|
+
public topic: string | null;
|
|
2970
|
+
public defaultSortOrder: SortOrderType | null;
|
|
2971
|
+
public defaultForumLayout: ForumLayoutType;
|
|
2972
|
+
public setAvailableTags(tags: GuildForumTagData[], reason?: string): Promise<this>;
|
|
2973
|
+
public setDefaultReactionEmoji(emojiId: DefaultReactionEmoji | null, reason?: string): Promise<this>;
|
|
2974
|
+
public setDefaultThreadRateLimitPerUser(rateLimit: number, reason?: string): Promise<this>;
|
|
2975
|
+
public createInvite(options?: CreateInviteOptions): Promise<Invite>;
|
|
2976
|
+
public fetchInvites(cache?: boolean): Promise<Collection<string, Invite>>;
|
|
2977
|
+
public setDefaultAutoArchiveDuration(
|
|
2978
|
+
defaultAutoArchiveDuration: ThreadAutoArchiveDuration,
|
|
2979
|
+
reason?: string,
|
|
2980
|
+
): Promise<this>;
|
|
2981
|
+
public setTopic(topic: string | null, reason?: string): Promise<this>;
|
|
2982
|
+
public setDefaultSortOrder(defaultSortOrder: SortOrderType | null, reason?: string): Promise<this>;
|
|
2983
|
+
public setDefaultForumLayout(defaultForumLayout: ForumLayoutType, reason?: string): Promise<this>;
|
|
2984
|
+
}
|
|
2985
|
+
|
|
3134
2986
|
export class TextInputComponent extends BaseMessageComponent {
|
|
3135
2987
|
public constructor(data?: TextInputComponent | TextInputComponentOptions);
|
|
3136
2988
|
public customId: string | null;
|
|
@@ -3141,13 +2993,6 @@ export class TextInputComponent extends BaseMessageComponent {
|
|
|
3141
2993
|
public placeholder: string | null;
|
|
3142
2994
|
public style: TextInputStyle;
|
|
3143
2995
|
public value: string | null;
|
|
3144
|
-
public setCustomId(customId: string): this;
|
|
3145
|
-
public setLabel(label: string): this;
|
|
3146
|
-
public setRequired(required?: boolean): this;
|
|
3147
|
-
public setMaxLength(maxLength: number): this;
|
|
3148
|
-
public setMinLength(minLength: number): this;
|
|
3149
|
-
public setPlaceholder(placeholder: string): this;
|
|
3150
|
-
public setStyle(style: TextInputStyleResolvable): this;
|
|
3151
2996
|
public setValue(value: string): this;
|
|
3152
2997
|
public toJSON(): RawTextInputComponentData;
|
|
3153
2998
|
public static resolveStyle(style: TextInputStyleResolvable): TextInputStyle;
|
|
@@ -3156,7 +3001,6 @@ export class TextInputComponent extends BaseMessageComponent {
|
|
|
3156
3001
|
export class ThreadChannel extends TextBasedChannelMixin(Channel, ['fetchWebhooks', 'createWebhook', 'setNSFW']) {
|
|
3157
3002
|
private constructor(guild: Guild, data?: RawThreadChannelData, client?: Client);
|
|
3158
3003
|
public archived: boolean | null;
|
|
3159
|
-
public readonly firstMessage: Message | null;
|
|
3160
3004
|
public readonly archivedAt: Date | null;
|
|
3161
3005
|
public archiveTimestamp: number | null;
|
|
3162
3006
|
public readonly createdAt: Date | null;
|
|
@@ -3252,15 +3096,15 @@ export class Typing extends Base {
|
|
|
3252
3096
|
export class User extends PartialTextBasedChannel(Base) {
|
|
3253
3097
|
protected constructor(client: Client, data: RawUserData);
|
|
3254
3098
|
private _equals(user: APIUser): boolean;
|
|
3255
|
-
|
|
3099
|
+
|
|
3256
3100
|
public accentColor: number | null | undefined;
|
|
3257
3101
|
public avatar: string | null;
|
|
3258
3102
|
public avatarDecoration: string | null;
|
|
3103
|
+
public avatarDecorationSKUId: Snowflake | null;
|
|
3259
3104
|
public banner: string | null | undefined;
|
|
3105
|
+
public bannerColor: string | null | undefined;
|
|
3260
3106
|
public bot: boolean;
|
|
3261
|
-
public pronouns: string | null;
|
|
3262
3107
|
public readonly createdAt: Date;
|
|
3263
|
-
public readonly relationships: RelationshipTypes;
|
|
3264
3108
|
public readonly createdTimestamp: number;
|
|
3265
3109
|
public discriminator: string;
|
|
3266
3110
|
public readonly displayName: string;
|
|
@@ -3268,22 +3112,16 @@ export class User extends PartialTextBasedChannel(Base) {
|
|
|
3268
3112
|
public readonly dmChannel: DMChannel | null;
|
|
3269
3113
|
public flags: Readonly<UserFlags> | null;
|
|
3270
3114
|
public globalName: string | null;
|
|
3271
|
-
public botInGuildsCount: number | null | undefined;
|
|
3272
3115
|
public readonly hexAccentColor: HexColorString | null | undefined;
|
|
3273
3116
|
public id: Snowflake;
|
|
3274
3117
|
public readonly partial: false;
|
|
3275
3118
|
public system: boolean;
|
|
3276
3119
|
public readonly tag: string;
|
|
3277
3120
|
public username: string;
|
|
3278
|
-
public readonly note: string |
|
|
3279
|
-
public readonly
|
|
3280
|
-
public
|
|
3281
|
-
public
|
|
3282
|
-
public premiumGuildSince: Date;
|
|
3283
|
-
public bio: string | null;
|
|
3284
|
-
public readonly mutualGuilds: Collection<Snowflake, object>;
|
|
3285
|
-
public readonly mutualFriends: Promise<Collection<Snowflake, User>>;
|
|
3286
|
-
public readonly voice: VoiceState;
|
|
3121
|
+
public readonly note: string | undefined;
|
|
3122
|
+
public readonly voice?: VoiceState;
|
|
3123
|
+
public readonly relationship: RelationshipTypes;
|
|
3124
|
+
public readonly friendNickname: string | null | undefined;
|
|
3287
3125
|
public avatarURL(options?: ImageURLOptions): string | null;
|
|
3288
3126
|
public avatarDecorationURL(options?: StaticImageURLOptions): string | null;
|
|
3289
3127
|
public bannerURL(options?: ImageURLOptions): string | null;
|
|
@@ -3293,18 +3131,12 @@ export class User extends PartialTextBasedChannel(Base) {
|
|
|
3293
3131
|
public equals(user: User): boolean;
|
|
3294
3132
|
public fetch(force?: boolean): Promise<User>;
|
|
3295
3133
|
public fetchFlags(force?: boolean): Promise<UserFlags>;
|
|
3296
|
-
public
|
|
3297
|
-
public setBlock(): Promise<User>;
|
|
3298
|
-
public sendFriendRequest(): Promise<User>;
|
|
3299
|
-
public unFriend(): Promise<User>;
|
|
3300
|
-
public unBlock(): Promise<User>;
|
|
3301
|
-
public setNote(note?: any): Promise<string>;
|
|
3302
|
-
public getProfile(guildId?: Snowflake): Promise<User>;
|
|
3303
|
-
public setNickname(nickname: string | null): Promise<boolean>;
|
|
3134
|
+
public setNote(note: string | null | undefined): Promise<this>;
|
|
3304
3135
|
public toString(): UserMention;
|
|
3305
|
-
public
|
|
3306
|
-
public
|
|
3307
|
-
public
|
|
3136
|
+
public getProfile(guildId?: Snowflake): Promise<any>;
|
|
3137
|
+
public ring(): Promise<void>;
|
|
3138
|
+
public sendFriendRequest(): Promise<boolean>;
|
|
3139
|
+
public deleteRelationship(): Promise<boolean>;
|
|
3308
3140
|
}
|
|
3309
3141
|
|
|
3310
3142
|
export class UserContextMenuInteraction<Cached extends CacheType = CacheType> extends ContextMenuInteraction<Cached> {
|
|
@@ -3347,6 +3179,7 @@ export class Util extends null {
|
|
|
3347
3179
|
public static escapeNumberedList(text: string): string;
|
|
3348
3180
|
public static escapeMaskedLink(text: string): string;
|
|
3349
3181
|
public static cleanCodeBlockContent(text: string): string;
|
|
3182
|
+
public static fetchRecommendedShards(token: string, options?: FetchRecommendedShardsOptions): Promise<number>;
|
|
3350
3183
|
public static flatten(obj: unknown, ...props: Record<string, boolean | string>[]): unknown;
|
|
3351
3184
|
public static makeError(obj: MakeErrorOptions): Error;
|
|
3352
3185
|
public static makePlainError(err: Error): MakeErrorOptions;
|
|
@@ -3375,7 +3208,21 @@ export class Formatters extends null {
|
|
|
3375
3208
|
public static blockQuote: typeof blockQuote;
|
|
3376
3209
|
public static bold: typeof bold;
|
|
3377
3210
|
public static channelMention: typeof channelMention;
|
|
3378
|
-
public static chatInputApplicationCommandMention
|
|
3211
|
+
public static chatInputApplicationCommandMention<
|
|
3212
|
+
N extends string,
|
|
3213
|
+
G extends string,
|
|
3214
|
+
S extends string,
|
|
3215
|
+
I extends Snowflake,
|
|
3216
|
+
>(commandName: N, subcommandGroupName: G, subcommandName: S, commandId: I): `</${N} ${G} ${S}:${I}>`;
|
|
3217
|
+
public static chatInputApplicationCommandMention<N extends string, S extends string, I extends Snowflake>(
|
|
3218
|
+
commandName: N,
|
|
3219
|
+
subcommandName: S,
|
|
3220
|
+
commandId: I,
|
|
3221
|
+
): `</${N} ${S}:${I}>`;
|
|
3222
|
+
public static chatInputApplicationCommandMention<N extends string, I extends Snowflake>(
|
|
3223
|
+
commandName: N,
|
|
3224
|
+
commandId: I,
|
|
3225
|
+
): `</${N}:${I}>`;
|
|
3379
3226
|
public static codeBlock: typeof codeBlock;
|
|
3380
3227
|
public static formatEmoji: typeof formatEmoji;
|
|
3381
3228
|
public static hideLinkEmbed: typeof hideLinkEmbed;
|
|
@@ -3414,12 +3261,13 @@ export class VoiceRegion {
|
|
|
3414
3261
|
|
|
3415
3262
|
export class VoiceState extends Base {
|
|
3416
3263
|
private constructor(guild: Guild, data: RawVoiceStateData);
|
|
3417
|
-
public readonly channel: VoiceBasedChannel | null;
|
|
3264
|
+
public readonly channel: VoiceBasedChannel | DMChannel | GroupDMChannel | null;
|
|
3418
3265
|
public channelId: Snowflake | null;
|
|
3419
3266
|
public readonly deaf: boolean | null;
|
|
3420
3267
|
public guild: Guild;
|
|
3421
3268
|
public id: Snowflake;
|
|
3422
3269
|
public readonly member: GuildMember | null;
|
|
3270
|
+
public readonly user: User | null;
|
|
3423
3271
|
public readonly mute: boolean | null;
|
|
3424
3272
|
public selfDeaf: boolean | null;
|
|
3425
3273
|
public selfMute: boolean | null;
|
|
@@ -3430,14 +3278,16 @@ export class VoiceState extends Base {
|
|
|
3430
3278
|
public selfVideo: boolean | null;
|
|
3431
3279
|
public suppress: boolean;
|
|
3432
3280
|
public requestToSpeakTimestamp: number | null;
|
|
3433
|
-
|
|
3281
|
+
|
|
3434
3282
|
public setDeaf(deaf?: boolean, reason?: string): Promise<GuildMember>;
|
|
3435
3283
|
public setMute(mute?: boolean, reason?: string): Promise<GuildMember>;
|
|
3436
3284
|
public disconnect(reason?: string): Promise<GuildMember>;
|
|
3437
3285
|
public setChannel(channel: GuildVoiceChannelResolvable | null, reason?: string): Promise<GuildMember>;
|
|
3438
3286
|
public setRequestToSpeak(request?: boolean): Promise<void>;
|
|
3439
3287
|
public setSuppressed(suppressed?: boolean): Promise<void>;
|
|
3288
|
+
public setStatus(status?: string): Promise<void>;
|
|
3440
3289
|
public getPreview(): Promise<string>;
|
|
3290
|
+
public postPreview(base64Image: string): Promise<void>;
|
|
3441
3291
|
}
|
|
3442
3292
|
|
|
3443
3293
|
export class Webhook extends WebhookMixin() {
|
|
@@ -3519,8 +3369,8 @@ export class WebSocketShard extends EventEmitter {
|
|
|
3519
3369
|
private constructor(manager: WebSocketManager, id: number);
|
|
3520
3370
|
private sequence: number;
|
|
3521
3371
|
private closeSequence: number;
|
|
3522
|
-
private sessionId: string | null;
|
|
3523
3372
|
private resumeURL: string | null;
|
|
3373
|
+
private sessionId: string | null;
|
|
3524
3374
|
private lastPingTimestamp: number;
|
|
3525
3375
|
private lastHeartbeatAcked: boolean;
|
|
3526
3376
|
private ratelimit: { queue: unknown[]; total: number; remaining: number; time: 60e3; timer: NodeJS.Timeout | null };
|
|
@@ -3663,6 +3513,7 @@ export const Constants: {
|
|
|
3663
3513
|
size: AllowedImageSize,
|
|
3664
3514
|
dynamic: boolean,
|
|
3665
3515
|
): string;
|
|
3516
|
+
AvatarDecoration(userId: Snowflake, hash: string, format: AllowedImageFormat, size: AllowedImageSize): string;
|
|
3666
3517
|
Banner(id: Snowflake, hash: string, format: DynamicImageFormat, size: AllowedImageSize, dynamic: boolean): string;
|
|
3667
3518
|
DefaultAvatar(index: number): string;
|
|
3668
3519
|
DiscoverySplash(guildId: Snowflake, hash: string, format: AllowedImageFormat, size: AllowedImageSize): string;
|
|
@@ -3703,10 +3554,8 @@ export const Constants: {
|
|
|
3703
3554
|
GuildScheduledEventPrivacyLevels: EnumHolder<typeof GuildScheduledEventPrivacyLevels>;
|
|
3704
3555
|
GuildScheduledEventStatuses: EnumHolder<typeof GuildScheduledEventStatuses>;
|
|
3705
3556
|
IntegrationExpireBehaviors: IntegrationExpireBehaviors[];
|
|
3706
|
-
|
|
3707
|
-
|
|
3708
|
-
InviteScopes: InviteScope[];
|
|
3709
|
-
MaxBulkDeletableMessageAge: 1_209_600_000;
|
|
3557
|
+
SelectMenuComponentTypes: EnumHolder<typeof SelectMenuComponentTypes>;
|
|
3558
|
+
RelationshipTypes: EnumHolder<typeof RelationshipTypes>;
|
|
3710
3559
|
MembershipStates: EnumHolder<typeof MembershipStates>;
|
|
3711
3560
|
MessageButtonStyles: EnumHolder<typeof MessageButtonStyles>;
|
|
3712
3561
|
MessageComponentTypes: EnumHolder<typeof MessageComponentTypes>;
|
|
@@ -3747,6 +3596,7 @@ export const Constants: {
|
|
|
3747
3596
|
TextInputStyles: EnumHolder<typeof TextInputStyles>;
|
|
3748
3597
|
ThreadChannelTypes: ThreadChannelTypes[];
|
|
3749
3598
|
UserAgent: string;
|
|
3599
|
+
ciphers: string[];
|
|
3750
3600
|
VerificationLevels: EnumHolder<typeof VerificationLevels>;
|
|
3751
3601
|
VideoQualityModes: EnumHolder<typeof VideoQualityModes>;
|
|
3752
3602
|
VoiceBasedChannelTypes: VoiceBasedChannelTypes[];
|
|
@@ -3763,15 +3613,6 @@ export const Constants: {
|
|
|
3763
3613
|
WSEvents: {
|
|
3764
3614
|
[K in WSEventType]: K;
|
|
3765
3615
|
};
|
|
3766
|
-
// Add
|
|
3767
|
-
defaultUA: string;
|
|
3768
|
-
captchaServices: captchaServices[];
|
|
3769
|
-
DMScanLevel: EnumHolder<typeof DMScanLevel>;
|
|
3770
|
-
stickerAnimationMode: EnumHolder<typeof stickerAnimationMode>;
|
|
3771
|
-
NitroType: EnumHolder<typeof NitroTypes>;
|
|
3772
|
-
HypeSquadType: EnumHolder<typeof HypeSquadTypes>;
|
|
3773
|
-
localeSetting: EnumHolder<typeof localeSettings>;
|
|
3774
|
-
userGateway: string;
|
|
3775
3616
|
};
|
|
3776
3617
|
|
|
3777
3618
|
export const version: string;
|
|
@@ -3797,7 +3638,7 @@ export abstract class DataManager<K, Holds, R> extends BaseManager {
|
|
|
3797
3638
|
}
|
|
3798
3639
|
|
|
3799
3640
|
export abstract class CachedManager<K, Holds, R> extends DataManager<K, Holds, R> {
|
|
3800
|
-
protected constructor(client: Client, holds: Constructable<Holds>);
|
|
3641
|
+
protected constructor(client: Client, holds: Constructable<Holds>, iterable?: Iterable<Holds>);
|
|
3801
3642
|
private readonly _cache: Collection<K, Holds>;
|
|
3802
3643
|
private _add(data: unknown, cache?: boolean, { id, extras }?: { id: K; extras: unknown[] }): Holds;
|
|
3803
3644
|
}
|
|
@@ -3813,8 +3654,7 @@ export class ApplicationCommandManager<
|
|
|
3813
3654
|
PermissionsOptionsExtras = { guild: GuildResolvable },
|
|
3814
3655
|
PermissionsGuildType = null,
|
|
3815
3656
|
> extends CachedManager<Snowflake, ApplicationCommandScope, ApplicationCommandResolvable> {
|
|
3816
|
-
|
|
3817
|
-
protected constructor(client: Client, iterable?: Iterable<unknown>, user: User);
|
|
3657
|
+
protected constructor(client: Client, iterable?: Iterable<unknown>);
|
|
3818
3658
|
public permissions: ApplicationCommandPermissionsManager<
|
|
3819
3659
|
{ command?: ApplicationCommandResolvable } & PermissionsOptionsExtras,
|
|
3820
3660
|
{ command: ApplicationCommandResolvable } & PermissionsOptionsExtras,
|
|
@@ -3859,11 +3699,8 @@ export class ApplicationCommandPermissionsManager<
|
|
|
3859
3699
|
GuildType,
|
|
3860
3700
|
CommandIdType,
|
|
3861
3701
|
> extends BaseManager {
|
|
3862
|
-
private constructor(
|
|
3863
|
-
|
|
3864
|
-
user: User,
|
|
3865
|
-
);
|
|
3866
|
-
private manager: ApplicationCommandManager | GuildApplicationCommandManager | ApplicationCommand;
|
|
3702
|
+
private constructor(manager: ApplicationCommandManager | ApplicationCommand);
|
|
3703
|
+
private manager: ApplicationCommandManager | ApplicationCommand;
|
|
3867
3704
|
|
|
3868
3705
|
public client: Client;
|
|
3869
3706
|
public commandId: CommandIdType;
|
|
@@ -3910,71 +3747,72 @@ export class BaseGuildEmojiManager extends CachedManager<Snowflake, GuildEmoji,
|
|
|
3910
3747
|
export class ChannelManager extends CachedManager<Snowflake, AnyChannel, ChannelResolvable> {
|
|
3911
3748
|
private constructor(client: Client, iterable: Iterable<RawChannelData>);
|
|
3912
3749
|
public fetch(id: Snowflake, options?: FetchChannelOptions): Promise<AnyChannel | null>;
|
|
3913
|
-
public createGroupDM(recipients: UserResolvable[]): Promise<
|
|
3750
|
+
public createGroupDM(recipients: UserResolvable[]): Promise<GroupDMChannel>;
|
|
3914
3751
|
}
|
|
3915
3752
|
|
|
3916
|
-
export
|
|
3917
|
-
|
|
3918
|
-
|
|
3919
|
-
|
|
3920
|
-
|
|
3753
|
+
export class RelationshipManager extends BaseManager {
|
|
3754
|
+
constructor(
|
|
3755
|
+
client: Client,
|
|
3756
|
+
data: {
|
|
3757
|
+
user: RawUserData;
|
|
3758
|
+
type: RelationshipTypes;
|
|
3759
|
+
since?: string;
|
|
3760
|
+
nickname: string | null | undefined;
|
|
3761
|
+
id: Snowflake;
|
|
3762
|
+
}[],
|
|
3763
|
+
);
|
|
3764
|
+
public cache: Collection<Snowflake, RelationshipTypes>;
|
|
3765
|
+
public friendNicknames: Collection<Snowflake, string | null>;
|
|
3766
|
+
public sinceCache: Collection<Snowflake, Date>;
|
|
3767
|
+
public readonly friendCache: Collection<Snowflake, User>;
|
|
3768
|
+
public readonly blockedCache: Collection<Snowflake, User>;
|
|
3769
|
+
public readonly incomingCache: Collection<Snowflake, User>;
|
|
3770
|
+
public readonly outgoingCache: Collection<Snowflake, User>;
|
|
3771
|
+
public toJSON(): { type: RelationshipTypes; since: string; nickname: string | null | undefined; id: Snowflake }[];
|
|
3772
|
+
public resolveId(user: UserResolvable): Snowflake | undefined;
|
|
3773
|
+
public fetch(user?: UserResolvable, options?: BaseFetchOptions): Promise<RelationshipTypes | RelationshipManager>;
|
|
3774
|
+
public deleteRelationship(user: UserResolvable): Promise<boolean>;
|
|
3775
|
+
public sendFriendRequest(options: FriendRequestOptions): Promise<boolean>;
|
|
3776
|
+
public addFriend(user: UserResolvable): Promise<boolean>;
|
|
3777
|
+
public setNickname(user: UserResolvable, nickname: string | null | undefined): Promise<boolean>;
|
|
3778
|
+
public addBlocked(user: UserResolvable): Promise<boolean>;
|
|
3921
3779
|
}
|
|
3922
3780
|
|
|
3923
|
-
export
|
|
3924
|
-
|
|
3925
|
-
|
|
3926
|
-
|
|
3927
|
-
|
|
3928
|
-
|
|
3929
|
-
export class GuildFolder extends Base {
|
|
3930
|
-
private constructor(client: Client, data: RawGuildFolderData);
|
|
3931
|
-
public id: number | null;
|
|
3932
|
-
public name: string | null;
|
|
3933
|
-
public guild_ids: Snowflake[];
|
|
3934
|
-
public color: number | null;
|
|
3935
|
-
public readonly hexColor: string | null;
|
|
3936
|
-
public readonly guilds: Collection<Snowflake, Guild>;
|
|
3937
|
-
public toJSON(): RawGuildFolderData;
|
|
3781
|
+
export class UserNoteManager extends BaseManager {
|
|
3782
|
+
constructor(client: Client, users: { [key: Snowflake]: string }[]);
|
|
3783
|
+
public cache: Collection<Snowflake, string>;
|
|
3784
|
+
private _reload(data: { [key: Snowflake]: string }): this;
|
|
3785
|
+
public updateNote(id: Snowflake, note: string | null | undefined): Promise<this>;
|
|
3786
|
+
public fetch(user: UserResolvable, options?: BaseFetchOptions): Promise<string>;
|
|
3938
3787
|
}
|
|
3939
3788
|
|
|
3789
|
+
export type FetchGuildApplicationCommandFetchOptions = Omit<FetchApplicationCommandOptions, 'guildId'>;
|
|
3790
|
+
|
|
3940
3791
|
export class ClientUserSettingManager extends BaseManager {
|
|
3941
3792
|
private constructor(client: Client);
|
|
3942
|
-
public
|
|
3943
|
-
public locale
|
|
3944
|
-
public activityDisplay
|
|
3945
|
-
public
|
|
3946
|
-
public displayImage
|
|
3947
|
-
public linkedImageDisplay
|
|
3948
|
-
public autoplayGIF
|
|
3949
|
-
public previewLink
|
|
3950
|
-
public
|
|
3951
|
-
public allowTTS
|
|
3952
|
-
public compactMode
|
|
3953
|
-
public convertEmoticons
|
|
3954
|
-
public DMScanLevel
|
|
3955
|
-
public theme
|
|
3956
|
-
public developerMode
|
|
3957
|
-
public afkTimeout
|
|
3958
|
-
public stickerAnimationMode
|
|
3959
|
-
public showEmojiReactions
|
|
3960
|
-
public
|
|
3961
|
-
|
|
3962
|
-
text?: string;
|
|
3963
|
-
expires_at?: string | null;
|
|
3964
|
-
emoji_name?: string;
|
|
3965
|
-
emoji_id?: Snowflake | null;
|
|
3966
|
-
status?: PresenceStatusData;
|
|
3967
|
-
}
|
|
3968
|
-
| object;
|
|
3969
|
-
public addFriendFrom: { all?: boolean; mutual_friends?: boolean; mututal_guilds?: boolean } | object;
|
|
3970
|
-
public guildFolder: GuildFolderManager;
|
|
3971
|
-
public disableDMfromServer: Collection<Snowflake, boolean>;
|
|
3972
|
-
public fetch(): Promise<RawUserSettingsData>;
|
|
3793
|
+
public readonly raw: RawUserSettingsData;
|
|
3794
|
+
public locale?: string;
|
|
3795
|
+
public activityDisplay?: boolean;
|
|
3796
|
+
public allowDMsFromGuild?: boolean;
|
|
3797
|
+
public displayImage?: boolean;
|
|
3798
|
+
public linkedImageDisplay?: boolean;
|
|
3799
|
+
public autoplayGIF?: boolean;
|
|
3800
|
+
public previewLink?: boolean;
|
|
3801
|
+
public animatedEmoji?: boolean;
|
|
3802
|
+
public allowTTS?: boolean;
|
|
3803
|
+
public compactMode?: boolean;
|
|
3804
|
+
public convertEmoticons?: boolean;
|
|
3805
|
+
public DMScanLevel?: 0 | 1 | 2;
|
|
3806
|
+
public theme?: 'dark' | 'light';
|
|
3807
|
+
public developerMode?: boolean;
|
|
3808
|
+
public afkTimeout?: number;
|
|
3809
|
+
public stickerAnimationMode?: 0 | 1 | 2;
|
|
3810
|
+
public showEmojiReactions?: boolean;
|
|
3811
|
+
public disableDMfromGuilds: Collection<Snowflake, Guild>;
|
|
3812
|
+
public fetch(): Promise<this>;
|
|
3973
3813
|
public edit(data: Partial<RawUserSettingsData>): Promise<this>;
|
|
3974
|
-
public
|
|
3975
|
-
public setTheme(value
|
|
3976
|
-
public setLocale(value: localeSetting): Promise<this>;
|
|
3977
|
-
// @ts-ignore
|
|
3814
|
+
public toggleCompactMode(): Promise<this>;
|
|
3815
|
+
public setTheme(value: 'dark' | 'light'): Promise<this>;
|
|
3978
3816
|
public setCustomStatus(value?: CustomStatusOption | CustomStatus): Promise<this>;
|
|
3979
3817
|
public restrictedGuilds(status: boolean): Promise<void>;
|
|
3980
3818
|
public addRestrictedGuild(guildId: GuildResolvable): Promise<void>;
|
|
@@ -3982,8 +3820,8 @@ export class ClientUserSettingManager extends BaseManager {
|
|
|
3982
3820
|
}
|
|
3983
3821
|
|
|
3984
3822
|
export class GuildSettingManager extends BaseManager {
|
|
3985
|
-
private constructor(
|
|
3986
|
-
public
|
|
3823
|
+
private constructor(guild: Guild);
|
|
3824
|
+
public readonly raw?: RawGuildSettingsData;
|
|
3987
3825
|
public suppressEveryone?: boolean;
|
|
3988
3826
|
public suppressRoles?: boolean;
|
|
3989
3827
|
public muteScheduledEvents?: boolean;
|
|
@@ -4001,22 +3839,81 @@ export class GuildSettingManager extends BaseManager {
|
|
|
4001
3839
|
public edit(data: Partial<RawGuildSettingsData>): Promise<this>;
|
|
4002
3840
|
}
|
|
4003
3841
|
|
|
4004
|
-
export
|
|
4005
|
-
|
|
4006
|
-
|
|
4007
|
-
|
|
4008
|
-
|
|
4009
|
-
|
|
4010
|
-
|
|
4011
|
-
|
|
4012
|
-
|
|
4013
|
-
|
|
4014
|
-
|
|
4015
|
-
|
|
4016
|
-
|
|
4017
|
-
|
|
4018
|
-
|
|
4019
|
-
|
|
3842
|
+
export interface CustomStatusOption {
|
|
3843
|
+
text?: string | null;
|
|
3844
|
+
expires_at?: string | null;
|
|
3845
|
+
emoji?: EmojiIdentifierResolvable | null;
|
|
3846
|
+
status?: PresenceStatusData | null;
|
|
3847
|
+
}
|
|
3848
|
+
|
|
3849
|
+
// Source: https://luna.gitlab.io/discord-unofficial-docs/user_settings.html
|
|
3850
|
+
export interface RawUserSettingsData {
|
|
3851
|
+
afk_timeout?: number;
|
|
3852
|
+
allow_accessibility_detection?: boolean;
|
|
3853
|
+
animate_emoji?: boolean;
|
|
3854
|
+
animate_stickers?: number;
|
|
3855
|
+
contact_sync_enabled?: boolean;
|
|
3856
|
+
convert_emoticons?: boolean;
|
|
3857
|
+
custom_status?: { text?: string; expires_at?: string | null; emoji_name?: string; emoji_id?: Snowflake | null };
|
|
3858
|
+
default_guilds_restricted?: boolean;
|
|
3859
|
+
detect_platform_accounts?: boolean;
|
|
3860
|
+
developer_mode?: boolean;
|
|
3861
|
+
disable_games_tab?: boolean;
|
|
3862
|
+
enable_tts_command?: boolean;
|
|
3863
|
+
explicit_content_filter?: number;
|
|
3864
|
+
friend_discovery_flags?: number;
|
|
3865
|
+
friend_source_flags?: { all?: boolean; mutual_friends?: boolean; mututal_guilds?: boolean };
|
|
3866
|
+
gif_auto_play?: boolean;
|
|
3867
|
+
guild_folders?: { id?: Snowflake; guild_ids?: Snowflake[]; name?: string }[];
|
|
3868
|
+
guild_positions?: number[];
|
|
3869
|
+
inline_attachment_media?: boolean;
|
|
3870
|
+
inline_embed_media?: boolean;
|
|
3871
|
+
locale?: string;
|
|
3872
|
+
message_display_compact?: boolean;
|
|
3873
|
+
native_phone_integration_enabled?: boolean;
|
|
3874
|
+
render_embeds?: boolean;
|
|
3875
|
+
render_reactions?: boolean;
|
|
3876
|
+
restricted_guilds?: any[];
|
|
3877
|
+
show_current_game?: boolean;
|
|
3878
|
+
status?: PresenceStatusData;
|
|
3879
|
+
stream_notifications_enabled?: boolean;
|
|
3880
|
+
theme?: 'dark' | 'light';
|
|
3881
|
+
timezone_offset?: number;
|
|
3882
|
+
view_nsfw_guilds?: boolean;
|
|
3883
|
+
}
|
|
3884
|
+
|
|
3885
|
+
export interface RawGuildSettingsData {
|
|
3886
|
+
guild_id: Snowflake;
|
|
3887
|
+
suppress_everyone: boolean;
|
|
3888
|
+
suppress_roles: boolean;
|
|
3889
|
+
mute_scheduled_events: boolean;
|
|
3890
|
+
message_notifications: 2;
|
|
3891
|
+
flags: 0;
|
|
3892
|
+
mobile_push: boolean;
|
|
3893
|
+
muted: boolean;
|
|
3894
|
+
mute_config?: RawMuteConfigData;
|
|
3895
|
+
hide_muted_channels: boolean;
|
|
3896
|
+
channel_overrides: RawGuildChannelSettingsData[];
|
|
3897
|
+
notify_highlights: number;
|
|
3898
|
+
version: number;
|
|
3899
|
+
}
|
|
3900
|
+
|
|
3901
|
+
export interface RawGuildChannelSettingsData {
|
|
3902
|
+
channel_id: Snowflake;
|
|
3903
|
+
message_notifications: number;
|
|
3904
|
+
muted: boolean;
|
|
3905
|
+
mute_config?: RawMuteConfigData;
|
|
3906
|
+
collapsed: boolean;
|
|
3907
|
+
}
|
|
3908
|
+
|
|
3909
|
+
export interface RawMuteConfigData {
|
|
3910
|
+
end_time: string;
|
|
3911
|
+
selected_time_window: number;
|
|
3912
|
+
}
|
|
3913
|
+
|
|
3914
|
+
export interface MuteConfigData {
|
|
3915
|
+
endTime: Date;
|
|
3916
|
+
selectedTimeWindow: number;
|
|
4020
3917
|
}
|
|
4021
3918
|
|
|
4022
3919
|
export type MappedGuildChannelTypes = EnumValueMapped<
|
|
@@ -4107,49 +4004,35 @@ export class GuildManager extends CachedManager<Snowflake, Guild, GuildResolvabl
|
|
|
4107
4004
|
public fetch(options?: FetchGuildsOptions): Promise<Collection<Snowflake, OAuth2Guild>>;
|
|
4108
4005
|
}
|
|
4109
4006
|
|
|
4110
|
-
export interface BruteforceOptions {
|
|
4111
|
-
limit?: number;
|
|
4112
|
-
delay?: number;
|
|
4113
|
-
depth?: number;
|
|
4114
|
-
}
|
|
4115
|
-
|
|
4116
4007
|
export class GuildMemberManager extends CachedManager<Snowflake, GuildMember, GuildMemberResolvable> {
|
|
4117
4008
|
private constructor(guild: Guild, iterable?: Iterable<RawGuildMemberData>);
|
|
4118
4009
|
public guild: Guild;
|
|
4119
|
-
public
|
|
4010
|
+
public get me(): GuildMember | null;
|
|
4120
4011
|
public add(
|
|
4121
4012
|
user: UserResolvable,
|
|
4122
4013
|
options: AddGuildMemberOptions & { fetchWhenExisting: false },
|
|
4123
4014
|
): Promise<GuildMember | null>;
|
|
4124
4015
|
public add(user: UserResolvable, options: AddGuildMemberOptions): Promise<GuildMember>;
|
|
4016
|
+
public addRole(user: UserResolvable, role: RoleResolvable, reason?: string): Promise<GuildMember | User | Snowflake>;
|
|
4125
4017
|
public ban(user: UserResolvable, options?: BanOptions): Promise<GuildMember | User | Snowflake>;
|
|
4126
4018
|
public edit(user: UserResolvable, data: GuildMemberEditData, reason?: string): Promise<GuildMember>;
|
|
4127
4019
|
public fetch(
|
|
4128
4020
|
options: UserResolvable | FetchMemberOptions | (FetchMembersOptions & { user: UserResolvable }),
|
|
4129
4021
|
): Promise<GuildMember>;
|
|
4130
4022
|
public fetch(options?: FetchMembersOptions): Promise<Collection<Snowflake, GuildMember>>;
|
|
4131
|
-
public fetchMemberList(
|
|
4132
|
-
channel: GuildTextChannelResolvable,
|
|
4133
|
-
offset?: number,
|
|
4134
|
-
double?: boolean,
|
|
4135
|
-
retryMax?: number,
|
|
4136
|
-
time?: number,
|
|
4137
|
-
): Promise<Collection<Snowflake, GuildMember>>;
|
|
4138
|
-
public fetchBruteforce(options?: BruteforceOptions): Promise<Collection<Snowflake, GuildMember>>;
|
|
4139
|
-
public fetchByMemberSafety(timeout?: number): Promise<Collection<Snowflake, GuildMember>>;
|
|
4140
4023
|
public fetchMe(options?: BaseFetchOptions): Promise<GuildMember>;
|
|
4141
4024
|
public kick(user: UserResolvable, reason?: string): Promise<GuildMember | User | Snowflake>;
|
|
4142
4025
|
public list(options?: GuildListMembersOptions): Promise<Collection<Snowflake, GuildMember>>;
|
|
4143
4026
|
public prune(options: GuildPruneMembersOptions & { dry?: false; count: false }): Promise<null>;
|
|
4144
4027
|
public prune(options?: GuildPruneMembersOptions): Promise<number>;
|
|
4145
|
-
public search(options: GuildSearchMembersOptions): Promise<Collection<Snowflake, GuildMember>>;
|
|
4146
|
-
public unban(user: UserResolvable, reason?: string): Promise<User | null>;
|
|
4147
|
-
public addRole(user: UserResolvable, role: RoleResolvable, reason?: string): Promise<GuildMember | User | Snowflake>;
|
|
4148
4028
|
public removeRole(
|
|
4149
4029
|
user: UserResolvable,
|
|
4150
4030
|
role: RoleResolvable,
|
|
4151
4031
|
reason?: string,
|
|
4152
4032
|
): Promise<GuildMember | User | Snowflake>;
|
|
4033
|
+
public search(options: GuildSearchMembersOptions): Promise<Collection<Snowflake, GuildMember>>;
|
|
4034
|
+
public unban(user: UserResolvable, reason?: string): Promise<User | null>;
|
|
4035
|
+
public fetchByMemberSafety(timeout?: number): Promise<Collection<Snowflake, GuildMember>>;
|
|
4153
4036
|
}
|
|
4154
4037
|
|
|
4155
4038
|
export class GuildBanManager extends CachedManager<Snowflake, GuildBan, GuildBanResolvable> {
|
|
@@ -4250,26 +4133,6 @@ export class MessageManager extends CachedManager<Snowflake, Message, MessageRes
|
|
|
4250
4133
|
public search(options: MessageSearchOptions): Promise<MessageSearchResult>;
|
|
4251
4134
|
}
|
|
4252
4135
|
|
|
4253
|
-
export class InteractionManager extends CachedManager<Snowflake, Message, MessageResolvable> {
|
|
4254
|
-
private constructor(channel: TextBasedChannel, iterable?: Iterable<RawMessageData>);
|
|
4255
|
-
public channel: TextBasedChannel;
|
|
4256
|
-
public cache: Collection<Snowflake, Message>;
|
|
4257
|
-
}
|
|
4258
|
-
|
|
4259
|
-
export class InteractionResponse extends Base {
|
|
4260
|
-
private constructor(client: Client, data: object);
|
|
4261
|
-
public readonly channel: GuildTextBasedChannel | TextBasedChannel;
|
|
4262
|
-
public channelId: Snowflake;
|
|
4263
|
-
public readonly createdAt: Date;
|
|
4264
|
-
public createdTimestamp: number;
|
|
4265
|
-
public guildId: Snowflake | null;
|
|
4266
|
-
public readonly guild: Snowflake | null;
|
|
4267
|
-
public id: Snowflake;
|
|
4268
|
-
public nonce: Snowflake;
|
|
4269
|
-
public sendData: object;
|
|
4270
|
-
public awaitModal(time: number): Modal;
|
|
4271
|
-
}
|
|
4272
|
-
|
|
4273
4136
|
export interface MessageSearchOptions {
|
|
4274
4137
|
authors: UserResolvable[];
|
|
4275
4138
|
content: string;
|
|
@@ -4350,6 +4213,7 @@ export class RoleManager extends CachedManager<Snowflake, Role, RoleResolvable>
|
|
|
4350
4213
|
public edit(role: RoleResolvable, options: RoleData, reason?: string): Promise<Role>;
|
|
4351
4214
|
public delete(role: RoleResolvable, reason?: string): Promise<void>;
|
|
4352
4215
|
public setPosition(role: RoleResolvable, position: number, options?: SetRolePositionOptions): Promise<Role>;
|
|
4216
|
+
public setPositions(rolePositions: readonly RolePosition[]): Promise<Guild>;
|
|
4353
4217
|
public comparePositions(role1: RoleResolvable, role2: RoleResolvable): number;
|
|
4354
4218
|
}
|
|
4355
4219
|
|
|
@@ -4371,10 +4235,18 @@ export class ThreadManager extends CachedManager<Snowflake, ThreadChannel, Threa
|
|
|
4371
4235
|
public fetchActive(cache?: boolean, options?: FetchChannelThreadsOptions): Promise<FetchedThreads>;
|
|
4372
4236
|
}
|
|
4373
4237
|
|
|
4238
|
+
export class GuildTextThreadManager<AllowedThreadType> extends ThreadManager {
|
|
4239
|
+
public create(options: GuildTextThreadCreateOptions<AllowedThreadType>): Promise<ThreadChannel>;
|
|
4240
|
+
}
|
|
4241
|
+
|
|
4242
|
+
export class GuildForumThreadManager extends ThreadManager {
|
|
4243
|
+
public create(options: GuildForumThreadCreateOptions): Promise<ThreadChannel>;
|
|
4244
|
+
}
|
|
4245
|
+
|
|
4374
4246
|
export class ThreadMemberManager extends CachedManager<Snowflake, ThreadMember, ThreadMemberResolvable> {
|
|
4375
4247
|
private constructor(thread: ThreadChannel, iterable?: Iterable<RawThreadMemberData>);
|
|
4376
4248
|
public thread: ThreadChannel;
|
|
4377
|
-
public
|
|
4249
|
+
public get me(): ThreadMember | null;
|
|
4378
4250
|
public add(member: UserResolvable | '@me', reason?: string): Promise<Snowflake>;
|
|
4379
4251
|
public fetch(options?: FetchThreadMembersWithoutGuildMemberDataOptions): Promise<Collection<Snowflake, ThreadMember>>;
|
|
4380
4252
|
public fetch(member: ThreadMember<true>, options?: FetchMemberOptions): Promise<ThreadMember<true>>;
|
|
@@ -4386,8 +4258,19 @@ export class ThreadMemberManager extends CachedManager<Snowflake, ThreadMember,
|
|
|
4386
4258
|
options: FetchThreadMembersWithGuildMemberDataOptions,
|
|
4387
4259
|
): Promise<Collection<Snowflake, ThreadMember<true>>>;
|
|
4388
4260
|
public fetch(member: UserResolvable, options?: FetchThreadMemberOptions): Promise<ThreadMember>;
|
|
4389
|
-
|
|
4390
|
-
|
|
4261
|
+
|
|
4262
|
+
/** @deprecated Use `fetch(options)` instead. */
|
|
4263
|
+
public fetch(cache: boolean, options?: FetchThreadMembersOptions): Promise<Collection<Snowflake, ThreadMember>>;
|
|
4264
|
+
|
|
4265
|
+
public fetch(
|
|
4266
|
+
x: undefined,
|
|
4267
|
+
options: FetchThreadMembersWithGuildMemberDataOptions,
|
|
4268
|
+
): Promise<Collection<Snowflake, ThreadMember<true>>>;
|
|
4269
|
+
public fetch(
|
|
4270
|
+
x: undefined,
|
|
4271
|
+
options?: FetchThreadMembersWithoutGuildMemberDataOptions,
|
|
4272
|
+
): Promise<Collection<Snowflake, ThreadMember>>;
|
|
4273
|
+
|
|
4391
4274
|
public fetchMe(options?: BaseFetchOptions): Promise<ThreadMember>;
|
|
4392
4275
|
public remove(id: Snowflake | '@me', reason?: string): Promise<Snowflake>;
|
|
4393
4276
|
}
|
|
@@ -4397,30 +4280,11 @@ export class UserManager extends CachedManager<Snowflake, User, UserResolvable>
|
|
|
4397
4280
|
private dmChannel(userId: Snowflake): DMChannel | null;
|
|
4398
4281
|
public createDM(user: UserResolvable, options?: BaseFetchOptions): Promise<DMChannel>;
|
|
4399
4282
|
public deleteDM(user: UserResolvable): Promise<DMChannel>;
|
|
4400
|
-
public fetch(user: UserResolvable, options?: BaseFetchOptions
|
|
4283
|
+
public fetch(user: UserResolvable, options?: BaseFetchOptions): Promise<User>;
|
|
4401
4284
|
public fetchFlags(user: UserResolvable, options?: BaseFetchOptions): Promise<UserFlags>;
|
|
4402
4285
|
public send(user: UserResolvable, options: string | MessagePayload | MessageOptions): Promise<Message>;
|
|
4403
4286
|
}
|
|
4404
4287
|
|
|
4405
|
-
export class RelationshipManager {
|
|
4406
|
-
private constructor(client: Client, users?: object[]);
|
|
4407
|
-
public cache: Collection<Snowflake, RelationshipTypes>;
|
|
4408
|
-
public client: Client;
|
|
4409
|
-
public readonly friendCache: Collection<Snowflake, User>;
|
|
4410
|
-
public readonly blockedCache: Collection<Snowflake, User>;
|
|
4411
|
-
public readonly incomingCache: Collection<Snowflake, User>;
|
|
4412
|
-
public readonly outgoingCache: Collection<Snowflake, User>;
|
|
4413
|
-
public fetch(user: UserResolvable, options?: BaseFetchOptions): Promise<RelationshipTypes>;
|
|
4414
|
-
public deleteFriend(user: UserResolvable): Promise<boolean>;
|
|
4415
|
-
public deleteBlocked(user: UserResolvable): Promise<boolean>;
|
|
4416
|
-
public sendFriendRequest(username: string, discriminator?: number): Promise<boolean>;
|
|
4417
|
-
public cancelFriendRequest(user: UserResolvable): Promise<boolean>;
|
|
4418
|
-
public addFriend(user: UserResolvable): Promise<boolean>;
|
|
4419
|
-
public addBlocked(user: UserResolvable): Promise<boolean>;
|
|
4420
|
-
public setNickname(user: UserResolvable, nickname: string | null): Promise<boolean>;
|
|
4421
|
-
private __cancel(id: Snowflake): Promise<boolean>;
|
|
4422
|
-
}
|
|
4423
|
-
|
|
4424
4288
|
export class VoiceStateManager extends CachedManager<Snowflake, VoiceState, typeof VoiceState> {
|
|
4425
4289
|
private constructor(guild: Guild, iterable?: Iterable<RawVoiceStateData>);
|
|
4426
4290
|
public guild: Guild;
|
|
@@ -4451,26 +4315,14 @@ export interface TextBasedChannelFields extends PartialTextBasedChannelFields {
|
|
|
4451
4315
|
lastPinTimestamp: number | null;
|
|
4452
4316
|
readonly lastPinAt: Date | null;
|
|
4453
4317
|
messages: MessageManager;
|
|
4454
|
-
interactions: InteractionManager;
|
|
4455
|
-
awaitMessageComponent<T extends MessageComponentTypeResolvable = 'ACTION_ROW'>(
|
|
4456
|
-
options?: AwaitMessageCollectorOptionsParams<T, true>,
|
|
4457
|
-
): Promise<MappedInteractionTypes[T]>;
|
|
4458
4318
|
awaitMessages(options?: AwaitMessagesOptions): Promise<Collection<Snowflake, Message>>;
|
|
4459
|
-
bulkDelete(
|
|
4460
|
-
messages: Collection<Snowflake, Message> | readonly MessageResolvable[] | number,
|
|
4461
|
-
filterOld?: boolean,
|
|
4462
|
-
): Promise<Collection<Snowflake, Message | PartialMessage | undefined>>;
|
|
4463
|
-
createMessageComponentCollector<T extends MessageComponentTypeResolvable = 'ACTION_ROW'>(
|
|
4464
|
-
options?: MessageChannelCollectorOptionsParams<T, true>,
|
|
4465
|
-
): InteractionCollector<MappedInteractionTypes[T]>;
|
|
4466
4319
|
createMessageCollector(options?: MessageCollectorOptions): MessageCollector;
|
|
4467
4320
|
createWebhook(name: string, options?: ChannelWebhookCreateOptions): Promise<Webhook>;
|
|
4468
4321
|
setRateLimitPerUser(rateLimitPerUser: number, reason?: string): Promise<this>;
|
|
4469
4322
|
setNSFW(nsfw?: boolean, reason?: string): Promise<this>;
|
|
4470
4323
|
fetchWebhooks(): Promise<Collection<Snowflake, Webhook>>;
|
|
4471
4324
|
sendTyping(): Promise<void>;
|
|
4472
|
-
sendSlash(
|
|
4473
|
-
searchInteraction(applicationId: Snowflake, type?: ApplicationCommandTypes): Promise<object>;
|
|
4325
|
+
sendSlash(target: UserResolvable, commandName: string, ...args: any[]): Promise<Message | Modal>;
|
|
4474
4326
|
}
|
|
4475
4327
|
|
|
4476
4328
|
export function PartialWebhookMixin<T>(Base?: Constructable<T>): Constructable<T & PartialWebhookFields>;
|
|
@@ -4503,9 +4355,6 @@ export interface WebhookFields extends PartialWebhookFields {
|
|
|
4503
4355
|
//#endregion
|
|
4504
4356
|
|
|
4505
4357
|
//#region Typedefs
|
|
4506
|
-
export type PurchasedFlagsString = 'NITRO_CLASSIC' | 'NITRO' | 'GUILD_BOOST';
|
|
4507
|
-
|
|
4508
|
-
export type PremiumUsageFlagsString = 'PREMIUM_DISCRIMINATOR' | 'ANIMATED_AVATAR' | 'PROFILE_BANNER';
|
|
4509
4358
|
|
|
4510
4359
|
export type ActivityFlagsString =
|
|
4511
4360
|
| 'INSTANCE'
|
|
@@ -4518,12 +4367,19 @@ export type ActivityFlagsString =
|
|
|
4518
4367
|
| 'PARTY_PRIVACY_VOICE_CHANNEL'
|
|
4519
4368
|
| 'EMBEDDED';
|
|
4520
4369
|
|
|
4521
|
-
export type
|
|
4370
|
+
export type PurchasedFlagsString = 'NITRO_CLASSIC' | 'NITRO' | 'GUILD_BOOST' | 'NITRO_BASIC';
|
|
4371
|
+
|
|
4372
|
+
export type PremiumUsageFlagsString = 'PREMIUM_DISCRIMINATOR' | 'ANIMATED_AVATAR' | 'PROFILE_BANNER';
|
|
4373
|
+
|
|
4374
|
+
export type InviteFlagsString = 'GUEST' | 'VIEWED';
|
|
4375
|
+
|
|
4376
|
+
export type ActivitiesOptions = Omit<ActivityOptions, 'shardId'>;
|
|
4522
4377
|
|
|
4523
4378
|
export interface ActivityOptions {
|
|
4524
|
-
name
|
|
4379
|
+
name: string;
|
|
4380
|
+
state?: string;
|
|
4525
4381
|
url?: string;
|
|
4526
|
-
type?:
|
|
4382
|
+
type?: ActivityType;
|
|
4527
4383
|
shardId?: number | readonly number[];
|
|
4528
4384
|
}
|
|
4529
4385
|
|
|
@@ -4555,6 +4411,7 @@ export interface ClientApplicationInstallParams {
|
|
|
4555
4411
|
scopes: InviteScope[];
|
|
4556
4412
|
permissions: Readonly<Permissions>;
|
|
4557
4413
|
}
|
|
4414
|
+
|
|
4558
4415
|
export interface APIErrors {
|
|
4559
4416
|
UNKNOWN_ACCOUNT: 10001;
|
|
4560
4417
|
UNKNOWN_APPLICATION: 10002;
|
|
@@ -4612,7 +4469,6 @@ export interface APIErrors {
|
|
|
4612
4469
|
MAXIMUM_PINS: 30003;
|
|
4613
4470
|
MAXIMUM_RECIPIENTS: 30004;
|
|
4614
4471
|
MAXIMUM_ROLES: 30005;
|
|
4615
|
-
MAXIMUM_USERNAMES: 30006;
|
|
4616
4472
|
MAXIMUM_WEBHOOKS: 30007;
|
|
4617
4473
|
MAXIMUM_EMOJIS: 30008;
|
|
4618
4474
|
MAXIMUM_REACTIONS: 30010;
|
|
@@ -4655,7 +4511,6 @@ export interface APIErrors {
|
|
|
4655
4511
|
INVALID_AUTHENTICATION_TOKEN: 50014;
|
|
4656
4512
|
NOTE_TOO_LONG: 50015;
|
|
4657
4513
|
INVALID_BULK_DELETE_QUANTITY: 50016;
|
|
4658
|
-
INVALID_MFA_LEVEL: 50017;
|
|
4659
4514
|
CANNOT_PIN_MESSAGE_IN_OTHER_CHANNEL: 50019;
|
|
4660
4515
|
INVALID_OR_TAKEN_INVITE_CODE: 50020;
|
|
4661
4516
|
CANNOT_EXECUTE_ON_SYSTEM_MESSAGE: 50021;
|
|
@@ -4671,7 +4526,6 @@ export interface APIErrors {
|
|
|
4671
4526
|
INVALID_API_VERSION: 50041;
|
|
4672
4527
|
FILE_UPLOADED_EXCEEDS_MAXIMUM_SIZE: 50045;
|
|
4673
4528
|
INVALID_FILE_UPLOADED: 50046;
|
|
4674
|
-
GIFT_CODE_CLAIMED: 50050;
|
|
4675
4529
|
CANNOT_SELF_REDEEM_GIFT: 50054;
|
|
4676
4530
|
INVALID_GUILD: 50055;
|
|
4677
4531
|
INVALID_MESSAGE_TYPE: 50068;
|
|
@@ -4693,7 +4547,6 @@ export interface APIErrors {
|
|
|
4693
4547
|
YOU_CANNOT_SEND_VOICE_MESSAGES_IN_THIS_CHANNEL: 50173;
|
|
4694
4548
|
CANNOT_CONVERT_PREMIUM_EMOJI_TO_NORMAL_EMOJI: 50145;
|
|
4695
4549
|
TWO_FACTOR_REQUIRED: 60003;
|
|
4696
|
-
INVALID_TWO_FACTOR_CODE: 60008;
|
|
4697
4550
|
NO_USERS_WITH_DISCORDTAG_EXIST: 80004;
|
|
4698
4551
|
REACTION_BLOCKED: 90001;
|
|
4699
4552
|
RESOURCE_OVERLOADED: 130000;
|
|
@@ -4728,369 +4581,6 @@ export interface ApplicationAsset {
|
|
|
4728
4581
|
type: 'BIG' | 'SMALL';
|
|
4729
4582
|
}
|
|
4730
4583
|
|
|
4731
|
-
export interface ClientEvents extends BaseClientEvents {
|
|
4732
|
-
/** @deprecated See [this issue](https://github.com/discord/discord-api-docs/issues/3690) for more information. */
|
|
4733
|
-
applicationCommandCreate: [command: ApplicationCommand];
|
|
4734
|
-
/** @deprecated See [this issue](https://github.com/discord/discord-api-docs/issues/3690) for more information. */
|
|
4735
|
-
applicationCommandDelete: [command: ApplicationCommand];
|
|
4736
|
-
/** @deprecated See [this issue](https://github.com/discord/discord-api-docs/issues/3690) for more information. */
|
|
4737
|
-
applicationCommandUpdate: [oldCommand: ApplicationCommand | null, newCommand: ApplicationCommand];
|
|
4738
|
-
applicationCommandPermissionsUpdate: [data: ApplicationCommandPermissionsUpdateData];
|
|
4739
|
-
autoModerationActionExecution: [autoModerationActionExecution: AutoModerationActionExecution];
|
|
4740
|
-
autoModerationRuleCreate: [autoModerationRule: AutoModerationRule];
|
|
4741
|
-
autoModerationRuleDelete: [autoModerationRule: AutoModerationRule];
|
|
4742
|
-
autoModerationRuleUpdate: [
|
|
4743
|
-
oldAutoModerationRule: AutoModerationRule | null,
|
|
4744
|
-
newAutoModerationRule: AutoModerationRule,
|
|
4745
|
-
];
|
|
4746
|
-
cacheSweep: [message: string];
|
|
4747
|
-
channelCreate: [channel: NonThreadGuildBasedChannel];
|
|
4748
|
-
channelDelete: [channel: DMChannel | NonThreadGuildBasedChannel];
|
|
4749
|
-
channelPinsUpdate: [channel: TextBasedChannel, date: Date];
|
|
4750
|
-
channelRecipientAdd: [channel: PartialGroupDMChannel, user: User];
|
|
4751
|
-
channelRecipientRemove: [channel: PartialGroupDMChannel, user: User];
|
|
4752
|
-
channelUpdate: [
|
|
4753
|
-
oldChannel: DMChannel | NonThreadGuildBasedChannel,
|
|
4754
|
-
newChannel: DMChannel | NonThreadGuildBasedChannel,
|
|
4755
|
-
];
|
|
4756
|
-
warn: [message: string];
|
|
4757
|
-
emojiCreate: [emoji: GuildEmoji];
|
|
4758
|
-
emojiDelete: [emoji: GuildEmoji];
|
|
4759
|
-
emojiUpdate: [oldEmoji: GuildEmoji, newEmoji: GuildEmoji];
|
|
4760
|
-
error: [error: Error];
|
|
4761
|
-
callCreate: [call: Call];
|
|
4762
|
-
callDelete: [call: Call];
|
|
4763
|
-
callUpdate: [call: Call];
|
|
4764
|
-
guildBanAdd: [ban: GuildBan];
|
|
4765
|
-
guildBanRemove: [ban: GuildBan];
|
|
4766
|
-
guildCreate: [guild: Guild];
|
|
4767
|
-
guildDelete: [guild: Guild];
|
|
4768
|
-
guildUnavailable: [guild: Guild];
|
|
4769
|
-
guildIntegrationsUpdate: [guild: Guild];
|
|
4770
|
-
guildMemberAdd: [member: GuildMember];
|
|
4771
|
-
guildMemberAvailable: [member: GuildMember | PartialGuildMember];
|
|
4772
|
-
guildMemberRemove: [member: GuildMember | PartialGuildMember];
|
|
4773
|
-
guildMembersChunk: [
|
|
4774
|
-
members: Collection<Snowflake, GuildMember>,
|
|
4775
|
-
guild: Guild,
|
|
4776
|
-
data: { count: number; index: number; nonce: string | undefined; notFound: unknown[] },
|
|
4777
|
-
];
|
|
4778
|
-
guildMemberUpdate: [oldMember: GuildMember | PartialGuildMember, newMember: GuildMember];
|
|
4779
|
-
guildMemberListUpdate: [
|
|
4780
|
-
members: Collection<Snowflake, GuildMember>,
|
|
4781
|
-
guild: Guild,
|
|
4782
|
-
data: {}, // see: https://luna.gitlab.io/discord-unofficial-docs/lazy_guilds.html
|
|
4783
|
-
];
|
|
4784
|
-
guildUpdate: [oldGuild: Guild, newGuild: Guild];
|
|
4785
|
-
inviteCreate: [invite: Invite];
|
|
4786
|
-
inviteDelete: [invite: Invite];
|
|
4787
|
-
/** @deprecated Use messageCreate instead */
|
|
4788
|
-
message: [message: Message];
|
|
4789
|
-
messageAck: [channel: TextChannel, message_id: Snowflake, isRead: boolean, raw: object];
|
|
4790
|
-
messageCreate: [message: Message];
|
|
4791
|
-
messageDelete: [message: Message | PartialMessage];
|
|
4792
|
-
messageReactionRemoveAll: [
|
|
4793
|
-
message: Message | PartialMessage,
|
|
4794
|
-
reactions: Collection<string | Snowflake, MessageReaction>,
|
|
4795
|
-
];
|
|
4796
|
-
messageReactionRemoveEmoji: [reaction: MessageReaction | PartialMessageReaction];
|
|
4797
|
-
messageDeleteBulk: [messages: Collection<Snowflake, Message | PartialMessage>];
|
|
4798
|
-
messageReactionAdd: [reaction: MessageReaction | PartialMessageReaction, user: User | PartialUser];
|
|
4799
|
-
messageReactionRemove: [reaction: MessageReaction | PartialMessageReaction, user: User | PartialUser];
|
|
4800
|
-
messageUpdate: [oldMessage: Message | PartialMessage, newMessage: Message | PartialMessage];
|
|
4801
|
-
presenceUpdate: [oldPresence: Presence | null, newPresence: Presence];
|
|
4802
|
-
ready: [client: Client<true>];
|
|
4803
|
-
invalidated: [];
|
|
4804
|
-
roleCreate: [role: Role];
|
|
4805
|
-
roleDelete: [role: Role];
|
|
4806
|
-
roleUpdate: [oldRole: Role, newRole: Role];
|
|
4807
|
-
threadCreate: [thread: ThreadChannel, newlyCreated: boolean];
|
|
4808
|
-
threadDelete: [thread: ThreadChannel];
|
|
4809
|
-
threadListSync: [threads: Collection<Snowflake, ThreadChannel>];
|
|
4810
|
-
threadMemberUpdate: [oldMember: ThreadMember, newMember: ThreadMember];
|
|
4811
|
-
threadMembersUpdate: [
|
|
4812
|
-
oldMembers: Collection<Snowflake, ThreadMember>,
|
|
4813
|
-
newMembers: Collection<Snowflake, ThreadMember>,
|
|
4814
|
-
];
|
|
4815
|
-
threadUpdate: [oldThread: ThreadChannel, newThread: ThreadChannel];
|
|
4816
|
-
typingStart: [typing: Typing];
|
|
4817
|
-
userUpdate: [oldUser: User | PartialUser, newUser: User];
|
|
4818
|
-
userSettingsUpdate: [setting: RawUserSettingsData];
|
|
4819
|
-
userGuildSettingsUpdate: [guild: Guild];
|
|
4820
|
-
voiceStateUpdate: [oldState: VoiceState, newState: VoiceState];
|
|
4821
|
-
webhookUpdate: [channel: TextChannel | NewsChannel | VoiceChannel | ForumChannel | StageChannel];
|
|
4822
|
-
/** @deprecated Use interactionCreate instead */
|
|
4823
|
-
interaction: [interaction: Interaction];
|
|
4824
|
-
interactionCreate: [interaction: Interaction | { nonce: Snowflake; id: Snowflake }];
|
|
4825
|
-
interactionSuccess: [interaction: { nonce: Snowflake; id: Snowflake }];
|
|
4826
|
-
interactionFailure: [interaction: { nonce: Snowflake; id: Snowflake }];
|
|
4827
|
-
interactionModalCreate: [modal: Modal];
|
|
4828
|
-
shardDisconnect: [closeEvent: CloseEvent, shardId: number];
|
|
4829
|
-
shardError: [error: Error, shardId: number];
|
|
4830
|
-
shardReady: [shardId: number, unavailableGuilds: Set<Snowflake> | undefined];
|
|
4831
|
-
shardReconnecting: [shardId: number];
|
|
4832
|
-
shardResume: [shardId: number, replayedEvents: number];
|
|
4833
|
-
stageInstanceCreate: [stageInstance: StageInstance];
|
|
4834
|
-
stageInstanceUpdate: [oldStageInstance: StageInstance | null, newStageInstance: StageInstance];
|
|
4835
|
-
stageInstanceDelete: [stageInstance: StageInstance];
|
|
4836
|
-
stickerCreate: [sticker: Sticker];
|
|
4837
|
-
stickerDelete: [sticker: Sticker];
|
|
4838
|
-
stickerUpdate: [oldSticker: Sticker, newSticker: Sticker];
|
|
4839
|
-
guildScheduledEventCreate: [guildScheduledEvent: GuildScheduledEvent];
|
|
4840
|
-
guildScheduledEventUpdate: [oldGuildScheduledEvent: GuildScheduledEvent, newGuildScheduledEvent: GuildScheduledEvent];
|
|
4841
|
-
guildScheduledEventDelete: [guildScheduledEvent: GuildScheduledEvent];
|
|
4842
|
-
guildScheduledEventUserAdd: [guildScheduledEvent: GuildScheduledEvent, user: User];
|
|
4843
|
-
guildScheduledEventUserRemove: [guildScheduledEvent: GuildScheduledEvent, user: User];
|
|
4844
|
-
guildAuditLogEntryCreate: [auditLogEntry: GuildAuditLogsEntry, guild: Guild];
|
|
4845
|
-
relationshipAdd: [id: Snowflake, type: RelationshipTypes];
|
|
4846
|
-
relationshipRemove: [id: Snowflake];
|
|
4847
|
-
relationshipUpdate: [id: Snowflake, type: RelationshipTypes, data: object];
|
|
4848
|
-
unhandledPacket: [packet: { op: GatewayOpcodes | number; d?: any; s?: number; t?: string }, shard: WebSocketShard];
|
|
4849
|
-
update: [oldVersion: string, newVersion: string];
|
|
4850
|
-
captchaRequired: [request: Request, captcha: Captcha];
|
|
4851
|
-
}
|
|
4852
|
-
|
|
4853
|
-
export interface ConstantsEvents {
|
|
4854
|
-
RATE_LIMIT: 'rateLimit';
|
|
4855
|
-
INVALID_REQUEST_WARNING: 'invalidRequestWarning';
|
|
4856
|
-
API_RESPONSE: 'apiResponse';
|
|
4857
|
-
API_REQUEST: 'apiRequest';
|
|
4858
|
-
CLIENT_READY: 'ready';
|
|
4859
|
-
APPLICATION_COMMAND_AUTOCOMPLETE_RESPONSE: 'applicationCommandAutocompleteResponse';
|
|
4860
|
-
/** @deprecated See [this issue](https://github.com/discord/discord-api-docs/issues/3690) for more information. */
|
|
4861
|
-
APPLICATION_COMMAND_CREATE: 'applicationCommandCreate';
|
|
4862
|
-
/** @deprecated See [this issue](https://github.com/discord/discord-api-docs/issues/3690) for more information. */
|
|
4863
|
-
APPLICATION_COMMAND_DELETE: 'applicationCommandDelete';
|
|
4864
|
-
/** @deprecated See [this issue](https://github.com/discord/discord-api-docs/issues/3690) for more information. */
|
|
4865
|
-
APPLICATION_COMMAND_UPDATE: 'applicationCommandUpdate';
|
|
4866
|
-
APPLICATION_COMMAND_PERMISSIONS_UPDATE: 'applicationCommandPermissionsUpdate';
|
|
4867
|
-
CALL_CREATE: 'callCreate';
|
|
4868
|
-
CALL_DELETE: 'callDelete';
|
|
4869
|
-
CALL_UPDATE: 'callUpdate';
|
|
4870
|
-
GUILD_CREATE: 'guildCreate';
|
|
4871
|
-
GUILD_DELETE: 'guildDelete';
|
|
4872
|
-
GUILD_UPDATE: 'guildUpdate';
|
|
4873
|
-
GUILD_UNAVAILABLE: 'guildUnavailable';
|
|
4874
|
-
GUILD_MEMBER_ADD: 'guildMemberAdd';
|
|
4875
|
-
GUILD_MEMBER_REMOVE: 'guildMemberRemove';
|
|
4876
|
-
GUILD_MEMBER_UPDATE: 'guildMemberUpdate';
|
|
4877
|
-
GUILD_MEMBER_AVAILABLE: 'guildMemberAvailable';
|
|
4878
|
-
GUILD_MEMBERS_CHUNK: 'guildMembersChunk';
|
|
4879
|
-
GUILD_MEMBER_LIST_UPDATE: 'guildMemberListUpdate';
|
|
4880
|
-
GUILD_INTEGRATIONS_UPDATE: 'guildIntegrationsUpdate';
|
|
4881
|
-
GUILD_ROLE_CREATE: 'roleCreate';
|
|
4882
|
-
GUILD_ROLE_DELETE: 'roleDelete';
|
|
4883
|
-
INVITE_CREATE: 'inviteCreate';
|
|
4884
|
-
INVITE_DELETE: 'inviteDelete';
|
|
4885
|
-
GUILD_ROLE_UPDATE: 'roleUpdate';
|
|
4886
|
-
GUILD_EMOJI_CREATE: 'emojiCreate';
|
|
4887
|
-
GUILD_EMOJI_DELETE: 'emojiDelete';
|
|
4888
|
-
GUILD_EMOJI_UPDATE: 'emojiUpdate';
|
|
4889
|
-
GUILD_BAN_ADD: 'guildBanAdd';
|
|
4890
|
-
GUILD_BAN_REMOVE: 'guildBanRemove';
|
|
4891
|
-
CHANNEL_CREATE: 'channelCreate';
|
|
4892
|
-
CHANNEL_DELETE: 'channelDelete';
|
|
4893
|
-
CHANNEL_UPDATE: 'channelUpdate';
|
|
4894
|
-
CHANNEL_PINS_UPDATE: 'channelPinsUpdate';
|
|
4895
|
-
CHANNEL_RECIPIENT_ADD: 'channelRecipientAdd';
|
|
4896
|
-
CHANNEL_RECIPIENT_REMOVE: 'channelRecipientRemove';
|
|
4897
|
-
MESSAGE_ACK: 'messageAck';
|
|
4898
|
-
MESSAGE_CREATE: 'messageCreate';
|
|
4899
|
-
MESSAGE_DELETE: 'messageDelete';
|
|
4900
|
-
MESSAGE_UPDATE: 'messageUpdate';
|
|
4901
|
-
MESSAGE_BULK_DELETE: 'messageDeleteBulk';
|
|
4902
|
-
MESSAGE_REACTION_ADD: 'messageReactionAdd';
|
|
4903
|
-
MESSAGE_REACTION_REMOVE: 'messageReactionRemove';
|
|
4904
|
-
MESSAGE_REACTION_REMOVE_ALL: 'messageReactionRemoveAll';
|
|
4905
|
-
MESSAGE_REACTION_REMOVE_EMOJI: 'messageReactionRemoveEmoji';
|
|
4906
|
-
THREAD_CREATE: 'threadCreate';
|
|
4907
|
-
THREAD_DELETE: 'threadDelete';
|
|
4908
|
-
THREAD_UPDATE: 'threadUpdate';
|
|
4909
|
-
THREAD_LIST_SYNC: 'threadListSync';
|
|
4910
|
-
THREAD_MEMBER_UPDATE: 'threadMemberUpdate';
|
|
4911
|
-
THREAD_MEMBERS_UPDATE: 'threadMembersUpdate';
|
|
4912
|
-
USER_UPDATE: 'userUpdate';
|
|
4913
|
-
USER_SETTINGS_UPDATE: 'userSettingsUpdate';
|
|
4914
|
-
USER_GUILD_SETTINGS_UPDATE: 'userGuildSettingsUpdate';
|
|
4915
|
-
PRESENCE_UPDATE: 'presenceUpdate';
|
|
4916
|
-
VOICE_SERVER_UPDATE: 'voiceServerUpdate';
|
|
4917
|
-
VOICE_STATE_UPDATE: 'voiceStateUpdate';
|
|
4918
|
-
TYPING_START: 'typingStart';
|
|
4919
|
-
WEBHOOKS_UPDATE: 'webhookUpdate';
|
|
4920
|
-
INTERACTION_CREATE: 'interactionCreate';
|
|
4921
|
-
INTERACTION_SUCCESS: 'interactionSuccess';
|
|
4922
|
-
INTERACTION_MODAL_CREATE: 'interactionModalCreate';
|
|
4923
|
-
INTERACTION_FAILURE: 'interactionFailure';
|
|
4924
|
-
ERROR: 'error';
|
|
4925
|
-
WARN: 'warn';
|
|
4926
|
-
DEBUG: 'debug';
|
|
4927
|
-
CACHE_SWEEP: 'cacheSweep';
|
|
4928
|
-
SHARD_DISCONNECT: 'shardDisconnect';
|
|
4929
|
-
SHARD_ERROR: 'shardError';
|
|
4930
|
-
SHARD_RECONNECTING: 'shardReconnecting';
|
|
4931
|
-
SHARD_READY: 'shardReady';
|
|
4932
|
-
SHARD_RESUME: 'shardResume';
|
|
4933
|
-
INVALIDATED: 'invalidated';
|
|
4934
|
-
RAW: 'raw';
|
|
4935
|
-
STAGE_INSTANCE_CREATE: 'stageInstanceCreate';
|
|
4936
|
-
STAGE_INSTANCE_UPDATE: 'stageInstanceUpdate';
|
|
4937
|
-
STAGE_INSTANCE_DELETE: 'stageInstanceDelete';
|
|
4938
|
-
GUILD_STICKER_CREATE: 'stickerCreate';
|
|
4939
|
-
GUILD_STICKER_DELETE: 'stickerDelete';
|
|
4940
|
-
GUILD_STICKER_UPDATE: 'stickerUpdate';
|
|
4941
|
-
GUILD_SCHEDULED_EVENT_CREATE: 'guildScheduledEventCreate';
|
|
4942
|
-
GUILD_SCHEDULED_EVENT_UPDATE: 'guildScheduledEventUpdate';
|
|
4943
|
-
GUILD_SCHEDULED_EVENT_DELETE: 'guildScheduledEventDelete';
|
|
4944
|
-
GUILD_SCHEDULED_EVENT_USER_ADD: 'guildScheduledEventUserAdd';
|
|
4945
|
-
GUILD_SCHEDULED_EVENT_USER_REMOVE: 'guildScheduledEventUserRemove';
|
|
4946
|
-
GUILD_AUDIT_LOG_ENTRY_CREATE: 'guildAuditLogEntryCreate';
|
|
4947
|
-
RELATIONSHIP_ADD: 'relationshipAdd';
|
|
4948
|
-
RELATIONSHIP_REMOVE: 'relationshipRemove';
|
|
4949
|
-
RELATIONSHIP_UPDATE: 'relationshipUpdate';
|
|
4950
|
-
UNHANDLED_PACKET: 'unhandledPacket';
|
|
4951
|
-
CAPTCHA_REQUIRED: 'captchaRequired';
|
|
4952
|
-
}
|
|
4953
|
-
|
|
4954
|
-
export interface WebEmbedOptions {
|
|
4955
|
-
shorten?: boolean;
|
|
4956
|
-
hidden?: boolean;
|
|
4957
|
-
title?: string;
|
|
4958
|
-
description?: string;
|
|
4959
|
-
url?: string;
|
|
4960
|
-
timestamp?: Date | number;
|
|
4961
|
-
color?: ColorResolvable;
|
|
4962
|
-
fields?: EmbedFieldData[];
|
|
4963
|
-
author?: Partial<MessageEmbedAuthor> & { icon_url?: string; proxy_icon_url?: string };
|
|
4964
|
-
thumbnail?: Partial<MessageEmbedThumbnail> & { proxy_url?: string };
|
|
4965
|
-
image?: Partial<MessageEmbedImage> & { proxy_url?: string };
|
|
4966
|
-
video?: Partial<MessageEmbedVideo> & { proxy_url?: string };
|
|
4967
|
-
footer?: Partial<MessageEmbedFooter> & { icon_url?: string; proxy_icon_url?: string };
|
|
4968
|
-
imageType?: 'thumbnail' | 'image';
|
|
4969
|
-
}
|
|
4970
|
-
// export interface MessageOptions
|
|
4971
|
-
// embeds?: (WebEmbed | MessageEmbed | MessageEmbedOptions | APIEmbed)[];
|
|
4972
|
-
|
|
4973
|
-
/**
|
|
4974
|
-
* @extends https://luna.gitlab.io/discord-unofficial-docs/user_settings.html
|
|
4975
|
-
*/
|
|
4976
|
-
export interface RawUserSettingsData {
|
|
4977
|
-
afk_timeout?: number;
|
|
4978
|
-
allow_accessibility_detection?: boolean;
|
|
4979
|
-
animate_emoji?: boolean;
|
|
4980
|
-
animate_stickers?: number;
|
|
4981
|
-
contact_sync_enabled?: boolean;
|
|
4982
|
-
convert_emoticons?: boolean;
|
|
4983
|
-
custom_status?: { text?: string; expires_at?: string | null; emoji_name?: string; emoji_id?: Snowflake | null };
|
|
4984
|
-
default_guilds_restricted?: boolean;
|
|
4985
|
-
detect_platform_accounts?: boolean;
|
|
4986
|
-
developer_mode?: boolean;
|
|
4987
|
-
disable_games_tab?: boolean;
|
|
4988
|
-
enable_tts_command?: boolean;
|
|
4989
|
-
explicit_content_filter?: DMScanLevel;
|
|
4990
|
-
friend_discovery_flags?: number;
|
|
4991
|
-
friend_source_flags?: { all?: boolean; mutual_friends?: boolean; mututal_guilds?: boolean };
|
|
4992
|
-
gif_auto_play?: boolean;
|
|
4993
|
-
guild_folders?: { id?: Snowflake; guild_ids?: Snowflake[]; name?: string }[];
|
|
4994
|
-
guild_positions?: number[];
|
|
4995
|
-
inline_attachment_media?: boolean;
|
|
4996
|
-
inline_embed_media?: boolean;
|
|
4997
|
-
locale?: string;
|
|
4998
|
-
message_display_compact?: boolean;
|
|
4999
|
-
native_phone_integration_enabled?: boolean;
|
|
5000
|
-
render_embeds?: boolean;
|
|
5001
|
-
render_reactions?: boolean;
|
|
5002
|
-
restricted_guilds?: any[];
|
|
5003
|
-
show_current_game?: boolean;
|
|
5004
|
-
status?: PresenceStatusData;
|
|
5005
|
-
stream_notifications_enabled?: boolean;
|
|
5006
|
-
theme?: 'dark' | 'light';
|
|
5007
|
-
timezone_offset?: number;
|
|
5008
|
-
view_nsfw_guilds?: boolean;
|
|
5009
|
-
}
|
|
5010
|
-
|
|
5011
|
-
export interface RawGuildSettingsData {
|
|
5012
|
-
guild_id: Snowflake;
|
|
5013
|
-
suppress_everyone: boolean;
|
|
5014
|
-
suppress_roles: boolean;
|
|
5015
|
-
mute_scheduled_events: boolean;
|
|
5016
|
-
message_notifications: 2;
|
|
5017
|
-
flags: 0;
|
|
5018
|
-
mobile_push: boolean;
|
|
5019
|
-
muted: boolean;
|
|
5020
|
-
mute_config?: RawMuteConfigData;
|
|
5021
|
-
hide_muted_channels: boolean;
|
|
5022
|
-
channel_overrides: RawGuildChannelSettingsData[];
|
|
5023
|
-
notify_highlights: number;
|
|
5024
|
-
version: number;
|
|
5025
|
-
}
|
|
5026
|
-
|
|
5027
|
-
export interface RawGuildChannelSettingsData {
|
|
5028
|
-
channel_id: Snowflake;
|
|
5029
|
-
message_notifications: number;
|
|
5030
|
-
muted: boolean;
|
|
5031
|
-
mute_config?: RawMuteConfigData;
|
|
5032
|
-
collapsed: boolean;
|
|
5033
|
-
}
|
|
5034
|
-
|
|
5035
|
-
export interface RawMuteConfigData {
|
|
5036
|
-
end_time: string;
|
|
5037
|
-
selected_time_window: number;
|
|
5038
|
-
}
|
|
5039
|
-
|
|
5040
|
-
export interface MuteConfigData {
|
|
5041
|
-
endTime: Date;
|
|
5042
|
-
selectedTimeWindow: number;
|
|
5043
|
-
}
|
|
5044
|
-
|
|
5045
|
-
export interface ClientOptions {
|
|
5046
|
-
shards?: number | number[] | 'auto';
|
|
5047
|
-
shardCount?: number;
|
|
5048
|
-
closeTimeout?: number;
|
|
5049
|
-
makeCache?: CacheFactory;
|
|
5050
|
-
/** @deprecated Pass the value of this property as `lifetime` to `sweepers.messages` instead. */
|
|
5051
|
-
messageCacheLifetime?: number;
|
|
5052
|
-
/** @deprecated Pass the value of this property as `interval` to `sweepers.messages` instead. */
|
|
5053
|
-
messageSweepInterval?: number;
|
|
5054
|
-
allowedMentions?: MessageMentionOptions;
|
|
5055
|
-
invalidRequestWarningInterval?: number;
|
|
5056
|
-
partials?: PartialTypes[];
|
|
5057
|
-
restWsBridgeTimeout?: number;
|
|
5058
|
-
restTimeOffset?: number;
|
|
5059
|
-
restRequestTimeout?: number;
|
|
5060
|
-
restGlobalRateLimit?: number;
|
|
5061
|
-
restSweepInterval?: number;
|
|
5062
|
-
retryLimit?: number;
|
|
5063
|
-
failIfNotExists?: boolean;
|
|
5064
|
-
userAgentSuffix?: string[];
|
|
5065
|
-
presence?: PresenceData;
|
|
5066
|
-
intents?: BitFieldResolvable<IntentsString, number>;
|
|
5067
|
-
waitGuildTimeout?: number;
|
|
5068
|
-
messageCreateEventGuildTimeout?: number;
|
|
5069
|
-
sweepers?: SweeperOptions;
|
|
5070
|
-
ws?: WebSocketOptions;
|
|
5071
|
-
http?: HTTPOptions;
|
|
5072
|
-
rejectOnRateLimit?: string[] | ((data: RateLimitData) => boolean | Promise<boolean>);
|
|
5073
|
-
// add
|
|
5074
|
-
checkUpdate?: boolean;
|
|
5075
|
-
syncStatus?: boolean;
|
|
5076
|
-
autoRedeemNitro?: boolean;
|
|
5077
|
-
patchVoice?: boolean;
|
|
5078
|
-
password?: string;
|
|
5079
|
-
DMSync?: boolean;
|
|
5080
|
-
proxy?: string;
|
|
5081
|
-
captchaService?: captchaServices;
|
|
5082
|
-
captchaKey?: string;
|
|
5083
|
-
captchaSolver?: (data: Captcha, userAgent: string) => Promise<string>;
|
|
5084
|
-
captchaRetryLimit?: number;
|
|
5085
|
-
captchaWithProxy?: boolean;
|
|
5086
|
-
interactionTimeout?: number;
|
|
5087
|
-
usingNewAttachmentAPI?: boolean;
|
|
5088
|
-
}
|
|
5089
|
-
|
|
5090
|
-
export type captchaServices = '2captcha' | 'capmonster';
|
|
5091
|
-
|
|
5092
|
-
// end copy
|
|
5093
|
-
|
|
5094
4584
|
export interface BaseApplicationCommandData {
|
|
5095
4585
|
name: string;
|
|
5096
4586
|
nameLocalizations?: LocalizationMap;
|
|
@@ -5385,16 +4875,7 @@ export type ApplicationCommandPermissionType = keyof typeof ApplicationCommandPe
|
|
|
5385
4875
|
export type ApplicationCommandResolvable = ApplicationCommand | Snowflake;
|
|
5386
4876
|
|
|
5387
4877
|
export type ApplicationFlagsString =
|
|
5388
|
-
| 'EMBEDDED_RELEASED'
|
|
5389
|
-
| 'MANAGED_EMOJI'
|
|
5390
|
-
| 'EMBEDDED_IAP'
|
|
5391
|
-
| 'GROUP_DM_CREATE'
|
|
5392
|
-
| 'RPC_PRIVATE_BETA'
|
|
5393
4878
|
| 'APPLICATION_AUTO_MODERATION_RULE_CREATE_BADGE'
|
|
5394
|
-
| 'ALLOW_ASSETS'
|
|
5395
|
-
| 'ALLOW_ACTIVITY_ACTION_SPECTATE'
|
|
5396
|
-
| 'ALLOW_ACTIVITY_ACTION_JOIN_REQUEST'
|
|
5397
|
-
| 'RPC_HAS_CONNECTED'
|
|
5398
4879
|
| 'GATEWAY_PRESENCE'
|
|
5399
4880
|
| 'GATEWAY_PRESENCE_LIMITED'
|
|
5400
4881
|
| 'GATEWAY_GUILD_MEMBERS'
|
|
@@ -5403,10 +4884,7 @@ export type ApplicationFlagsString =
|
|
|
5403
4884
|
| 'EMBEDDED'
|
|
5404
4885
|
| 'GATEWAY_MESSAGE_CONTENT'
|
|
5405
4886
|
| 'GATEWAY_MESSAGE_CONTENT_LIMITED'
|
|
5406
|
-
| '
|
|
5407
|
-
| 'APPLICATION_COMMAND_BADGE'
|
|
5408
|
-
| 'ACTIVE'
|
|
5409
|
-
| 'IFRAME_MODAL';
|
|
4887
|
+
| 'APPLICATION_COMMAND_BADGE';
|
|
5410
4888
|
|
|
5411
4889
|
export interface ApplicationRoleConnectionMetadataEditOptions {
|
|
5412
4890
|
name: string;
|
|
@@ -5569,7 +5047,6 @@ export type CacheWithLimitsOptions = {
|
|
|
5569
5047
|
? LimitedCollectionOptions<K, V> | number
|
|
5570
5048
|
: never;
|
|
5571
5049
|
};
|
|
5572
|
-
|
|
5573
5050
|
export interface CategoryCreateChannelOptions {
|
|
5574
5051
|
permissionOverwrites?: OverwriteResolvable[] | Collection<Snowflake, OverwriteResolvable>;
|
|
5575
5052
|
topic?: string;
|
|
@@ -5594,6 +5071,7 @@ export interface CategoryCreateChannelOptions {
|
|
|
5594
5071
|
defaultReactionEmoji?: DefaultReactionEmoji;
|
|
5595
5072
|
defaultSortOrder?: SortOrderType;
|
|
5596
5073
|
defaultForumLayout?: ForumLayoutType;
|
|
5074
|
+
defaultThreadRateLimitPerUser?: number;
|
|
5597
5075
|
reason?: string;
|
|
5598
5076
|
}
|
|
5599
5077
|
|
|
@@ -5658,10 +5136,164 @@ export interface BaseClientEvents {
|
|
|
5658
5136
|
invalidRequestWarning: [invalidRequestWarningData: InvalidRequestWarningData];
|
|
5659
5137
|
}
|
|
5660
5138
|
|
|
5139
|
+
export interface ClientEvents extends BaseClientEvents {
|
|
5140
|
+
/** @deprecated See [this issue](https://github.com/discord/discord-api-docs/issues/3690) for more information. */
|
|
5141
|
+
applicationCommandCreate: [command: ApplicationCommand];
|
|
5142
|
+
/** @deprecated See [this issue](https://github.com/discord/discord-api-docs/issues/3690) for more information. */
|
|
5143
|
+
applicationCommandDelete: [command: ApplicationCommand];
|
|
5144
|
+
/** @deprecated See [this issue](https://github.com/discord/discord-api-docs/issues/3690) for more information. */
|
|
5145
|
+
applicationCommandUpdate: [oldCommand: ApplicationCommand | null, newCommand: ApplicationCommand];
|
|
5146
|
+
applicationCommandPermissionsUpdate: [data: ApplicationCommandPermissionsUpdateData];
|
|
5147
|
+
/** @deprecated This event is not received by user accounts. */
|
|
5148
|
+
autoModerationActionExecution: [autoModerationActionExecution: AutoModerationActionExecution];
|
|
5149
|
+
/** @deprecated This event is not received by user accounts. */
|
|
5150
|
+
autoModerationRuleCreate: [autoModerationRule: AutoModerationRule];
|
|
5151
|
+
/** @deprecated This event is not received by user accounts. */
|
|
5152
|
+
autoModerationRuleDelete: [autoModerationRule: AutoModerationRule];
|
|
5153
|
+
/** @deprecated This event is not received by user accounts. */
|
|
5154
|
+
autoModerationRuleUpdate: [
|
|
5155
|
+
oldAutoModerationRule: AutoModerationRule | null,
|
|
5156
|
+
newAutoModerationRule: AutoModerationRule,
|
|
5157
|
+
];
|
|
5158
|
+
cacheSweep: [message: string];
|
|
5159
|
+
channelCreate: [channel: NonThreadGuildBasedChannel];
|
|
5160
|
+
channelDelete: [channel: DMChannel | NonThreadGuildBasedChannel];
|
|
5161
|
+
channelPinsUpdate: [channel: TextBasedChannel, date: Date];
|
|
5162
|
+
channelUpdate: [
|
|
5163
|
+
oldChannel: DMChannel | NonThreadGuildBasedChannel,
|
|
5164
|
+
newChannel: DMChannel | NonThreadGuildBasedChannel,
|
|
5165
|
+
];
|
|
5166
|
+
warn: [message: string];
|
|
5167
|
+
emojiCreate: [emoji: GuildEmoji];
|
|
5168
|
+
emojiDelete: [emoji: GuildEmoji];
|
|
5169
|
+
emojiUpdate: [oldEmoji: GuildEmoji, newEmoji: GuildEmoji];
|
|
5170
|
+
error: [error: Error];
|
|
5171
|
+
guildAvailable: [guild: Guild];
|
|
5172
|
+
guildBanAdd: [ban: GuildBan];
|
|
5173
|
+
guildBanRemove: [ban: GuildBan];
|
|
5174
|
+
guildCreate: [guild: Guild];
|
|
5175
|
+
guildDelete: [guild: Guild];
|
|
5176
|
+
guildUnavailable: [guild: Guild];
|
|
5177
|
+
guildIntegrationsUpdate: [guild: Guild];
|
|
5178
|
+
guildMemberAdd: [member: GuildMember];
|
|
5179
|
+
guildMemberAvailable: [member: GuildMember | PartialGuildMember];
|
|
5180
|
+
guildMemberRemove: [member: GuildMember | PartialGuildMember];
|
|
5181
|
+
guildMembersChunk: [
|
|
5182
|
+
members: Collection<Snowflake, GuildMember>,
|
|
5183
|
+
guild: Guild,
|
|
5184
|
+
data: { count: number; index: number; nonce: string | undefined; notFound: unknown[] },
|
|
5185
|
+
];
|
|
5186
|
+
guildMemberUpdate: [oldMember: GuildMember | PartialGuildMember, newMember: GuildMember];
|
|
5187
|
+
guildUpdate: [oldGuild: Guild, newGuild: Guild];
|
|
5188
|
+
inviteCreate: [invite: Invite];
|
|
5189
|
+
inviteDelete: [invite: Invite];
|
|
5190
|
+
/** @deprecated Use messageCreate instead */
|
|
5191
|
+
message: [message: Message];
|
|
5192
|
+
messageCreate: [message: Message];
|
|
5193
|
+
messageDelete: [message: Message | PartialMessage];
|
|
5194
|
+
messageReactionRemoveAll: [
|
|
5195
|
+
message: Message | PartialMessage,
|
|
5196
|
+
reactions: Collection<string | Snowflake, MessageReaction>,
|
|
5197
|
+
];
|
|
5198
|
+
messageReactionRemoveEmoji: [reaction: MessageReaction | PartialMessageReaction];
|
|
5199
|
+
messageDeleteBulk: [messages: Collection<Snowflake, Message | PartialMessage>];
|
|
5200
|
+
messageReactionAdd: [reaction: MessageReaction | PartialMessageReaction, user: User | PartialUser];
|
|
5201
|
+
messageReactionRemove: [reaction: MessageReaction | PartialMessageReaction, user: User | PartialUser];
|
|
5202
|
+
messageUpdate: [oldMessage: Message | PartialMessage, newMessage: Message | PartialMessage];
|
|
5203
|
+
presenceUpdate: [oldPresence: Presence | null, newPresence: Presence];
|
|
5204
|
+
ready: [client: Client<true>];
|
|
5205
|
+
invalidated: [];
|
|
5206
|
+
roleCreate: [role: Role];
|
|
5207
|
+
roleDelete: [role: Role];
|
|
5208
|
+
roleUpdate: [oldRole: Role, newRole: Role];
|
|
5209
|
+
threadCreate: [thread: ThreadChannel, newlyCreated: boolean];
|
|
5210
|
+
threadDelete: [thread: ThreadChannel];
|
|
5211
|
+
threadListSync: [threads: Collection<Snowflake, ThreadChannel>];
|
|
5212
|
+
threadMemberUpdate: [oldMember: ThreadMember, newMember: ThreadMember];
|
|
5213
|
+
threadMembersUpdate: [
|
|
5214
|
+
oldMembers: Collection<Snowflake, ThreadMember>,
|
|
5215
|
+
newMembers: Collection<Snowflake, ThreadMember>,
|
|
5216
|
+
];
|
|
5217
|
+
threadUpdate: [oldThread: ThreadChannel, newThread: ThreadChannel];
|
|
5218
|
+
typingStart: [typing: Typing];
|
|
5219
|
+
userUpdate: [oldUser: User | PartialUser, newUser: User];
|
|
5220
|
+
voiceStateUpdate: [oldState: VoiceState, newState: VoiceState];
|
|
5221
|
+
webhookUpdate: [channel: TextChannel | NewsChannel | VoiceChannel | ForumChannel | StageChannel];
|
|
5222
|
+
shardDisconnect: [closeEvent: CloseEvent, shardId: number];
|
|
5223
|
+
shardError: [error: Error, shardId: number];
|
|
5224
|
+
shardReady: [shardId: number, unavailableGuilds: Set<Snowflake> | undefined];
|
|
5225
|
+
shardReconnecting: [shardId: number];
|
|
5226
|
+
shardResume: [shardId: number, replayedEvents: number];
|
|
5227
|
+
stageInstanceCreate: [stageInstance: StageInstance];
|
|
5228
|
+
stageInstanceUpdate: [oldStageInstance: StageInstance | null, newStageInstance: StageInstance];
|
|
5229
|
+
stageInstanceDelete: [stageInstance: StageInstance];
|
|
5230
|
+
stickerCreate: [sticker: Sticker];
|
|
5231
|
+
stickerDelete: [sticker: Sticker];
|
|
5232
|
+
stickerUpdate: [oldSticker: Sticker, newSticker: Sticker];
|
|
5233
|
+
guildScheduledEventCreate: [guildScheduledEvent: GuildScheduledEvent];
|
|
5234
|
+
guildScheduledEventUpdate: [oldGuildScheduledEvent: GuildScheduledEvent, newGuildScheduledEvent: GuildScheduledEvent];
|
|
5235
|
+
guildScheduledEventDelete: [guildScheduledEvent: GuildScheduledEvent];
|
|
5236
|
+
guildScheduledEventUserAdd: [guildScheduledEvent: GuildScheduledEvent, user: User];
|
|
5237
|
+
guildScheduledEventUserRemove: [guildScheduledEvent: GuildScheduledEvent, user: User];
|
|
5238
|
+
guildAuditLogEntryCreate: [auditLogEntry: GuildAuditLogsEntry, guild: Guild];
|
|
5239
|
+
unhandledPacket: [packet: { t?: string; d: any }, shard: number];
|
|
5240
|
+
relationshipAdd: [userId: Snowflake, shouldNotify: boolean];
|
|
5241
|
+
relationshipRemove: [userId: Snowflake, type: RelationshipTypes, nickname: string | null];
|
|
5242
|
+
relationshipUpdate: [
|
|
5243
|
+
userId: Snowflake,
|
|
5244
|
+
oldData: {
|
|
5245
|
+
nickname: string | null;
|
|
5246
|
+
since: Date;
|
|
5247
|
+
type: RelationshipTypes;
|
|
5248
|
+
},
|
|
5249
|
+
newData: {
|
|
5250
|
+
nickname: string | null;
|
|
5251
|
+
since: Date;
|
|
5252
|
+
type: RelationshipTypes;
|
|
5253
|
+
},
|
|
5254
|
+
];
|
|
5255
|
+
channelRecipientAdd: [channel: GroupDMChannel, user: User];
|
|
5256
|
+
channelRecipientRemove: [channel: GroupDMChannel, user: User];
|
|
5257
|
+
interactionModalCreate: [modal: Modal];
|
|
5258
|
+
callCreate: [call: CallState];
|
|
5259
|
+
callUpdate: [call: CallState];
|
|
5260
|
+
callDelete: [call: CallState];
|
|
5261
|
+
}
|
|
5262
|
+
|
|
5661
5263
|
export interface ClientFetchInviteOptions {
|
|
5662
5264
|
guildScheduledEventId?: Snowflake;
|
|
5663
5265
|
}
|
|
5664
5266
|
|
|
5267
|
+
export type CaptchaSolver = (captcha: Captcha, UserAgent: string) => Promise<string>;
|
|
5268
|
+
|
|
5269
|
+
export interface ClientOptions {
|
|
5270
|
+
DMChannelVoiceStatusSync?: number;
|
|
5271
|
+
captchaRetryLimit?: number;
|
|
5272
|
+
captchaSolver?: CaptchaSolver;
|
|
5273
|
+
closeTimeout?: number;
|
|
5274
|
+
makeCache?: CacheFactory;
|
|
5275
|
+
/** @deprecated Pass the value of this property as `lifetime` to `sweepers.messages` instead. */
|
|
5276
|
+
messageCacheLifetime?: number;
|
|
5277
|
+
/** @deprecated Pass the value of this property as `interval` to `sweepers.messages` instead. */
|
|
5278
|
+
messageSweepInterval?: number;
|
|
5279
|
+
allowedMentions?: MessageMentionOptions;
|
|
5280
|
+
invalidRequestWarningInterval?: number;
|
|
5281
|
+
partials?: PartialTypes[];
|
|
5282
|
+
restWsBridgeTimeout?: number;
|
|
5283
|
+
restTimeOffset?: number;
|
|
5284
|
+
restRequestTimeout?: number;
|
|
5285
|
+
restGlobalRateLimit?: number;
|
|
5286
|
+
restSweepInterval?: number;
|
|
5287
|
+
retryLimit?: number;
|
|
5288
|
+
failIfNotExists?: boolean;
|
|
5289
|
+
presence?: PresenceData;
|
|
5290
|
+
waitGuildTimeout?: number;
|
|
5291
|
+
sweepers?: SweeperOptions;
|
|
5292
|
+
ws?: WebSocketOptions;
|
|
5293
|
+
http?: HTTPOptions;
|
|
5294
|
+
rejectOnRateLimit?: string[] | ((data: RateLimitData) => boolean | Promise<boolean>);
|
|
5295
|
+
}
|
|
5296
|
+
|
|
5665
5297
|
export type ClientPresenceStatus = 'online' | 'idle' | 'dnd';
|
|
5666
5298
|
|
|
5667
5299
|
export interface ClientPresenceStatusData {
|
|
@@ -5674,7 +5306,7 @@ export interface ClientUserEditData {
|
|
|
5674
5306
|
username?: string;
|
|
5675
5307
|
avatar?: BufferResolvable | Base64Resolvable | null;
|
|
5676
5308
|
banner?: BufferResolvable | Base64Resolvable | null;
|
|
5677
|
-
bio?: string
|
|
5309
|
+
bio?: string;
|
|
5678
5310
|
}
|
|
5679
5311
|
|
|
5680
5312
|
export interface CloseEvent {
|
|
@@ -5808,6 +5440,107 @@ export interface ConstantsColors {
|
|
|
5808
5440
|
NOT_QUITE_BLACK: 0x23272a;
|
|
5809
5441
|
}
|
|
5810
5442
|
|
|
5443
|
+
export interface ConstantsEvents {
|
|
5444
|
+
RATE_LIMIT: 'rateLimit';
|
|
5445
|
+
INVALID_REQUEST_WARNING: 'invalidRequestWarning';
|
|
5446
|
+
API_RESPONSE: 'apiResponse';
|
|
5447
|
+
API_REQUEST: 'apiRequest';
|
|
5448
|
+
CLIENT_READY: 'ready';
|
|
5449
|
+
/** @deprecated See [this issue](https://github.com/discord/discord-api-docs/issues/3690) for more information. */
|
|
5450
|
+
APPLICATION_COMMAND_CREATE: 'applicationCommandCreate';
|
|
5451
|
+
/** @deprecated See [this issue](https://github.com/discord/discord-api-docs/issues/3690) for more information. */
|
|
5452
|
+
APPLICATION_COMMAND_DELETE: 'applicationCommandDelete';
|
|
5453
|
+
APPLICATION_COMMAND_PERMISSIONS_UPDATE: 'applicationCommandPermissionsUpdate';
|
|
5454
|
+
/** @deprecated See [this issue](https://github.com/discord/discord-api-docs/issues/3690) for more information. */
|
|
5455
|
+
APPLICATION_COMMAND_UPDATE: 'applicationCommandUpdate';
|
|
5456
|
+
/** @deprecated This event is not received by user accounts. */
|
|
5457
|
+
AUTO_MODERATION_ACTION_EXECUTION: 'autoModerationActionExecution';
|
|
5458
|
+
/** @deprecated This event is not received by user accounts. */
|
|
5459
|
+
AUTO_MODERATION_RULE_CREATE: 'autoModerationRuleCreate';
|
|
5460
|
+
/** @deprecated This event is not received by user accounts. */
|
|
5461
|
+
AUTO_MODERATION_RULE_DELETE: 'autoModerationRuleDelete';
|
|
5462
|
+
/** @deprecated This event is not received by user accounts. */
|
|
5463
|
+
AUTO_MODERATION_RULE_UPDATE: 'autoModerationRuleUpdate';
|
|
5464
|
+
GUILD_AVAILABLE: 'guildAvailable';
|
|
5465
|
+
GUILD_CREATE: 'guildCreate';
|
|
5466
|
+
GUILD_DELETE: 'guildDelete';
|
|
5467
|
+
GUILD_UPDATE: 'guildUpdate';
|
|
5468
|
+
GUILD_UNAVAILABLE: 'guildUnavailable';
|
|
5469
|
+
GUILD_MEMBER_ADD: 'guildMemberAdd';
|
|
5470
|
+
GUILD_MEMBER_REMOVE: 'guildMemberRemove';
|
|
5471
|
+
GUILD_MEMBER_UPDATE: 'guildMemberUpdate';
|
|
5472
|
+
GUILD_MEMBER_AVAILABLE: 'guildMemberAvailable';
|
|
5473
|
+
GUILD_MEMBERS_CHUNK: 'guildMembersChunk';
|
|
5474
|
+
GUILD_INTEGRATIONS_UPDATE: 'guildIntegrationsUpdate';
|
|
5475
|
+
GUILD_ROLE_CREATE: 'roleCreate';
|
|
5476
|
+
GUILD_ROLE_DELETE: 'roleDelete';
|
|
5477
|
+
INVITE_CREATE: 'inviteCreate';
|
|
5478
|
+
INVITE_DELETE: 'inviteDelete';
|
|
5479
|
+
GUILD_ROLE_UPDATE: 'roleUpdate';
|
|
5480
|
+
GUILD_EMOJI_CREATE: 'emojiCreate';
|
|
5481
|
+
GUILD_EMOJI_DELETE: 'emojiDelete';
|
|
5482
|
+
GUILD_EMOJI_UPDATE: 'emojiUpdate';
|
|
5483
|
+
GUILD_BAN_ADD: 'guildBanAdd';
|
|
5484
|
+
GUILD_BAN_REMOVE: 'guildBanRemove';
|
|
5485
|
+
CHANNEL_CREATE: 'channelCreate';
|
|
5486
|
+
CHANNEL_DELETE: 'channelDelete';
|
|
5487
|
+
CHANNEL_UPDATE: 'channelUpdate';
|
|
5488
|
+
CHANNEL_PINS_UPDATE: 'channelPinsUpdate';
|
|
5489
|
+
MESSAGE_CREATE: 'messageCreate';
|
|
5490
|
+
MESSAGE_DELETE: 'messageDelete';
|
|
5491
|
+
MESSAGE_UPDATE: 'messageUpdate';
|
|
5492
|
+
MESSAGE_BULK_DELETE: 'messageDeleteBulk';
|
|
5493
|
+
MESSAGE_REACTION_ADD: 'messageReactionAdd';
|
|
5494
|
+
MESSAGE_REACTION_REMOVE: 'messageReactionRemove';
|
|
5495
|
+
MESSAGE_REACTION_REMOVE_ALL: 'messageReactionRemoveAll';
|
|
5496
|
+
MESSAGE_REACTION_REMOVE_EMOJI: 'messageReactionRemoveEmoji';
|
|
5497
|
+
THREAD_CREATE: 'threadCreate';
|
|
5498
|
+
THREAD_DELETE: 'threadDelete';
|
|
5499
|
+
THREAD_UPDATE: 'threadUpdate';
|
|
5500
|
+
THREAD_LIST_SYNC: 'threadListSync';
|
|
5501
|
+
THREAD_MEMBER_UPDATE: 'threadMemberUpdate';
|
|
5502
|
+
THREAD_MEMBERS_UPDATE: 'threadMembersUpdate';
|
|
5503
|
+
USER_UPDATE: 'userUpdate';
|
|
5504
|
+
PRESENCE_UPDATE: 'presenceUpdate';
|
|
5505
|
+
VOICE_SERVER_UPDATE: 'voiceServerUpdate';
|
|
5506
|
+
VOICE_STATE_UPDATE: 'voiceStateUpdate';
|
|
5507
|
+
TYPING_START: 'typingStart';
|
|
5508
|
+
WEBHOOKS_UPDATE: 'webhookUpdate';
|
|
5509
|
+
ERROR: 'error';
|
|
5510
|
+
WARN: 'warn';
|
|
5511
|
+
DEBUG: 'debug';
|
|
5512
|
+
CACHE_SWEEP: 'cacheSweep';
|
|
5513
|
+
SHARD_DISCONNECT: 'shardDisconnect';
|
|
5514
|
+
SHARD_ERROR: 'shardError';
|
|
5515
|
+
SHARD_RECONNECTING: 'shardReconnecting';
|
|
5516
|
+
SHARD_READY: 'shardReady';
|
|
5517
|
+
SHARD_RESUME: 'shardResume';
|
|
5518
|
+
INVALIDATED: 'invalidated';
|
|
5519
|
+
RAW: 'raw';
|
|
5520
|
+
STAGE_INSTANCE_CREATE: 'stageInstanceCreate';
|
|
5521
|
+
STAGE_INSTANCE_UPDATE: 'stageInstanceUpdate';
|
|
5522
|
+
STAGE_INSTANCE_DELETE: 'stageInstanceDelete';
|
|
5523
|
+
GUILD_STICKER_CREATE: 'stickerCreate';
|
|
5524
|
+
GUILD_STICKER_DELETE: 'stickerDelete';
|
|
5525
|
+
GUILD_STICKER_UPDATE: 'stickerUpdate';
|
|
5526
|
+
GUILD_SCHEDULED_EVENT_CREATE: 'guildScheduledEventCreate';
|
|
5527
|
+
GUILD_SCHEDULED_EVENT_UPDATE: 'guildScheduledEventUpdate';
|
|
5528
|
+
GUILD_SCHEDULED_EVENT_DELETE: 'guildScheduledEventDelete';
|
|
5529
|
+
GUILD_SCHEDULED_EVENT_USER_ADD: 'guildScheduledEventUserAdd';
|
|
5530
|
+
GUILD_SCHEDULED_EVENT_USER_REMOVE: 'guildScheduledEventUserRemove';
|
|
5531
|
+
GUILD_AUDIT_LOG_ENTRY_CREATE: 'guildAuditLogEntryCreate';
|
|
5532
|
+
UNHANDLED_PACKET: 'unhandledPacket';
|
|
5533
|
+
RELATIONSHIP_ADD: 'relationshipAdd';
|
|
5534
|
+
RELATIONSHIP_UPDATE: 'relationshipUpdate';
|
|
5535
|
+
RELATIONSHIP_REMOVE: 'relationshipRemove';
|
|
5536
|
+
CHANNEL_RECIPIENT_ADD: 'channelRecipientAdd';
|
|
5537
|
+
CHANNEL_RECIPIENT_REMOVE: 'channelRecipientRemove';
|
|
5538
|
+
INTERACTION_MODAL_CREATE: 'interactionModalCreate';
|
|
5539
|
+
CALL_CREATE: 'callCreate';
|
|
5540
|
+
CALL_UPDATE: 'callUpdate';
|
|
5541
|
+
CALL_DELETE: 'callDelete';
|
|
5542
|
+
}
|
|
5543
|
+
|
|
5811
5544
|
export interface ConstantsOpcodes {
|
|
5812
5545
|
DISPATCH: 0;
|
|
5813
5546
|
HEARTBEAT: 1;
|
|
@@ -5821,6 +5554,31 @@ export interface ConstantsOpcodes {
|
|
|
5821
5554
|
INVALID_SESSION: 9;
|
|
5822
5555
|
HELLO: 10;
|
|
5823
5556
|
HEARTBEAT_ACK: 11;
|
|
5557
|
+
GUILD_SYNC: 12;
|
|
5558
|
+
DM_UPDATE: 13;
|
|
5559
|
+
GUILD_SUBSCRIPTIONS: 14;
|
|
5560
|
+
LOBBY_CONNECT: 15;
|
|
5561
|
+
LOBBY_DISCONNECT: 16;
|
|
5562
|
+
LOBBY_VOICE_STATE_UPDATE: 17;
|
|
5563
|
+
STREAM_CREATE: 18;
|
|
5564
|
+
STREAM_DELETE: 19;
|
|
5565
|
+
STREAM_WATCH: 20;
|
|
5566
|
+
STREAM_PING: 21;
|
|
5567
|
+
STREAM_SET_PAUSED: 22;
|
|
5568
|
+
REQUEST_GUILD_APPLICATION_COMMANDS: 24;
|
|
5569
|
+
EMBEDDED_ACTIVITY_LAUNCH: 25;
|
|
5570
|
+
EMBEDDED_ACTIVITY_CLOSE: 26;
|
|
5571
|
+
EMBEDDED_ACTIVITY_UPDATE: 27;
|
|
5572
|
+
REQUEST_FORUM_UNREADS: 28;
|
|
5573
|
+
REMOTE_COMMAND: 29;
|
|
5574
|
+
GET_DELETED_ENTITY_IDS_NOT_MATCHING_HASH: 30;
|
|
5575
|
+
REQUEST_SOUNDBOARD_SOUNDS: 31;
|
|
5576
|
+
SPEED_TEST_CREATE: 32;
|
|
5577
|
+
SPEED_TEST_DELETE: 33;
|
|
5578
|
+
REQUEST_LAST_MESSAGES: 34;
|
|
5579
|
+
SEARCH_RECENT_MEMBERS: 35;
|
|
5580
|
+
REQUEST_CHANNEL_STATUSES: 36;
|
|
5581
|
+
GUILD_SUBSCRIPTIONS_BULK: 37;
|
|
5824
5582
|
}
|
|
5825
5583
|
|
|
5826
5584
|
export interface ConstantsShardEvents {
|
|
@@ -5945,7 +5703,7 @@ export type ExplicitContentFilterLevel = keyof typeof ExplicitContentFilterLevel
|
|
|
5945
5703
|
|
|
5946
5704
|
export interface FetchApplicationCommandOptions extends BaseFetchOptions {
|
|
5947
5705
|
guildId?: Snowflake;
|
|
5948
|
-
locale?:
|
|
5706
|
+
locale?: LocaleString;
|
|
5949
5707
|
withLocalizations?: boolean;
|
|
5950
5708
|
}
|
|
5951
5709
|
|
|
@@ -6041,6 +5799,7 @@ export interface FetchReactionUsersOptions {
|
|
|
6041
5799
|
export interface FetchThreadMemberOptions extends BaseFetchOptions {
|
|
6042
5800
|
withMember?: boolean;
|
|
6043
5801
|
}
|
|
5802
|
+
|
|
6044
5803
|
export interface FetchThreadMembersWithGuildMemberDataOptions {
|
|
6045
5804
|
withMember: true;
|
|
6046
5805
|
after?: Snowflake;
|
|
@@ -6049,7 +5808,7 @@ export interface FetchThreadMembersWithGuildMemberDataOptions {
|
|
|
6049
5808
|
}
|
|
6050
5809
|
|
|
6051
5810
|
export interface FetchThreadMembersWithoutGuildMemberDataOptions {
|
|
6052
|
-
withMember
|
|
5811
|
+
withMember?: false;
|
|
6053
5812
|
cache?: boolean;
|
|
6054
5813
|
}
|
|
6055
5814
|
|
|
@@ -6339,6 +6098,12 @@ export interface GuildEditData {
|
|
|
6339
6098
|
features?: GuildFeatures[];
|
|
6340
6099
|
}
|
|
6341
6100
|
|
|
6101
|
+
export interface GroupDMChannelEditData {
|
|
6102
|
+
name?: string;
|
|
6103
|
+
icon?: BufferResolvable | Base64Resolvable | null;
|
|
6104
|
+
owner?: UserResolvable;
|
|
6105
|
+
}
|
|
6106
|
+
|
|
6342
6107
|
export interface GuildEmojiCreateOptions {
|
|
6343
6108
|
roles?: Collection<Snowflake, Role> | RoleResolvable[];
|
|
6344
6109
|
reason?: string;
|
|
@@ -6364,7 +6129,6 @@ export type GuildFeatures =
|
|
|
6364
6129
|
| 'ANIMATED_ICON'
|
|
6365
6130
|
| 'AUTO_MODERATION'
|
|
6366
6131
|
| 'BANNER'
|
|
6367
|
-
| 'CLYDE_ENABLED'
|
|
6368
6132
|
| 'COMMERCE'
|
|
6369
6133
|
| 'COMMUNITY'
|
|
6370
6134
|
| 'CREATOR_MONETIZABLE_PROVISIONAL'
|
|
@@ -6386,8 +6150,8 @@ export type GuildFeatures =
|
|
|
6386
6150
|
| 'THREE_DAY_THREAD_ARCHIVE'
|
|
6387
6151
|
| 'SEVEN_DAY_THREAD_ARCHIVE'
|
|
6388
6152
|
| 'PRIVATE_THREADS'
|
|
6389
|
-
| 'RAID_ALERTS_DISABLED'
|
|
6390
6153
|
| 'ROLE_ICONS'
|
|
6154
|
+
| 'RAID_ALERTS_DISABLED'
|
|
6391
6155
|
| 'ROLE_SUBSCRIPTIONS_AVAILABLE_FOR_PURCHASE'
|
|
6392
6156
|
| 'ROLE_SUBSCRIPTIONS_ENABLED';
|
|
6393
6157
|
|
|
@@ -6517,6 +6281,7 @@ export interface HTTPAttachmentData {
|
|
|
6517
6281
|
export interface HTTPErrorData {
|
|
6518
6282
|
json: unknown;
|
|
6519
6283
|
files: HTTPAttachmentData[];
|
|
6284
|
+
headers?: Record<string, string>;
|
|
6520
6285
|
}
|
|
6521
6286
|
|
|
6522
6287
|
export interface HTTPOptions {
|
|
@@ -6592,13 +6357,6 @@ export type IntentsString =
|
|
|
6592
6357
|
| 'AUTO_MODERATION_CONFIGURATION'
|
|
6593
6358
|
| 'AUTO_MODERATION_EXECUTION';
|
|
6594
6359
|
|
|
6595
|
-
export interface InviteGenerationOptions {
|
|
6596
|
-
permissions?: PermissionResolvable;
|
|
6597
|
-
guild?: GuildResolvable;
|
|
6598
|
-
disableGuildSelect?: boolean;
|
|
6599
|
-
scopes: InviteScope[];
|
|
6600
|
-
}
|
|
6601
|
-
|
|
6602
6360
|
export type GuildInvitableChannelResolvable =
|
|
6603
6361
|
| TextChannel
|
|
6604
6362
|
| VoiceChannel
|
|
@@ -6634,7 +6392,8 @@ export type InviteScope =
|
|
|
6634
6392
|
| 'guilds'
|
|
6635
6393
|
| 'guilds.join'
|
|
6636
6394
|
| 'gdm.join'
|
|
6637
|
-
| 'webhook.incoming'
|
|
6395
|
+
| 'webhook.incoming'
|
|
6396
|
+
| 'role_connections.write';
|
|
6638
6397
|
|
|
6639
6398
|
export interface LifetimeFilterOptions<K, V> {
|
|
6640
6399
|
excludeFromSweep?: (value: V, key: K, collection: LimitedCollection<K, V>) => boolean;
|
|
@@ -6686,6 +6445,7 @@ export interface MessageActivity {
|
|
|
6686
6445
|
}
|
|
6687
6446
|
|
|
6688
6447
|
export interface BaseButtonOptions extends BaseMessageComponentOptions {
|
|
6448
|
+
type: 'BUTTON' | MessageComponentTypes.BUTTON;
|
|
6689
6449
|
disabled?: boolean;
|
|
6690
6450
|
emoji?: EmojiIdentifierResolvable;
|
|
6691
6451
|
label?: string;
|
|
@@ -6732,35 +6492,16 @@ export type MessageComponentType = keyof typeof MessageComponentTypes;
|
|
|
6732
6492
|
|
|
6733
6493
|
export type MessageComponentTypeResolvable = MessageComponentType | MessageComponentTypes;
|
|
6734
6494
|
|
|
6495
|
+
export type GuildForumThreadMessageCreateOptions = MessageOptions & Pick<MessageOptions, 'flags' | 'stickers'>;
|
|
6496
|
+
|
|
6735
6497
|
export interface MessageEditOptions {
|
|
6736
6498
|
attachments?: MessageAttachment[];
|
|
6737
6499
|
content?: string | null;
|
|
6738
|
-
|
|
6739
|
-
|
|
6740
|
-
|
|
6741
|
-
|
|
6742
|
-
|
|
6743
|
-
| 'GROUP_DM'
|
|
6744
|
-
| 'GUILD_NEWS'
|
|
6745
|
-
| 'GUILD_STORE'
|
|
6746
|
-
| 'UNKNOWN'
|
|
6747
|
-
| 'GUILD_NEWS_THREAD'
|
|
6748
|
-
| 'GUILD_PUBLIC_THREAD'
|
|
6749
|
-
| 'GUILD_PRIVATE_THREAD'
|
|
6750
|
-
| 'GUILD_STAGE_VOICE'
|
|
6751
|
-
>;
|
|
6752
|
-
name: string;
|
|
6753
|
-
topic?: string;
|
|
6754
|
-
nsfw?: boolean;
|
|
6755
|
-
bitrate?: number;
|
|
6756
|
-
userLimit?: number;
|
|
6757
|
-
rtcRegion?: string | null;
|
|
6758
|
-
videoQualityMode?: VideoQualityMode;
|
|
6759
|
-
permissionOverwrites?: PartialOverwriteData[];
|
|
6760
|
-
rateLimitPerUser?: number;
|
|
6761
|
-
availableTags?: GuildForumTagData[];
|
|
6762
|
-
defaultReactionEmoji?: DefaultReactionEmoji;
|
|
6763
|
-
defaultThreadRateLimitPerUser?: number;
|
|
6500
|
+
embeds?: (MessageEmbed | MessageEmbedOptions | APIEmbed)[] | null;
|
|
6501
|
+
files?: (FileOptions | BufferResolvable | Stream | MessageAttachment)[];
|
|
6502
|
+
flags?: BitFieldResolvable<MessageFlagsString, number>;
|
|
6503
|
+
allowedMentions?: MessageMentionOptions;
|
|
6504
|
+
components?: (MessageActionRow | (Required<BaseMessageComponentOptions> & MessageActionRowOptions))[];
|
|
6764
6505
|
}
|
|
6765
6506
|
|
|
6766
6507
|
export interface MessageEmbedAuthor {
|
|
@@ -6863,15 +6604,14 @@ export interface MessageOptions {
|
|
|
6863
6604
|
tts?: boolean;
|
|
6864
6605
|
nonce?: string | number;
|
|
6865
6606
|
content?: string | null;
|
|
6866
|
-
embeds?: (
|
|
6607
|
+
embeds?: (MessageEmbed | MessageEmbedOptions | APIEmbed)[];
|
|
6867
6608
|
components?: (MessageActionRow | (Required<BaseMessageComponentOptions> & MessageActionRowOptions))[];
|
|
6868
6609
|
allowedMentions?: MessageMentionOptions;
|
|
6869
6610
|
files?: (FileOptions | BufferResolvable | Stream | MessageAttachment)[];
|
|
6870
6611
|
reply?: ReplyOptions;
|
|
6871
6612
|
stickers?: StickerResolvable[];
|
|
6872
6613
|
attachments?: MessageAttachment[];
|
|
6873
|
-
flags?: BitFieldResolvable<'SUPPRESS_EMBEDS' | 'SUPPRESS_NOTIFICATIONS', number>;
|
|
6874
|
-
usingNewAttachmentAPI?: boolean;
|
|
6614
|
+
flags?: BitFieldResolvable<'SUPPRESS_EMBEDS' | 'SUPPRESS_NOTIFICATIONS' | 'IS_VOICE_MESSAGE', number>;
|
|
6875
6615
|
}
|
|
6876
6616
|
|
|
6877
6617
|
export type MessageReactionResolvable = MessageReaction | Snowflake | string;
|
|
@@ -6892,12 +6632,9 @@ export interface BaseMessageSelectMenuOptions {
|
|
|
6892
6632
|
minValues?: number;
|
|
6893
6633
|
placeholder?: string;
|
|
6894
6634
|
}
|
|
6635
|
+
|
|
6895
6636
|
export interface StringMessageSelectMenuOptions extends BaseMessageSelectMenuOptions {
|
|
6896
|
-
type?:
|
|
6897
|
-
| 'STRING_SELECT'
|
|
6898
|
-
| 'SELECT_MENU'
|
|
6899
|
-
| SelectMenuComponentTypes.STRING_SELECT
|
|
6900
|
-
| SelectMenuComponentTypes.SELECT_MENU;
|
|
6637
|
+
type?: 'STRING_SELECT' | SelectMenuComponentTypes.STRING_SELECT;
|
|
6901
6638
|
options?: MessageSelectOptionData[];
|
|
6902
6639
|
}
|
|
6903
6640
|
|
|
@@ -7050,7 +6787,9 @@ export type PermissionString =
|
|
|
7050
6787
|
| 'MANAGE_EVENTS'
|
|
7051
6788
|
| 'VIEW_CREATOR_MONETIZATION_ANALYTICS'
|
|
7052
6789
|
| 'USE_SOUNDBOARD'
|
|
7053
|
-
| 'SEND_VOICE_MESSAGES'
|
|
6790
|
+
| 'SEND_VOICE_MESSAGES'
|
|
6791
|
+
| 'USE_CLYDE_AI'
|
|
6792
|
+
| 'SET_VOICE_CHANNEL_STATUS';
|
|
7054
6793
|
|
|
7055
6794
|
export type RecursiveArray<T> = ReadonlyArray<T | RecursiveArray<T>>;
|
|
7056
6795
|
|
|
@@ -7065,7 +6804,7 @@ export type PremiumTier = keyof typeof PremiumTiers;
|
|
|
7065
6804
|
export interface PresenceData {
|
|
7066
6805
|
status?: PresenceStatusData;
|
|
7067
6806
|
afk?: boolean;
|
|
7068
|
-
activities?: ActivitiesOptions[];
|
|
6807
|
+
activities?: (ActivitiesOptions | RichPresence | SpotifyRPC | CustomStatus)[];
|
|
7069
6808
|
shardId?: number | number[];
|
|
7070
6809
|
}
|
|
7071
6810
|
|
|
@@ -7095,6 +6834,9 @@ export interface PartialChannelData {
|
|
|
7095
6834
|
videoQualityMode?: VideoQualityMode;
|
|
7096
6835
|
permissionOverwrites?: PartialOverwriteData[];
|
|
7097
6836
|
rateLimitPerUser?: number;
|
|
6837
|
+
availableTags?: GuildForumTagData[];
|
|
6838
|
+
defaultReactionEmoji?: DefaultReactionEmoji;
|
|
6839
|
+
defaultThreadRateLimitPerUser?: number;
|
|
7098
6840
|
}
|
|
7099
6841
|
|
|
7100
6842
|
export type Partialize<
|
|
@@ -7255,11 +6997,6 @@ export interface StartThreadOptions {
|
|
|
7255
6997
|
rateLimitPerUser?: number;
|
|
7256
6998
|
}
|
|
7257
6999
|
|
|
7258
|
-
export interface MessageButtonLocation {
|
|
7259
|
-
row: number;
|
|
7260
|
-
col: number;
|
|
7261
|
-
}
|
|
7262
|
-
|
|
7263
7000
|
export type Status = number;
|
|
7264
7001
|
|
|
7265
7002
|
export type StickerFormatType = keyof typeof StickerFormatTypes;
|
|
@@ -7278,6 +7015,10 @@ export type SystemChannelFlagsString =
|
|
|
7278
7015
|
|
|
7279
7016
|
export type SystemChannelFlagsResolvable = BitFieldResolvable<SystemChannelFlagsString, number>;
|
|
7280
7017
|
|
|
7018
|
+
export type ChannelFlagsResolvable = BitFieldResolvable<ChannelFlagsString, number>;
|
|
7019
|
+
|
|
7020
|
+
export type SelectMenuComponentType = keyof typeof SelectMenuComponentTypes;
|
|
7021
|
+
|
|
7281
7022
|
export type SystemMessageType = Exclude<
|
|
7282
7023
|
MessageType,
|
|
7283
7024
|
'DEFAULT' | 'REPLY' | 'APPLICATION_COMMAND' | 'CONTEXT_MENU_COMMAND'
|
|
@@ -7352,13 +7093,9 @@ export type AnyChannel =
|
|
|
7352
7093
|
| TextChannel
|
|
7353
7094
|
| ThreadChannel
|
|
7354
7095
|
| VoiceChannel
|
|
7355
|
-
| ForumChannel
|
|
7356
|
-
| PartialGroupDMChannel;
|
|
7096
|
+
| ForumChannel;
|
|
7357
7097
|
|
|
7358
|
-
export type TextBasedChannel = Exclude<
|
|
7359
|
-
Extract<AnyChannel, { messages: MessageManager; interactions: InteractionManager }>,
|
|
7360
|
-
ForumChannel
|
|
7361
|
-
>;
|
|
7098
|
+
export type TextBasedChannel = Exclude<Extract<AnyChannel, { messages: MessageManager }>, ForumChannel>;
|
|
7362
7099
|
|
|
7363
7100
|
export type TextBasedChannelTypes = TextBasedChannel['type'];
|
|
7364
7101
|
|
|
@@ -7406,6 +7143,11 @@ export interface GuildTextThreadCreateOptions<AllowedThreadType> extends StartTh
|
|
|
7406
7143
|
rateLimitPerUser?: number;
|
|
7407
7144
|
}
|
|
7408
7145
|
|
|
7146
|
+
export interface GuildForumThreadCreateOptions extends StartThreadOptions {
|
|
7147
|
+
message: GuildForumThreadMessageCreateOptions | MessagePayload;
|
|
7148
|
+
appliedTags?: Snowflake[];
|
|
7149
|
+
}
|
|
7150
|
+
|
|
7409
7151
|
export interface ThreadEditData {
|
|
7410
7152
|
name?: string;
|
|
7411
7153
|
archived?: boolean;
|
|
@@ -7426,38 +7168,17 @@ export type UserFlagsString =
|
|
|
7426
7168
|
| 'PARTNERED_SERVER_OWNER'
|
|
7427
7169
|
| 'HYPESQUAD_EVENTS'
|
|
7428
7170
|
| 'BUGHUNTER_LEVEL_1'
|
|
7429
|
-
| 'MFA_SMS'
|
|
7430
|
-
| 'PREMIUM_PROMO_DISMISSED'
|
|
7431
7171
|
| 'HOUSE_BRAVERY'
|
|
7432
7172
|
| 'HOUSE_BRILLIANCE'
|
|
7433
7173
|
| 'HOUSE_BALANCE'
|
|
7434
7174
|
| 'EARLY_SUPPORTER'
|
|
7435
7175
|
| 'TEAM_USER'
|
|
7436
|
-
| 'INTERNAL_APPLICATION'
|
|
7437
|
-
| 'SYSTEM'
|
|
7438
|
-
| 'HAS_UNREAD_URGENT_MESSAGES'
|
|
7439
7176
|
| 'BUGHUNTER_LEVEL_2'
|
|
7440
|
-
| 'UNDERAGE_DELETED'
|
|
7441
7177
|
| 'VERIFIED_BOT'
|
|
7442
7178
|
| 'EARLY_VERIFIED_BOT_DEVELOPER'
|
|
7443
7179
|
| 'DISCORD_CERTIFIED_MODERATOR'
|
|
7444
7180
|
| 'BOT_HTTP_INTERACTIONS'
|
|
7445
|
-
| '
|
|
7446
|
-
| 'DISABLE_PREMIUM'
|
|
7447
|
-
| 'ACTIVE_DEVELOPER'
|
|
7448
|
-
| 'HIGH_GLOBAL_RATE_LIMIT'
|
|
7449
|
-
| 'DELETED'
|
|
7450
|
-
| 'DISABLED_SUSPICIOUS_ACTIVITY'
|
|
7451
|
-
| 'SELF_DELETED'
|
|
7452
|
-
| 'PREMIUM_DISCRIMINATOR'
|
|
7453
|
-
| 'USED_DESKTOP_CLIENT'
|
|
7454
|
-
| 'USED_WEB_CLIENT'
|
|
7455
|
-
| 'USED_MOBILE_CLIENT'
|
|
7456
|
-
| 'DISABLED'
|
|
7457
|
-
| 'VERIFIED_EMAIL'
|
|
7458
|
-
| 'QUARANTINED'
|
|
7459
|
-
| 'COLLABORATOR'
|
|
7460
|
-
| 'RESTRICTED_COLLABORATOR';
|
|
7181
|
+
| 'ACTIVE_DEVELOPER';
|
|
7461
7182
|
|
|
7462
7183
|
export type UserMention = `<@${Snowflake}>`;
|
|
7463
7184
|
|
|
@@ -7487,6 +7208,15 @@ export interface WebhookClientDataURL {
|
|
|
7487
7208
|
url: string;
|
|
7488
7209
|
}
|
|
7489
7210
|
|
|
7211
|
+
export type FriendRequestOptions =
|
|
7212
|
+
| {
|
|
7213
|
+
user: UserResolvable;
|
|
7214
|
+
}
|
|
7215
|
+
| {
|
|
7216
|
+
username: string;
|
|
7217
|
+
discriminator: number | null;
|
|
7218
|
+
};
|
|
7219
|
+
|
|
7490
7220
|
export type WebhookClientOptions = Pick<
|
|
7491
7221
|
ClientOptions,
|
|
7492
7222
|
'allowedMentions' | 'restTimeOffset' | 'restRequestTimeout' | 'retryLimit' | 'http'
|
|
@@ -7502,7 +7232,6 @@ export type WebhookEditMessageOptions = Pick<
|
|
|
7502
7232
|
WebhookMessageOptions,
|
|
7503
7233
|
'content' | 'embeds' | 'files' | 'allowedMentions' | 'components' | 'attachments' | 'threadId'
|
|
7504
7234
|
>;
|
|
7505
|
-
|
|
7506
7235
|
export interface InteractionEditReplyOptions extends WebhookEditMessageOptions {
|
|
7507
7236
|
message?: MessageResolvable | '@original';
|
|
7508
7237
|
}
|
|
@@ -7522,6 +7251,7 @@ export interface WebhookMessageOptions extends Omit<MessageOptions, 'reply' | 's
|
|
|
7522
7251
|
export type WebhookType = keyof typeof WebhookTypes;
|
|
7523
7252
|
|
|
7524
7253
|
export interface WebSocketOptions {
|
|
7254
|
+
agent?: Omit<AgentOptions, 'keepAlive'>;
|
|
7525
7255
|
compress?: boolean;
|
|
7526
7256
|
properties?: WebSocketProperties;
|
|
7527
7257
|
}
|
|
@@ -7563,11 +7293,10 @@ export interface WelcomeScreenEditData {
|
|
|
7563
7293
|
export type WSEventType =
|
|
7564
7294
|
| 'READY'
|
|
7565
7295
|
| 'RESUMED'
|
|
7566
|
-
| 'APPLICATION_COMMAND_AUTOCOMPLETE_RESPONSE'
|
|
7567
7296
|
| 'APPLICATION_COMMAND_CREATE'
|
|
7568
7297
|
| 'APPLICATION_COMMAND_DELETE'
|
|
7569
|
-
| 'APPLICATION_COMMAND_UPDATE'
|
|
7570
7298
|
| 'APPLICATION_COMMAND_PERMISSIONS_UPDATE'
|
|
7299
|
+
| 'APPLICATION_COMMAND_UPDATE'
|
|
7571
7300
|
| 'AUTO_MODERATION_ACTION_EXECUTION'
|
|
7572
7301
|
| 'AUTO_MODERATION_RULE_CREATE'
|
|
7573
7302
|
| 'AUTO_MODERATION_RULE_DELETE'
|
|
@@ -7658,85 +7387,4 @@ export type InternalDiscordGatewayAdapterCreator = (
|
|
|
7658
7387
|
methods: InternalDiscordGatewayAdapterLibraryMethods,
|
|
7659
7388
|
) => InternalDiscordGatewayAdapterImplementerMethods;
|
|
7660
7389
|
|
|
7661
|
-
// GuildForum
|
|
7662
|
-
export type ChannelFlagsString = 'PINNED' | 'REQUIRE_TAG';
|
|
7663
|
-
export class ChannelFlags extends BitField<ChannelFlagsString> {
|
|
7664
|
-
public static FLAGS: Record<ChannelFlagsString, number>;
|
|
7665
|
-
public static resolve(bit?: BitFieldResolvable<ChannelFlagsString, number>): number;
|
|
7666
|
-
}
|
|
7667
|
-
|
|
7668
|
-
export interface GuildForumTagEmoji {
|
|
7669
|
-
id: Snowflake | null;
|
|
7670
|
-
name: string | null;
|
|
7671
|
-
}
|
|
7672
|
-
|
|
7673
|
-
export interface GuildForumTag {
|
|
7674
|
-
id: Snowflake;
|
|
7675
|
-
name: string;
|
|
7676
|
-
moderated: boolean;
|
|
7677
|
-
emoji: GuildForumTagEmoji | null;
|
|
7678
|
-
}
|
|
7679
|
-
|
|
7680
|
-
export type GuildForumTagData = Partial<GuildForumTag> & { name: string };
|
|
7681
|
-
|
|
7682
|
-
export interface DefaultReactionEmoji {
|
|
7683
|
-
id: Snowflake | null;
|
|
7684
|
-
name: string | null;
|
|
7685
|
-
}
|
|
7686
|
-
|
|
7687
|
-
export class ForumChannel extends TextBasedChannelMixin(GuildChannel, [
|
|
7688
|
-
'send',
|
|
7689
|
-
'lastMessage',
|
|
7690
|
-
'lastPinAt',
|
|
7691
|
-
'bulkDelete',
|
|
7692
|
-
'sendTyping',
|
|
7693
|
-
'createMessageCollector',
|
|
7694
|
-
'awaitMessages',
|
|
7695
|
-
'createMessageComponentCollector',
|
|
7696
|
-
'awaitMessageComponent',
|
|
7697
|
-
]) {
|
|
7698
|
-
public type: 'GUILD_FORUM';
|
|
7699
|
-
public threads: GuildForumThreadManager;
|
|
7700
|
-
public availableTags: GuildForumTag[];
|
|
7701
|
-
public defaultReactionEmoji: DefaultReactionEmoji | null;
|
|
7702
|
-
public defaultThreadRateLimitPerUser: number | null;
|
|
7703
|
-
public rateLimitPerUser: number | null;
|
|
7704
|
-
public defaultAutoArchiveDuration: ThreadAutoArchiveDuration | null;
|
|
7705
|
-
public nsfw: boolean;
|
|
7706
|
-
public topic: string | null;
|
|
7707
|
-
public defaultSortOrder: SortOrderType | null;
|
|
7708
|
-
public defaultForumLayout: ForumLayoutType;
|
|
7709
|
-
public setAvailableTags(tags: GuildForumTagData[], reason?: string): Promise<this>;
|
|
7710
|
-
public setDefaultReactionEmoji(emojiId: DefaultReactionEmoji | null, reason?: string): Promise<this>;
|
|
7711
|
-
public setDefaultThreadRateLimitPerUser(rateLimit: number, reason?: string): Promise<this>;
|
|
7712
|
-
public createInvite(options?: CreateInviteOptions): Promise<Invite>;
|
|
7713
|
-
public fetchInvites(cache?: boolean): Promise<Collection<string, Invite>>;
|
|
7714
|
-
public setDefaultAutoArchiveDuration(
|
|
7715
|
-
defaultAutoArchiveDuration: ThreadAutoArchiveDuration,
|
|
7716
|
-
reason?: string,
|
|
7717
|
-
): Promise<this>;
|
|
7718
|
-
public setTopic(topic: string | null, reason?: string): Promise<this>;
|
|
7719
|
-
public setDefaultSortOrder(defaultSortOrder: SortOrderType | null, reason?: string): Promise<this>;
|
|
7720
|
-
public setDefaultForumLayout(defaultForumLayout: ForumLayoutType, reason?: string): Promise<this>;
|
|
7721
|
-
}
|
|
7722
|
-
|
|
7723
|
-
export class GuildTextThreadManager<AllowedThreadType> extends ThreadManager {
|
|
7724
|
-
public create(options: GuildTextThreadCreateOptions<AllowedThreadType>): Promise<ThreadChannel>;
|
|
7725
|
-
}
|
|
7726
|
-
|
|
7727
|
-
export class GuildForumThreadManager extends ThreadManager {
|
|
7728
|
-
public create(options: GuildForumThreadCreateOptions): Promise<ThreadChannel>;
|
|
7729
|
-
}
|
|
7730
|
-
|
|
7731
|
-
export type GuildForumThreadMessageCreateOptions = MessageOptions & Pick<MessageOptions, 'flags' | 'stickers'>;
|
|
7732
|
-
|
|
7733
|
-
export type ChannelFlagsResolvable = BitFieldResolvable<ChannelFlagsString, number>;
|
|
7734
|
-
|
|
7735
|
-
export type SelectMenuComponentType = keyof typeof SelectMenuComponentTypes;
|
|
7736
|
-
|
|
7737
|
-
export interface GuildForumThreadCreateOptions extends StartThreadOptions {
|
|
7738
|
-
message: GuildForumThreadMessageCreateOptions | MessagePayload;
|
|
7739
|
-
appliedTags?: Snowflake[];
|
|
7740
|
-
}
|
|
7741
|
-
|
|
7742
7390
|
//#endregion
|