djs-selfbot-v13 3.1.6 → 3.1.7
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/README.md +31 -16
- package/package.json +15 -8
- package/src/client/BaseClient.js +3 -2
- package/src/client/Client.js +539 -187
- package/src/client/actions/Action.js +13 -18
- package/src/client/actions/ActionsManager.js +1 -7
- package/src/client/actions/AutoModerationActionExecution.js +0 -1
- package/src/client/actions/AutoModerationRuleCreate.js +0 -1
- package/src/client/actions/AutoModerationRuleDelete.js +0 -1
- package/src/client/actions/AutoModerationRuleUpdate.js +0 -1
- package/src/client/actions/InteractionCreate.js +115 -0
- package/src/client/actions/MessageCreate.js +4 -0
- package/src/client/actions/PresenceUpdate.js +16 -17
- package/src/client/websocket/WebSocketManager.js +31 -11
- package/src/client/websocket/WebSocketShard.js +38 -39
- package/src/client/websocket/handlers/APPLICATION_COMMAND_AUTOCOMPLETE_RESPONSE.js +23 -0
- 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 +13 -16
- package/src/client/websocket/handlers/CHANNEL_RECIPIENT_REMOVE.js +11 -11
- package/src/client/websocket/handlers/GUILD_APPLICATION_COMMANDS_UPDATE.js +11 -0
- package/src/client/websocket/handlers/GUILD_CREATE.js +0 -7
- package/src/client/websocket/handlers/GUILD_MEMBER_LIST_UPDATE.js +55 -0
- 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 +16 -0
- package/src/client/websocket/handlers/INTERACTION_FAILURE.js +18 -0
- package/src/client/websocket/handlers/INTERACTION_MODAL_CREATE.js +0 -1
- package/src/client/websocket/handlers/INTERACTION_SUCCESS.js +30 -0
- package/src/client/websocket/handlers/MESSAGE_ACK.js +16 -0
- package/src/client/websocket/handlers/READY.js +137 -47
- package/src/client/websocket/handlers/RELATIONSHIP_ADD.js +5 -7
- package/src/client/websocket/handlers/RELATIONSHIP_REMOVE.js +4 -6
- package/src/client/websocket/handlers/RELATIONSHIP_UPDATE.js +9 -32
- package/src/client/websocket/handlers/SOUNDBOARD_SOUNDS.js +0 -0
- package/src/client/websocket/handlers/USER_GUILD_SETTINGS_UPDATE.js +8 -2
- package/src/client/websocket/handlers/USER_NOTE_UPDATE.js +1 -1
- package/src/client/websocket/handlers/USER_SETTINGS_UPDATE.js +5 -1
- package/src/client/websocket/handlers/VOICE_CHANNEL_EFFECT_SEND.js +0 -0
- package/src/client/websocket/handlers/index.js +20 -15
- package/src/errors/Messages.js +69 -24
- package/src/index.js +43 -12
- package/src/managers/ApplicationCommandManager.js +12 -9
- package/src/managers/ApplicationCommandPermissionsManager.js +11 -3
- package/src/managers/ChannelManager.js +4 -2
- package/src/managers/ClientUserSettingManager.js +279 -161
- package/src/managers/DeveloperPortalManager.js +104 -0
- package/src/managers/GuildApplicationCommandManager.js +28 -0
- package/src/managers/GuildBanManager.js +1 -1
- package/src/managers/GuildChannelManager.js +0 -2
- package/src/managers/GuildFolderManager.js +24 -0
- package/src/managers/GuildForumThreadManager.js +28 -22
- package/src/managers/GuildMemberManager.js +216 -40
- package/src/managers/GuildSettingManager.js +15 -22
- package/src/managers/MessageManager.js +44 -42
- package/src/managers/PermissionOverwriteManager.js +1 -1
- package/src/managers/ReactionUserManager.js +5 -5
- package/src/managers/RelationshipManager.js +74 -81
- package/src/managers/SessionManager.js +57 -0
- package/src/managers/ThreadManager.js +45 -12
- package/src/managers/ThreadMemberManager.js +1 -1
- package/src/managers/UserManager.js +10 -6
- package/src/rest/APIRequest.js +20 -42
- package/src/rest/CaptchaSolver.js +132 -0
- package/src/rest/DiscordAPIError.js +16 -17
- package/src/rest/RESTManager.js +21 -1
- package/src/rest/RequestHandler.js +21 -35
- package/src/structures/ApplicationCommand.js +456 -19
- package/src/structures/ApplicationRoleConnectionMetadata.js +0 -3
- package/src/structures/AutoModerationRule.js +5 -5
- package/src/structures/AutocompleteInteraction.js +0 -1
- package/src/structures/BaseGuildTextChannel.js +12 -10
- package/src/structures/BaseGuildVoiceChannel.js +18 -16
- package/src/structures/{CallState.js → Call.js} +12 -17
- package/src/structures/CategoryChannel.js +0 -2
- package/src/structures/Channel.js +3 -2
- package/src/structures/ClientApplication.js +204 -0
- package/src/structures/ClientPresence.js +8 -12
- package/src/structures/ClientUser.js +336 -117
- package/src/structures/ContextMenuInteraction.js +1 -1
- package/src/structures/DMChannel.js +92 -29
- package/src/structures/DeveloperPortalApplication.js +520 -0
- package/src/structures/ForumChannel.js +10 -0
- package/src/structures/Guild.js +271 -135
- package/src/structures/GuildAuditLogs.js +5 -0
- package/src/structures/GuildChannel.js +2 -16
- package/src/structures/GuildFolder.js +75 -0
- package/src/structures/GuildMember.js +145 -27
- package/src/structures/Interaction.js +62 -1
- package/src/structures/InteractionResponse.js +114 -0
- package/src/structures/Invite.js +52 -35
- package/src/structures/Message.js +202 -222
- package/src/structures/MessageAttachment.js +0 -11
- package/src/structures/MessageButton.js +67 -1
- package/src/structures/MessageEmbed.js +1 -1
- package/src/structures/MessageMentions.js +2 -3
- package/src/structures/MessagePayload.js +46 -4
- package/src/structures/MessageReaction.js +1 -1
- package/src/structures/MessageSelectMenu.js +252 -1
- package/src/structures/Modal.js +180 -75
- package/src/structures/PartialGroupDMChannel.js +433 -0
- package/src/structures/Presence.js +2 -2
- package/src/structures/RichPresence.js +34 -14
- package/src/structures/Role.js +2 -18
- package/src/structures/SelectMenuInteraction.js +151 -2
- package/src/structures/Session.js +81 -0
- package/src/structures/Team.js +49 -0
- package/src/structures/TextInputComponent.js +70 -0
- package/src/structures/ThreadChannel.js +19 -0
- package/src/structures/User.js +345 -117
- package/src/structures/UserContextMenuInteraction.js +2 -2
- package/src/structures/VoiceState.js +39 -74
- package/src/structures/WebEmbed.js +52 -38
- package/src/structures/Webhook.js +11 -17
- package/src/structures/interfaces/Application.js +23 -146
- package/src/structures/interfaces/TextBasedChannel.js +256 -411
- package/src/util/ApplicationFlags.js +1 -1
- package/src/util/Constants.js +284 -106
- package/src/util/Formatters.js +2 -16
- package/src/util/LimitedCollection.js +1 -1
- package/src/util/Options.js +68 -48
- package/src/util/Permissions.js +0 -5
- package/src/util/PurchasedFlags.js +0 -2
- package/src/util/RemoteAuth.js +356 -221
- package/src/util/Sweepers.js +1 -1
- package/src/util/Util.js +36 -76
- package/src/util/Voice.js +1456 -0
- package/src/util/arRPC/index.js +229 -0
- package/src/util/arRPC/process/detectable.json +1 -0
- package/src/util/arRPC/process/index.js +102 -0
- package/src/util/arRPC/process/native/index.js +5 -0
- package/src/util/arRPC/process/native/linux.js +37 -0
- package/src/util/arRPC/process/native/win32.js +25 -0
- package/src/util/arRPC/transports/ipc.js +281 -0
- package/src/util/arRPC/transports/websocket.js +128 -0
- package/typings/enums.d.ts +73 -18
- package/typings/index.d.ts +1249 -897
- package/typings/rawDataTypes.d.ts +9 -68
- package/src/client/websocket/handlers/USER_REQUIRED_ACTION_UPDATE.js +0 -78
- package/src/client/websocket/handlers/VOICE_CHANNEL_STATUS_UPDATE.js +0 -12
- package/src/managers/UserNoteManager.js +0 -53
- package/src/structures/GroupDMChannel.js +0 -387
- package/src/util/AttachmentFlags.js +0 -38
- package/src/util/InviteFlags.js +0 -29
- package/src/util/RoleFlags.js +0 -37
package/typings/index.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import {
|
|
|
2
2
|
blockQuote,
|
|
3
3
|
bold,
|
|
4
4
|
channelMention,
|
|
5
|
+
chatInputApplicationCommandMention,
|
|
5
6
|
codeBlock,
|
|
6
7
|
ContextMenuCommandBuilder,
|
|
7
8
|
formatEmoji,
|
|
@@ -20,6 +21,7 @@ import {
|
|
|
20
21
|
underscore,
|
|
21
22
|
userMention,
|
|
22
23
|
} from '@discordjs/builders';
|
|
24
|
+
import { VoiceConnection } from '@discordjs/voice';
|
|
23
25
|
import { Collection } from '@discordjs/collection';
|
|
24
26
|
import {
|
|
25
27
|
APIActionRowComponent,
|
|
@@ -45,13 +47,13 @@ import {
|
|
|
45
47
|
APISelectMenuComponent,
|
|
46
48
|
APITemplateSerializedSourceGuild,
|
|
47
49
|
APIUser,
|
|
50
|
+
MessageActivityType,
|
|
51
|
+
GatewayOpcodes,
|
|
48
52
|
GatewayVoiceServerUpdateDispatchData,
|
|
49
53
|
GatewayVoiceStateUpdateDispatchData,
|
|
50
|
-
MessageActivityType,
|
|
51
54
|
RESTPostAPIApplicationCommandsJSONBody,
|
|
52
55
|
Snowflake,
|
|
53
56
|
LocalizationMap,
|
|
54
|
-
LocaleString,
|
|
55
57
|
APIGuildMember,
|
|
56
58
|
APIChannel,
|
|
57
59
|
} from 'discord-api-types/v9';
|
|
@@ -72,6 +74,10 @@ import {
|
|
|
72
74
|
AutoModerationRuleKeywordPresetTypes,
|
|
73
75
|
AutoModerationRuleTriggerTypes,
|
|
74
76
|
ChannelTypes,
|
|
77
|
+
RelationshipTypes,
|
|
78
|
+
localeSetting,
|
|
79
|
+
stickerAnimationMode,
|
|
80
|
+
DMScanLevel,
|
|
75
81
|
DefaultMessageNotificationLevels,
|
|
76
82
|
ExplicitContentFilterLevels,
|
|
77
83
|
InteractionResponseTypes,
|
|
@@ -82,6 +88,9 @@ import {
|
|
|
82
88
|
MessageComponentTypes,
|
|
83
89
|
MessageTypes,
|
|
84
90
|
MFALevels,
|
|
91
|
+
NitroType as NitroTypes,
|
|
92
|
+
HypeSquadType as HypeSquadTypes,
|
|
93
|
+
localeSetting as localeSettings,
|
|
85
94
|
NSFWLevels,
|
|
86
95
|
OverwriteTypes,
|
|
87
96
|
PremiumTiers,
|
|
@@ -94,13 +103,12 @@ import {
|
|
|
94
103
|
GuildScheduledEventEntityTypes,
|
|
95
104
|
GuildScheduledEventStatuses,
|
|
96
105
|
GuildScheduledEventPrivacyLevels,
|
|
106
|
+
HypeSquadType,
|
|
97
107
|
VideoQualityModes,
|
|
98
108
|
SortOrderType,
|
|
109
|
+
SelectMenuComponentTypes,
|
|
99
110
|
ForumLayoutType,
|
|
100
111
|
ApplicationRoleConnectionMetadataTypes,
|
|
101
|
-
RelationshipTypes,
|
|
102
|
-
SelectMenuComponentTypes,
|
|
103
|
-
InviteType,
|
|
104
112
|
} from './enums';
|
|
105
113
|
import {
|
|
106
114
|
APIApplicationRoleConnectionMetadata,
|
|
@@ -112,6 +120,7 @@ import {
|
|
|
112
120
|
RawApplicationData,
|
|
113
121
|
RawBaseGuildData,
|
|
114
122
|
RawChannelData,
|
|
123
|
+
RawClientApplicationData,
|
|
115
124
|
RawDMChannelData,
|
|
116
125
|
RawEmojiData,
|
|
117
126
|
RawGuildAuditLogData,
|
|
@@ -164,9 +173,106 @@ import {
|
|
|
164
173
|
RawWidgetData,
|
|
165
174
|
RawWidgetMemberData,
|
|
166
175
|
} from './rawDataTypes';
|
|
167
|
-
|
|
176
|
+
// @ts-ignore
|
|
168
177
|
//#region Classes
|
|
169
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
|
+
|
|
261
|
+
export interface RPCActivityData {
|
|
262
|
+
activity?: RichPresence;
|
|
263
|
+
pid: number;
|
|
264
|
+
socketId: string;
|
|
265
|
+
}
|
|
266
|
+
|
|
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
|
+
}
|
|
170
276
|
// RPC by aiko-chan-ai
|
|
171
277
|
export interface RichButton {
|
|
172
278
|
name: string;
|
|
@@ -192,9 +298,9 @@ export class RichPresence {
|
|
|
192
298
|
public type: ActivityType;
|
|
193
299
|
public url: string | null;
|
|
194
300
|
public ipc: boolean;
|
|
195
|
-
public setAssetsLargeImage(image?:
|
|
301
|
+
public setAssetsLargeImage(image?: any): this;
|
|
196
302
|
public setAssetsLargeText(text?: string): this;
|
|
197
|
-
public setAssetsSmallImage(image?:
|
|
303
|
+
public setAssetsSmallImage(image?: any): this;
|
|
198
304
|
public setAssetsSmallText(text?: string): this;
|
|
199
305
|
public setName(name?: string): this;
|
|
200
306
|
public setURL(url?: string): this;
|
|
@@ -213,31 +319,11 @@ export class RichPresence {
|
|
|
213
319
|
image1: string,
|
|
214
320
|
image2: string,
|
|
215
321
|
): Promise<ExternalAssets[]>;
|
|
322
|
+
public static getUUID(): string;
|
|
216
323
|
public toJSON(): object;
|
|
217
324
|
public toString(): string;
|
|
218
325
|
}
|
|
219
326
|
|
|
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
|
-
|
|
241
327
|
export interface ExternalAssets {
|
|
242
328
|
url: string;
|
|
243
329
|
external_asset_path: string;
|
|
@@ -334,11 +420,6 @@ export class PremiumUsageFlags extends BitField<PremiumUsageFlagsString> {
|
|
|
334
420
|
public static resolve(bit?: BitFieldResolvable<PremiumUsageFlagsString, number>): number;
|
|
335
421
|
}
|
|
336
422
|
|
|
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
|
-
|
|
342
423
|
export abstract class AnonymousGuild extends BaseGuild {
|
|
343
424
|
protected constructor(client: Client, data: RawAnonymousGuildData, immediatePatch?: boolean);
|
|
344
425
|
public banner: string | null;
|
|
@@ -361,43 +442,103 @@ export abstract class Application extends Base {
|
|
|
361
442
|
public id: Snowflake;
|
|
362
443
|
public name: string | null;
|
|
363
444
|
public roleConnectionsVerificationURL: string | null;
|
|
364
|
-
public
|
|
445
|
+
public coverURL(options?: StaticImageURLOptions): string | null;
|
|
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);
|
|
365
474
|
public botPublic: boolean | null;
|
|
366
475
|
public botRequireCodeGrant: boolean | null;
|
|
367
476
|
public commands: ApplicationCommandManager;
|
|
368
477
|
public cover: string | null;
|
|
369
478
|
public flags: Readonly<ApplicationFlags>;
|
|
370
|
-
public guildId: Snowflake | null;
|
|
371
|
-
public readonly guild: Guild | null;
|
|
372
479
|
public tags: string[];
|
|
373
480
|
public installParams: ClientApplicationInstallParams | null;
|
|
374
481
|
public customInstallURL: string | null;
|
|
375
482
|
public owner: User | Team | null;
|
|
376
483
|
public readonly partial: boolean;
|
|
377
484
|
public rpcOrigins: string[];
|
|
378
|
-
public
|
|
379
|
-
public
|
|
485
|
+
public readonly createdAt: Date;
|
|
486
|
+
public readonly createdTimestamp: number;
|
|
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>;
|
|
380
499
|
public coverURL(options?: StaticImageURLOptions): string | null;
|
|
381
500
|
/** @deprecated This method is deprecated as it is unsupported and will be removed in the next major version. */
|
|
382
501
|
public fetchAssets(): Promise<ApplicationAsset[]>;
|
|
383
502
|
public iconURL(options?: StaticImageURLOptions): string | null;
|
|
384
503
|
public toJSON(): unknown;
|
|
385
504
|
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>;
|
|
386
529
|
}
|
|
387
530
|
|
|
388
531
|
export class ApplicationCommand<PermissionsFetchType = {}> extends Base {
|
|
389
|
-
private constructor(client: Client, data: RawApplicationCommandData
|
|
532
|
+
private constructor(client: Client, data: RawApplicationCommandData);
|
|
390
533
|
public applicationId: Snowflake;
|
|
391
534
|
public readonly createdAt: Date;
|
|
392
535
|
public readonly createdTimestamp: number;
|
|
393
536
|
/** @deprecated Use {@link defaultMemberPermissions} and {@link dmPermission} instead. */
|
|
394
537
|
public defaultPermission: boolean;
|
|
395
|
-
public defaultMemberPermissions: Readonly<Permissions> | null;
|
|
396
538
|
public description: string;
|
|
397
539
|
public descriptionLocalizations: LocalizationMap | null;
|
|
398
540
|
public descriptionLocalized: string | null;
|
|
399
|
-
public
|
|
400
|
-
public guild: Guild | null;
|
|
541
|
+
public readonly guild: Guild | null;
|
|
401
542
|
public guildId: Snowflake | null;
|
|
402
543
|
public readonly manager: ApplicationCommandManager;
|
|
403
544
|
public id: Snowflake;
|
|
@@ -446,6 +587,13 @@ export class ApplicationCommand<PermissionsFetchType = {}> extends Base {
|
|
|
446
587
|
private static transformOption(option: ApplicationCommandOptionData, received?: boolean): unknown;
|
|
447
588
|
private static transformCommand(command: ApplicationCommandData): RESTPostAPIApplicationCommandsJSONBody;
|
|
448
589
|
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>;
|
|
449
597
|
}
|
|
450
598
|
|
|
451
599
|
export class ApplicationRoleConnectionMetadata {
|
|
@@ -620,7 +768,6 @@ export class BaseGuildEmoji extends Emoji {
|
|
|
620
768
|
export class BaseGuildTextChannel extends TextBasedChannelMixin(GuildChannel) {
|
|
621
769
|
protected constructor(guild: Guild, data?: RawGuildChannelData, client?: Client, immediatePatch?: boolean);
|
|
622
770
|
public defaultAutoArchiveDuration?: ThreadAutoArchiveDuration;
|
|
623
|
-
public defaultThreadRateLimitPerUser: number | null;
|
|
624
771
|
public rateLimitPerUser: number | null;
|
|
625
772
|
public nsfw: boolean;
|
|
626
773
|
public threads: GuildTextThreadManager<AllowedThreadTypeForTextChannel | AllowedThreadTypeForNewsChannel>;
|
|
@@ -647,7 +794,6 @@ export class BaseGuildVoiceChannel extends TextBasedChannelMixin(GuildChannel, [
|
|
|
647
794
|
public rateLimitPerUser: number | null;
|
|
648
795
|
public userLimit: number;
|
|
649
796
|
public videoQualityMode: VideoQualityMode | null;
|
|
650
|
-
public status?: string;
|
|
651
797
|
public createInvite(options?: CreateInviteOptions): Promise<Invite>;
|
|
652
798
|
public setRTCRegion(rtcRegion: string | null, reason?: string): Promise<this>;
|
|
653
799
|
public fetchInvites(cache?: boolean): Promise<Collection<string, Invite>>;
|
|
@@ -739,6 +885,7 @@ export class CategoryChannel extends GuildChannel {
|
|
|
739
885
|
name: string,
|
|
740
886
|
options: CategoryCreateChannelOptions & { type: T },
|
|
741
887
|
): Promise<MappedChannelCategoryTypes[T]>;
|
|
888
|
+
|
|
742
889
|
/** @deprecated See [Self-serve Game Selling Deprecation](https://support-dev.discord.com/hc/en-us/articles/6309018858647) for more information */
|
|
743
890
|
public createChannel(
|
|
744
891
|
name: string,
|
|
@@ -770,12 +917,31 @@ export abstract class Channel extends Base {
|
|
|
770
917
|
|
|
771
918
|
export type If<T extends boolean, A, B = null> = T extends true ? A : T extends false ? B : A | B;
|
|
772
919
|
|
|
920
|
+
export interface OAuth2AuthorizeOptions {
|
|
921
|
+
guild_id: Snowflake;
|
|
922
|
+
permissions?: PermissionResolvable;
|
|
923
|
+
authorize?: boolean;
|
|
924
|
+
code?: string;
|
|
925
|
+
webhook_channel_id?: Snowflake;
|
|
926
|
+
}
|
|
927
|
+
|
|
773
928
|
export class Client<Ready extends boolean = boolean> extends BaseClient {
|
|
774
|
-
public constructor(options?: ClientOptions);
|
|
929
|
+
public constructor(options?: ClientOptions); /* Bug report by Mavri#0001 [721347809667973141] */
|
|
775
930
|
private actions: unknown;
|
|
776
931
|
private presence: ClientPresence;
|
|
777
932
|
private _eval(script: string): unknown;
|
|
778
933
|
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
|
|
779
945
|
public channels: ChannelManager;
|
|
780
946
|
public readonly emojis: BaseGuildEmojiManager;
|
|
781
947
|
public guilds: GuildManager;
|
|
@@ -790,36 +956,36 @@ export class Client<Ready extends boolean = boolean> extends BaseClient {
|
|
|
790
956
|
public users: UserManager;
|
|
791
957
|
public voice: ClientVoiceManager;
|
|
792
958
|
public ws: WebSocketManager;
|
|
793
|
-
public
|
|
794
|
-
public
|
|
795
|
-
public voiceStates: VoiceStateManager;
|
|
796
|
-
public presences: PresenceManager;
|
|
797
|
-
public billing: BillingManager;
|
|
798
|
-
public settings: ClientUserSettingManager;
|
|
799
|
-
public readonly sessionId: If<Ready, string, undefined>;
|
|
959
|
+
public password: string | null;
|
|
960
|
+
public readonly sessionId: string | null;
|
|
800
961
|
public destroy(): void;
|
|
962
|
+
public logout(): Promise<void>;
|
|
801
963
|
public fetchGuildPreview(guild: GuildResolvable): Promise<GuildPreview>;
|
|
802
964
|
public fetchInvite(invite: InviteResolvable, options?: ClientFetchInviteOptions): Promise<Invite>;
|
|
965
|
+
public acceptInvite(invite: InviteResolvable): Promise<undefined>;
|
|
803
966
|
public fetchGuildTemplate(template: GuildTemplateResolvable): Promise<GuildTemplate>;
|
|
804
967
|
public fetchVoiceRegions(): Promise<Collection<string, VoiceRegion>>;
|
|
805
968
|
public fetchSticker(id: Snowflake): Promise<Sticker>;
|
|
806
969
|
public fetchPremiumStickerPacks(): Promise<Collection<Snowflake, StickerPack>>;
|
|
807
970
|
public fetchWebhook(id: Snowflake, token?: string): Promise<Webhook>;
|
|
808
971
|
public fetchGuildWidget(guild: GuildResolvable): Promise<Widget>;
|
|
809
|
-
public
|
|
972
|
+
public redeemNitro(code: string, channel?: TextChannelResolvable, paymentSourceId?: Snowflake): object;
|
|
973
|
+
public generateInvite(options?: InviteGenerationOptions): string;
|
|
810
974
|
public login(token?: string): Promise<string>;
|
|
811
|
-
public
|
|
812
|
-
public
|
|
975
|
+
public normalLogin(username: string, password?: string, mfaCode?: string): Promise<string>;
|
|
976
|
+
public switchUser(token: string): void;
|
|
977
|
+
public QRLogin(options?: DiscordAuthWebsocketOptions): DiscordAuthWebsocket;
|
|
978
|
+
public remoteAuth(url: string): Promise<undefined>;
|
|
979
|
+
public createToken(): Promise<string>;
|
|
980
|
+
public checkUpdate(): Promise<this>;
|
|
813
981
|
public isReady(): this is Client<true>;
|
|
814
982
|
/** @deprecated Use {@link Sweepers#sweepMessages} instead */
|
|
815
983
|
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;
|
|
816
988
|
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>;
|
|
823
989
|
|
|
824
990
|
public on<K extends keyof ClientEvents>(event: K, listener: (...args: ClientEvents[K]) => Awaitable<void>): this;
|
|
825
991
|
public on<S extends string | symbol>(
|
|
@@ -846,17 +1012,25 @@ export class Client<Ready extends boolean = boolean> extends BaseClient {
|
|
|
846
1012
|
public removeAllListeners<S extends string | symbol>(event?: Exclude<S, keyof ClientEvents>): this;
|
|
847
1013
|
}
|
|
848
1014
|
|
|
849
|
-
export
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
1015
|
+
export class ClientApplication extends Application {
|
|
1016
|
+
private constructor(client: Client, data: RawClientApplicationData);
|
|
1017
|
+
public botPublic: boolean | null;
|
|
1018
|
+
public popularCommands: Collection<Snowflake, ApplicationCommand> | undefined;
|
|
1019
|
+
public botRequireCodeGrant: boolean | null;
|
|
1020
|
+
public commands: ApplicationCommandManager;
|
|
1021
|
+
public cover: string | null;
|
|
1022
|
+
public flags: Readonly<ApplicationFlags>;
|
|
1023
|
+
public tags: string[];
|
|
1024
|
+
public installParams: ClientApplicationInstallParams | null;
|
|
1025
|
+
public customInstallURL: string | null;
|
|
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[]>;
|
|
860
1034
|
}
|
|
861
1035
|
|
|
862
1036
|
export class ClientPresence extends Presence {
|
|
@@ -870,38 +1044,57 @@ export class ClientUser extends User {
|
|
|
870
1044
|
public mfaEnabled: boolean;
|
|
871
1045
|
public readonly presence: ClientPresence;
|
|
872
1046
|
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;
|
|
873
1052
|
public edit(data: ClientUserEditData): Promise<this>;
|
|
874
|
-
public setActivity(options?:
|
|
875
|
-
public setActivity(name: string, options?:
|
|
1053
|
+
public setActivity(options?: ActivitiesOptions): ClientPresence;
|
|
1054
|
+
public setActivity(name: string, options?: ActivityOptions): ClientPresence;
|
|
876
1055
|
public setAFK(afk?: boolean, shardId?: number | number[]): ClientPresence;
|
|
877
1056
|
public setAvatar(avatar: BufferResolvable | Base64Resolvable | null): Promise<this>;
|
|
1057
|
+
public setBanner(banner: BufferResolvable | Base64Resolvable | null): Promise<this>;
|
|
878
1058
|
public setPresence(data: PresenceData): ClientPresence;
|
|
879
1059
|
public setStatus(status: PresenceStatusData, shardId?: number | number[]): ClientPresence;
|
|
880
1060
|
public setUsername(username: string, password: string): Promise<this>;
|
|
881
|
-
public
|
|
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>;
|
|
1061
|
+
public setHypeSquad(type: HypeSquadType): Promise<void>;
|
|
893
1062
|
public setAccentColor(color: ColorResolvable): Promise<this>;
|
|
1063
|
+
public setDiscriminator(discriminator: string, password: string): Promise<this>;
|
|
894
1064
|
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>;
|
|
895
1071
|
public createFriendInvite(): Promise<Invite>;
|
|
896
1072
|
public getAllFriendInvites(): Promise<Collection<string, Invite>>;
|
|
897
|
-
public revokeAllFriendInvites(): Promise<
|
|
898
|
-
public setSamsungActivity(packageName: string, type
|
|
1073
|
+
public revokeAllFriendInvites(): Promise<Collection<string, Invite>>;
|
|
1074
|
+
public setSamsungActivity(packageName: string, type?: 'START' | 'UPDATE' | 'STOP'): Promise<this>;
|
|
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;
|
|
899
1091
|
public stopRinging(channel: ChannelResolvable): Promise<void>;
|
|
900
|
-
public
|
|
901
|
-
public setPronouns(pronouns?: string
|
|
902
|
-
public setGlobalName(globalName?: string | null): Promise<this>;
|
|
1092
|
+
public setGlobalName(globalName?: string): Promise<this>;
|
|
1093
|
+
public setPronouns(pronouns?: string): Promise<this>;
|
|
903
1094
|
}
|
|
904
1095
|
|
|
1096
|
+
type NitroType = 'NONE' | 'NITRO_CLASSIC' | 'NITRO_BOOST' | 'NITRO_BASIC';
|
|
1097
|
+
|
|
905
1098
|
export class Options extends null {
|
|
906
1099
|
private constructor();
|
|
907
1100
|
public static defaultMakeCacheSettings: CacheWithLimitsOptions;
|
|
@@ -925,12 +1118,6 @@ export interface CollectorEventTypes<K, V, F extends unknown[] = []> {
|
|
|
925
1118
|
end: [collected: Collection<K, V>, reason: string];
|
|
926
1119
|
}
|
|
927
1120
|
|
|
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
|
-
|
|
934
1121
|
export abstract class Collector<K, V, F extends unknown[] = []> extends EventEmitter {
|
|
935
1122
|
protected constructor(client: Client, options?: CollectorOptions<[V, ...F]>);
|
|
936
1123
|
private _timeout: NodeJS.Timeout | null;
|
|
@@ -1116,28 +1303,27 @@ export class DataResolver extends null {
|
|
|
1116
1303
|
public static resolveGuildTemplateCode(data: GuildTemplateResolvable): string;
|
|
1117
1304
|
}
|
|
1118
1305
|
|
|
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
|
+
}
|
|
1119
1313
|
export class DiscordAPIError extends Error {
|
|
1120
1314
|
private constructor(error: unknown, status: number, request: unknown);
|
|
1121
1315
|
private static flattenErrors(obj: unknown, key: string): string[];
|
|
1122
|
-
|
|
1316
|
+
public captcha?: Captcha;
|
|
1123
1317
|
public code: number;
|
|
1124
1318
|
public method: string;
|
|
1125
1319
|
public path: string;
|
|
1126
1320
|
public httpStatus: number;
|
|
1127
1321
|
public requestData: HTTPErrorData;
|
|
1128
1322
|
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;
|
|
1138
1323
|
}
|
|
1139
1324
|
|
|
1140
1325
|
export class DMChannel extends TextBasedChannelMixin(Channel, [
|
|
1326
|
+
'bulkDelete',
|
|
1141
1327
|
'fetchWebhooks',
|
|
1142
1328
|
'createWebhook',
|
|
1143
1329
|
'setRateLimitPerUser',
|
|
@@ -1147,16 +1333,19 @@ export class DMChannel extends TextBasedChannelMixin(Channel, [
|
|
|
1147
1333
|
public recipient: User;
|
|
1148
1334
|
public type: 'DM';
|
|
1149
1335
|
public flags: Readonly<ChannelFlags>;
|
|
1150
|
-
public messageRequest?: boolean;
|
|
1151
|
-
public messageRequestTimestamp?: number;
|
|
1152
1336
|
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>;
|
|
1157
1337
|
public readonly voiceAdapterCreator: InternalDiscordGatewayAdapterCreator;
|
|
1338
|
+
public call(options?: CallOptions): Promise<VoiceConnection>;
|
|
1339
|
+
public sync(): undefined;
|
|
1158
1340
|
public readonly shard: WebSocketShard;
|
|
1159
1341
|
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;
|
|
1160
1349
|
}
|
|
1161
1350
|
|
|
1162
1351
|
export class Emoji extends Base {
|
|
@@ -1180,17 +1369,17 @@ export class Guild extends AnonymousGuild {
|
|
|
1180
1369
|
private _sortedChannels(channel: NonThreadGuildBasedChannel): Collection<Snowflake, NonThreadGuildBasedChannel>;
|
|
1181
1370
|
|
|
1182
1371
|
public readonly afkChannel: VoiceChannel | null;
|
|
1372
|
+
public topEmojis(): Promise<Collection<number, Emoji>>;
|
|
1183
1373
|
public afkChannelId: Snowflake | null;
|
|
1184
1374
|
public afkTimeout: number;
|
|
1185
1375
|
public applicationId: Snowflake | null;
|
|
1186
|
-
public maxVideoChannelUsers: number | null;
|
|
1187
|
-
public maxStageVideoChannelUsers: number | null;
|
|
1188
1376
|
public approximateMemberCount: number | null;
|
|
1189
1377
|
public approximatePresenceCount: number | null;
|
|
1190
1378
|
public autoModerationRules: AutoModerationRuleManager;
|
|
1191
1379
|
public available: boolean;
|
|
1192
1380
|
public bans: GuildBanManager;
|
|
1193
1381
|
public channels: GuildChannelManager;
|
|
1382
|
+
// public commands: GuildApplicationCommandManager;
|
|
1194
1383
|
public defaultMessageNotifications: DefaultMessageNotificationLevel | number;
|
|
1195
1384
|
/** @deprecated This will be removed in the next major version, see https://github.com/discordjs/discord.js/issues/7091 */
|
|
1196
1385
|
public deleted: boolean;
|
|
@@ -1203,6 +1392,8 @@ export class Guild extends AnonymousGuild {
|
|
|
1203
1392
|
public large: boolean;
|
|
1204
1393
|
public maximumMembers: number | null;
|
|
1205
1394
|
public maximumPresences: number | null;
|
|
1395
|
+
public maxStageVideoChannelUsers: number | null;
|
|
1396
|
+
public maxVideoChannelUsers: number | null;
|
|
1206
1397
|
/** @deprecated Use {@link GuildMemberManager.me} instead. */
|
|
1207
1398
|
public readonly me: GuildMember | null;
|
|
1208
1399
|
public memberCount: number;
|
|
@@ -1210,9 +1401,11 @@ export class Guild extends AnonymousGuild {
|
|
|
1210
1401
|
public mfaLevel: MFALevel;
|
|
1211
1402
|
public ownerId: Snowflake;
|
|
1212
1403
|
public preferredLocale: string;
|
|
1404
|
+
public premiumSubscriptionCount: number | null;
|
|
1213
1405
|
public premiumProgressBarEnabled: boolean;
|
|
1214
1406
|
public premiumTier: PremiumTier;
|
|
1215
1407
|
public presences: PresenceManager;
|
|
1408
|
+
public readonly disableDM: boolean;
|
|
1216
1409
|
public readonly publicUpdatesChannel: TextChannel | null;
|
|
1217
1410
|
public publicUpdatesChannelId: Snowflake | null;
|
|
1218
1411
|
public roles: RoleManager;
|
|
@@ -1221,7 +1414,6 @@ export class Guild extends AnonymousGuild {
|
|
|
1221
1414
|
public readonly safetyAlertsChannel: TextChannel | null;
|
|
1222
1415
|
public safetyAlertsChannelId: Snowflake | null;
|
|
1223
1416
|
public scheduledEvents: GuildScheduledEventManager;
|
|
1224
|
-
public settings: GuildSettingManager;
|
|
1225
1417
|
public readonly shard: WebSocketShard;
|
|
1226
1418
|
public shardId: number;
|
|
1227
1419
|
public stageInstances: StageInstanceManager;
|
|
@@ -1237,7 +1429,8 @@ export class Guild extends AnonymousGuild {
|
|
|
1237
1429
|
public widgetEnabled: boolean | null;
|
|
1238
1430
|
public readonly maximumBitrate: number;
|
|
1239
1431
|
public createTemplate(name: string, description?: string): Promise<GuildTemplate>;
|
|
1240
|
-
public delete(): Promise<Guild>;
|
|
1432
|
+
public delete(mfaCode?: string): Promise<Guild>;
|
|
1433
|
+
public read(): Promise<undefined>;
|
|
1241
1434
|
public discoverySplashURL(options?: StaticImageURLOptions): string | null;
|
|
1242
1435
|
public edit(data: GuildEditData, reason?: string): Promise<Guild>;
|
|
1243
1436
|
public editWelcomeScreen(data: WelcomeScreenEditData): Promise<WelcomeScreen>;
|
|
@@ -1245,6 +1438,7 @@ export class Guild extends AnonymousGuild {
|
|
|
1245
1438
|
public fetchAuditLogs<T extends GuildAuditLogsResolvable = 'ALL'>(
|
|
1246
1439
|
options?: GuildAuditLogsFetchOptions<T>,
|
|
1247
1440
|
): Promise<GuildAuditLogs<T>>;
|
|
1441
|
+
public mute(mute: boolean, time: number | null): boolean;
|
|
1248
1442
|
public fetchIntegrations(): Promise<Collection<Snowflake | string, Integration>>;
|
|
1249
1443
|
public fetchOwner(options?: BaseFetchOptions): Promise<GuildMember>;
|
|
1250
1444
|
public fetchPreview(): Promise<GuildPreview>;
|
|
@@ -1254,8 +1448,8 @@ export class Guild extends AnonymousGuild {
|
|
|
1254
1448
|
public fetchWelcomeScreen(): Promise<WelcomeScreen>;
|
|
1255
1449
|
public fetchWidget(): Promise<Widget>;
|
|
1256
1450
|
public fetchWidgetSettings(): Promise<GuildWidgetSettings>;
|
|
1257
|
-
public leave(): Promise<Guild>;
|
|
1258
1451
|
public disableInvites(disabled?: boolean): Promise<Guild>;
|
|
1452
|
+
public leave(): Promise<Guild>;
|
|
1259
1453
|
public setAFKChannel(afkChannel: VoiceChannelResolvable | null, reason?: string): Promise<Guild>;
|
|
1260
1454
|
public setAFKTimeout(afkTimeout: number, reason?: string): Promise<Guild>;
|
|
1261
1455
|
public setBanner(banner: BufferResolvable | Base64Resolvable | null, reason?: string): Promise<Guild>;
|
|
@@ -1276,7 +1470,8 @@ export class Guild extends AnonymousGuild {
|
|
|
1276
1470
|
public setIcon(icon: BufferResolvable | Base64Resolvable | null, reason?: string): Promise<Guild>;
|
|
1277
1471
|
public setName(name: string, reason?: string): Promise<Guild>;
|
|
1278
1472
|
public setOwner(owner: GuildMemberResolvable, reason?: string): Promise<Guild>;
|
|
1279
|
-
public
|
|
1473
|
+
public setPosition(position: number, type: 'FOLDER' | 'HOME', folderID?: number): Promise<Guild>;
|
|
1474
|
+
public setPreferredLocale(preferredLocale: string, reason?: string): Promise<Guild>;
|
|
1280
1475
|
public setPublicUpdatesChannel(publicUpdatesChannel: TextChannelResolvable | null, reason?: string): Promise<Guild>;
|
|
1281
1476
|
/** @deprecated Use {@link RoleManager.setPositions} instead */
|
|
1282
1477
|
public setRolePositions(rolePositions: readonly RolePosition[]): Promise<Guild>;
|
|
@@ -1287,17 +1482,15 @@ export class Guild extends AnonymousGuild {
|
|
|
1287
1482
|
public setSystemChannelFlags(systemChannelFlags: SystemChannelFlagsResolvable, reason?: string): Promise<Guild>;
|
|
1288
1483
|
public setVerificationLevel(verificationLevel: VerificationLevel | number | null, reason?: string): Promise<Guild>;
|
|
1289
1484
|
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>;
|
|
1293
1485
|
public setCommunity(
|
|
1294
1486
|
stats: boolean,
|
|
1295
|
-
publicUpdatesChannel
|
|
1296
|
-
rulesChannel
|
|
1487
|
+
publicUpdatesChannel: TextChannelResolvable,
|
|
1488
|
+
rulesChannel: TextChannelResolvable,
|
|
1297
1489
|
reason?: string,
|
|
1298
|
-
): Promise<
|
|
1299
|
-
public
|
|
1300
|
-
public setVanityCode(code?: string): Promise<
|
|
1490
|
+
): Promise<Guild>;
|
|
1491
|
+
public setWidgetSettings(settings: GuildWidgetSettingsData, reason?: string): Promise<Guild>;
|
|
1492
|
+
public setVanityCode(code?: string): Promise<Vanity>;
|
|
1493
|
+
public toJSON(): unknown;
|
|
1301
1494
|
}
|
|
1302
1495
|
|
|
1303
1496
|
export class GuildAuditLogs<T extends GuildAuditLogsResolvable = 'ALL'> {
|
|
@@ -1348,6 +1541,8 @@ export class GuildAuditLogsEntry<
|
|
|
1348
1541
|
: Role | GuildEmoji | { id: Snowflake } | null;
|
|
1349
1542
|
public targetType: TTargetType;
|
|
1350
1543
|
public toJSON(): unknown;
|
|
1544
|
+
public addIntegration(applicationId: Snowflake): Promise<boolean>;
|
|
1545
|
+
public addBot(bot: UserResolvable | Snowflake, permissions?: PermissionResolvable): Promise<boolean>;
|
|
1351
1546
|
}
|
|
1352
1547
|
|
|
1353
1548
|
export class GuildBan extends Base {
|
|
@@ -1363,6 +1558,7 @@ export abstract class GuildChannel extends Channel {
|
|
|
1363
1558
|
public constructor(guild: Guild, data?: RawGuildChannelData, client?: Client, immediatePatch?: boolean);
|
|
1364
1559
|
private memberPermissions(member: GuildMember, checkAdmin: boolean): Readonly<Permissions>;
|
|
1365
1560
|
private rolePermissions(role: Role, checkAdmin: boolean): Readonly<Permissions>;
|
|
1561
|
+
|
|
1366
1562
|
public readonly createdAt: Date;
|
|
1367
1563
|
public readonly createdTimestamp: number;
|
|
1368
1564
|
public readonly calculatedPosition: number;
|
|
@@ -1413,6 +1609,14 @@ export class GuildEmoji extends BaseGuildEmoji {
|
|
|
1413
1609
|
public setName(name: string, reason?: string): Promise<GuildEmoji>;
|
|
1414
1610
|
}
|
|
1415
1611
|
|
|
1612
|
+
export interface UserBadge {
|
|
1613
|
+
name: string;
|
|
1614
|
+
description: string;
|
|
1615
|
+
icon: string;
|
|
1616
|
+
link?: string;
|
|
1617
|
+
iconURL(): string;
|
|
1618
|
+
}
|
|
1619
|
+
|
|
1416
1620
|
export class GuildMember extends PartialTextBasedChannel(Base) {
|
|
1417
1621
|
private constructor(client: Client, data: RawGuildMemberData, guild: Guild);
|
|
1418
1622
|
private _roles: Snowflake[];
|
|
@@ -1443,6 +1647,9 @@ export class GuildMember extends PartialTextBasedChannel(Base) {
|
|
|
1443
1647
|
public readonly roles: GuildMemberRoleManager;
|
|
1444
1648
|
public user: User;
|
|
1445
1649
|
public readonly voice: VoiceState;
|
|
1650
|
+
public themeColors?: [number, number];
|
|
1651
|
+
public readonly hexThemeColor: [string, string] | null;
|
|
1652
|
+
public badges: UserBadge[] | null;
|
|
1446
1653
|
public avatarURL(options?: ImageURLOptions): string | null;
|
|
1447
1654
|
public ban(options?: BanOptions): Promise<GuildMember>;
|
|
1448
1655
|
public disableCommunicationUntil(timeout: DateResolvable | null, reason?: string): Promise<GuildMember>;
|
|
@@ -1460,12 +1667,14 @@ export class GuildMember extends PartialTextBasedChannel(Base) {
|
|
|
1460
1667
|
public permissionsIn(channel: GuildChannelResolvable): Readonly<Permissions>;
|
|
1461
1668
|
public setNickname(nickname: string | null, reason?: string): Promise<GuildMember>;
|
|
1462
1669
|
public setFlags(flags: GuildMemberFlagsResolvable): Promise<GuildMember>;
|
|
1463
|
-
public toJSON(): unknown;
|
|
1464
|
-
public toString(): MemberMention;
|
|
1465
|
-
public valueOf(): string;
|
|
1466
1670
|
public setAvatar(avatar: BufferResolvable | Base64Resolvable | null): Promise<GuildMember>;
|
|
1467
1671
|
public setBanner(banner: BufferResolvable | Base64Resolvable | null): Promise<GuildMember>;
|
|
1468
1672
|
public setAboutMe(bio: string | null): Promise<GuildMember>;
|
|
1673
|
+
public getProfile(): Promise<User>;
|
|
1674
|
+
public toJSON(): unknown;
|
|
1675
|
+
public toString(): MemberMention;
|
|
1676
|
+
public valueOf(): string;
|
|
1677
|
+
public setThemeColors(primary?: ColorResolvable, accent?: ColorResolvable): GuildMember;
|
|
1469
1678
|
}
|
|
1470
1679
|
|
|
1471
1680
|
export class GuildMemberFlags extends BitField<GuildMemberFlagsString> {
|
|
@@ -1519,7 +1728,6 @@ export class GuildScheduledEvent<S extends GuildScheduledEventStatus = GuildSche
|
|
|
1519
1728
|
public readonly scheduledEndAt: Date | null;
|
|
1520
1729
|
public readonly channel: VoiceChannel | StageChannel | null;
|
|
1521
1730
|
public readonly guild: Guild | null;
|
|
1522
|
-
public readonly url: string;
|
|
1523
1731
|
public readonly image: string | null;
|
|
1524
1732
|
public coverImageURL(options?: StaticImageURLOptions): string | null;
|
|
1525
1733
|
public createInviteURL(options?: CreateGuildScheduledEventInviteURLOptions): Promise<string>;
|
|
@@ -1630,7 +1838,6 @@ export class IntegrationApplication extends Application {
|
|
|
1630
1838
|
export class Intents extends BitField<IntentsString> {
|
|
1631
1839
|
public static FLAGS: Record<IntentsString, number>;
|
|
1632
1840
|
public static resolve(bit?: BitFieldResolvable<IntentsString, number>): number;
|
|
1633
|
-
public static ALL: number;
|
|
1634
1841
|
}
|
|
1635
1842
|
|
|
1636
1843
|
export type CacheType = 'cached' | 'raw' | undefined;
|
|
@@ -1688,7 +1895,15 @@ export class Interaction<Cached extends CacheType = CacheType> extends Base {
|
|
|
1688
1895
|
public isMessageContextMenu(): this is MessageContextMenuInteraction<Cached>;
|
|
1689
1896
|
public isMessageComponent(): this is MessageComponentInteraction<Cached>;
|
|
1690
1897
|
public isModalSubmit(): this is ModalSubmitInteraction<Cached>;
|
|
1691
|
-
public
|
|
1898
|
+
public isAnySelectMenu(): this is SelectMenuInteraction<Cached>;
|
|
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>;
|
|
1692
1907
|
public isRepliable(): this is this & InteractionResponseFields<Cached>;
|
|
1693
1908
|
}
|
|
1694
1909
|
|
|
@@ -1728,8 +1943,8 @@ export class InteractionWebhook extends PartialWebhookMixin() {
|
|
|
1728
1943
|
|
|
1729
1944
|
export class Invite extends Base {
|
|
1730
1945
|
private constructor(client: Client, data: RawInviteData);
|
|
1731
|
-
public channel
|
|
1732
|
-
public channelId
|
|
1946
|
+
public channel: NonThreadGuildBasedChannel | PartialGroupDMChannel;
|
|
1947
|
+
public channelId: Snowflake;
|
|
1733
1948
|
public code: string;
|
|
1734
1949
|
public readonly deletable: boolean;
|
|
1735
1950
|
public readonly createdAt: Date | null;
|
|
@@ -1743,7 +1958,6 @@ export class Invite extends Base {
|
|
|
1743
1958
|
public maxUses: number | null;
|
|
1744
1959
|
public memberCount: number;
|
|
1745
1960
|
public presenceCount: number;
|
|
1746
|
-
public type: InviteType | null;
|
|
1747
1961
|
public targetApplication: IntegrationApplication | null;
|
|
1748
1962
|
public targetUser: User | null;
|
|
1749
1963
|
public targetType: InviteTargetType | null;
|
|
@@ -1753,10 +1967,10 @@ export class Invite extends Base {
|
|
|
1753
1967
|
public delete(reason?: string): Promise<Invite>;
|
|
1754
1968
|
public toJSON(): unknown;
|
|
1755
1969
|
public toString(): string;
|
|
1970
|
+
public acceptInvite(autoVerify?: boolean): Promise<Guild>;
|
|
1756
1971
|
public static INVITES_PATTERN: RegExp;
|
|
1757
1972
|
public stageInstance: InviteStageInstance | null;
|
|
1758
1973
|
public guildScheduledEvent: GuildScheduledEvent | null;
|
|
1759
|
-
public flags: Readonly<InviteFlags>;
|
|
1760
1974
|
}
|
|
1761
1975
|
|
|
1762
1976
|
export class InviteStageInstance extends Base {
|
|
@@ -1789,30 +2003,32 @@ export class LimitedCollection<K, V> extends Collection<K, V> {
|
|
|
1789
2003
|
public static filterByLifetime<K, V>(options?: LifetimeFilterOptions<K, V>): SweepFilter<K, V>;
|
|
1790
2004
|
}
|
|
1791
2005
|
|
|
1792
|
-
export type MessageCollectorOptionsParams<
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
componentType?: T;
|
|
1797
|
-
} & MessageComponentCollectorOptions<MappedInteractionTypes<Cached>[T]>;
|
|
2006
|
+
export type MessageCollectorOptionsParams<T extends MessageComponentTypeResolvable, Cached extends boolean = boolean> =
|
|
2007
|
+
| {
|
|
2008
|
+
componentType?: T;
|
|
2009
|
+
} & MessageComponentCollectorOptions<MappedInteractionTypes<Cached>[T]>;
|
|
1798
2010
|
|
|
1799
2011
|
export type MessageChannelCollectorOptionsParams<
|
|
1800
2012
|
T extends MessageComponentTypeResolvable,
|
|
1801
2013
|
Cached extends boolean = boolean,
|
|
1802
|
-
> =
|
|
1803
|
-
|
|
1804
|
-
|
|
2014
|
+
> =
|
|
2015
|
+
| {
|
|
2016
|
+
componentType?: T;
|
|
2017
|
+
} & MessageChannelComponentCollectorOptions<MappedInteractionTypes<Cached>[T]>;
|
|
1805
2018
|
|
|
1806
2019
|
export type AwaitMessageCollectorOptionsParams<
|
|
1807
2020
|
T extends MessageComponentTypeResolvable,
|
|
1808
2021
|
Cached extends boolean = boolean,
|
|
1809
|
-
> =
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
2022
|
+
> =
|
|
2023
|
+
| { componentType?: T } & Pick<
|
|
2024
|
+
InteractionCollectorOptions<MappedInteractionTypes<Cached>[T]>,
|
|
2025
|
+
keyof AwaitMessageComponentOptions<any>
|
|
2026
|
+
>;
|
|
1813
2027
|
|
|
1814
2028
|
export interface StringMappedInteractionTypes<Cached extends CacheType = CacheType> {
|
|
1815
2029
|
BUTTON: ButtonInteraction<Cached>;
|
|
2030
|
+
/** @deprecated */
|
|
2031
|
+
SELECT_MENU: SelectMenuInteraction<Cached>;
|
|
1816
2032
|
STRING_SELECT: SelectMenuInteraction<Cached>;
|
|
1817
2033
|
USER_SELECT: SelectMenuInteraction<Cached>;
|
|
1818
2034
|
ROLE_SELECT: SelectMenuInteraction<Cached>;
|
|
@@ -1827,6 +2043,8 @@ export type MappedInteractionTypes<Cached extends boolean = boolean> = EnumValue
|
|
|
1827
2043
|
typeof MessageComponentTypes,
|
|
1828
2044
|
{
|
|
1829
2045
|
BUTTON: ButtonInteraction<WrapBooleanCache<Cached>>;
|
|
2046
|
+
/** @deprecated */
|
|
2047
|
+
SELECT_MENU: StringSelectInteraction<WrapBooleanCache<Cached>>;
|
|
1830
2048
|
STRING_SELECT: StringSelectInteraction<WrapBooleanCache<Cached>>;
|
|
1831
2049
|
USER_SELECT: UserSelectInteraction<WrapBooleanCache<Cached>>;
|
|
1832
2050
|
ROLE_SELECT: RoleSelectInteraction<WrapBooleanCache<Cached>>;
|
|
@@ -1846,7 +2064,7 @@ export class Message<Cached extends boolean = boolean> extends Base {
|
|
|
1846
2064
|
public applicationId: Snowflake | null;
|
|
1847
2065
|
public attachments: Collection<Snowflake, MessageAttachment>;
|
|
1848
2066
|
public author: User;
|
|
1849
|
-
public
|
|
2067
|
+
public readonly bulkDeletable: boolean;
|
|
1850
2068
|
public readonly channel: If<Cached, GuildTextBasedChannel, TextBasedChannel>;
|
|
1851
2069
|
public channelId: Snowflake;
|
|
1852
2070
|
public readonly cleanContent: string;
|
|
@@ -1862,7 +2080,7 @@ export class Message<Cached extends boolean = boolean> extends Base {
|
|
|
1862
2080
|
public readonly editedAt: Date | null;
|
|
1863
2081
|
public editedTimestamp: number | null;
|
|
1864
2082
|
public embeds: MessageEmbed[];
|
|
1865
|
-
public groupActivityApplication:
|
|
2083
|
+
public groupActivityApplication: ClientApplication | null;
|
|
1866
2084
|
public guildId: If<Cached, Snowflake>;
|
|
1867
2085
|
public readonly guild: If<Cached, Guild>;
|
|
1868
2086
|
public readonly hasThread: boolean;
|
|
@@ -1885,8 +2103,14 @@ export class Message<Cached extends boolean = boolean> extends Base {
|
|
|
1885
2103
|
public flags: Readonly<MessageFlags>;
|
|
1886
2104
|
public reference: MessageReference | null;
|
|
1887
2105
|
public position: number | null;
|
|
2106
|
+
public awaitMessageComponent<T extends MessageComponentTypeResolvable = 'ACTION_ROW'>(
|
|
2107
|
+
options?: AwaitMessageCollectorOptionsParams<T, Cached>,
|
|
2108
|
+
): Promise<MappedInteractionTypes<Cached>[T]>;
|
|
1888
2109
|
public awaitReactions(options?: AwaitReactionsOptions): Promise<Collection<Snowflake | string, MessageReaction>>;
|
|
1889
2110
|
public createReactionCollector(options?: ReactionCollectorOptions): ReactionCollector;
|
|
2111
|
+
public createMessageComponentCollector<T extends MessageComponentTypeResolvable = 'ACTION_ROW'>(
|
|
2112
|
+
options?: MessageCollectorOptionsParams<T, Cached>,
|
|
2113
|
+
): InteractionCollector<MappedInteractionTypes<Cached>[T]>;
|
|
1890
2114
|
public delete(): Promise<Message>;
|
|
1891
2115
|
public edit(content: string | MessageEditOptions | MessagePayload): Promise<Message>;
|
|
1892
2116
|
public equals(message: Message, rawData: unknown): boolean;
|
|
@@ -1905,25 +2129,13 @@ export class Message<Cached extends boolean = boolean> extends Base {
|
|
|
1905
2129
|
public toString(): string;
|
|
1906
2130
|
public unpin(reason?: string): Promise<Message>;
|
|
1907
2131
|
public inGuild(): this is Message<true> & this;
|
|
1908
|
-
|
|
1909
|
-
public
|
|
1910
|
-
public
|
|
1911
|
-
public
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
): Promise<
|
|
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>;
|
|
2132
|
+
// Added
|
|
2133
|
+
public markUnread(): Promise<boolean>;
|
|
2134
|
+
public markRead(): Promise<boolean>;
|
|
2135
|
+
public clickButton(button?: MessageButton | MessageButtonLocation | string): Promise<InteractionResponse>;
|
|
2136
|
+
public selectMenu(menuID: MessageSelectMenu | Snowflake | number, options: any[]): Promise<InteractionResponse>;
|
|
2137
|
+
public selectMenu(options: any[]): Promise<InteractionResponse>;
|
|
2138
|
+
public contextMenu(botID: Snowflake, commandName: string): Promise<InteractionResponse>;
|
|
1927
2139
|
}
|
|
1928
2140
|
|
|
1929
2141
|
export class MessageActionRow<
|
|
@@ -1933,7 +2145,6 @@ export class MessageActionRow<
|
|
|
1933
2145
|
? APIActionRowComponent<APIModalActionRowComponent>
|
|
1934
2146
|
: APIActionRowComponent<APIMessageActionRowComponent>,
|
|
1935
2147
|
> extends BaseMessageComponent {
|
|
1936
|
-
// tslint:disable-next-line:ban-ts-ignore
|
|
1937
2148
|
// @ts-ignore (TS:2344, Caused by TypeScript 4.8)
|
|
1938
2149
|
// Fixed in DiscordJS >= 14.x / DiscordApiTypes >= 0.37.x, ignoring the type error here.
|
|
1939
2150
|
public constructor(data?: MessageActionRow<T> | MessageActionRowOptions<U> | V);
|
|
@@ -1953,7 +2164,6 @@ export class MessageAttachment {
|
|
|
1953
2164
|
public description: string | null;
|
|
1954
2165
|
public duration: number | null;
|
|
1955
2166
|
public ephemeral: boolean;
|
|
1956
|
-
public flags: Readonly<AttachmentFlags>;
|
|
1957
2167
|
public height: number | null;
|
|
1958
2168
|
public id: Snowflake;
|
|
1959
2169
|
public name: string | null;
|
|
@@ -1970,13 +2180,11 @@ export class MessageAttachment {
|
|
|
1970
2180
|
public toJSON(): unknown;
|
|
1971
2181
|
}
|
|
1972
2182
|
|
|
1973
|
-
export
|
|
1974
|
-
|
|
1975
|
-
|
|
2183
|
+
export interface InteractionResponseBody {
|
|
2184
|
+
id: Snowflake;
|
|
2185
|
+
nonce: Snowflake;
|
|
1976
2186
|
}
|
|
1977
2187
|
|
|
1978
|
-
export type AttachmentFlagsString = 'IS_REMIX';
|
|
1979
|
-
|
|
1980
2188
|
export class MessageButton extends BaseMessageComponent {
|
|
1981
2189
|
public constructor(data?: MessageButton | MessageButtonOptions | APIButtonComponent);
|
|
1982
2190
|
public customId: string | null;
|
|
@@ -1993,6 +2201,7 @@ export class MessageButton extends BaseMessageComponent {
|
|
|
1993
2201
|
public setStyle(style: MessageButtonStyleResolvable): this;
|
|
1994
2202
|
public setURL(url: string): this;
|
|
1995
2203
|
public toJSON(): APIButtonComponent;
|
|
2204
|
+
public click(message: Message): Promise<InteractionResponse>;
|
|
1996
2205
|
private static resolveStyle(style: MessageButtonStyleResolvable): MessageButtonStyle;
|
|
1997
2206
|
}
|
|
1998
2207
|
|
|
@@ -2105,22 +2314,6 @@ export class MessageEmbed {
|
|
|
2105
2314
|
public static normalizeFields(...fields: EmbedFieldData[] | EmbedFieldData[][]): Required<EmbedFieldData>[];
|
|
2106
2315
|
}
|
|
2107
2316
|
|
|
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
|
-
|
|
2124
2317
|
export class WebEmbed {
|
|
2125
2318
|
public constructor(data?: WebEmbedOptions);
|
|
2126
2319
|
public author: MessageEmbedAuthor | null;
|
|
@@ -2132,8 +2325,9 @@ export class WebEmbed {
|
|
|
2132
2325
|
public title: string | null;
|
|
2133
2326
|
public url: string | null;
|
|
2134
2327
|
public video: MessageEmbedVideo | null;
|
|
2328
|
+
public hidden: boolean;
|
|
2329
|
+
public shorten: boolean;
|
|
2135
2330
|
public imageType: 'thumbnail' | 'image';
|
|
2136
|
-
public redirect?: string;
|
|
2137
2331
|
public setAuthor(options: EmbedAuthorData | null): this;
|
|
2138
2332
|
public setColor(color: ColorResolvable): this;
|
|
2139
2333
|
public setDescription(description: string): this;
|
|
@@ -2143,33 +2337,7 @@ export class WebEmbed {
|
|
|
2143
2337
|
public setTitle(title: string): this;
|
|
2144
2338
|
public setURL(url: string): this;
|
|
2145
2339
|
public setProvider(options: MessageEmbedProvider | null): this;
|
|
2146
|
-
public
|
|
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>;
|
|
2340
|
+
public toMessage(): Promise<string>;
|
|
2173
2341
|
}
|
|
2174
2342
|
|
|
2175
2343
|
export class MessageFlags extends BitField<MessageFlagsString> {
|
|
@@ -2189,7 +2357,6 @@ export class MessageMentions {
|
|
|
2189
2357
|
private readonly _content: string;
|
|
2190
2358
|
private _members: Collection<Snowflake, GuildMember> | null;
|
|
2191
2359
|
private _parsedUsers: Collection<Snowflake, User> | null;
|
|
2192
|
-
|
|
2193
2360
|
public readonly channels: Collection<Snowflake, AnyChannel>;
|
|
2194
2361
|
public readonly client: Client;
|
|
2195
2362
|
public everyone: boolean;
|
|
@@ -2212,6 +2379,7 @@ export class MessageMentions {
|
|
|
2212
2379
|
export class MessagePayload {
|
|
2213
2380
|
public constructor(target: MessageTarget, options: MessageOptions | WebhookMessageOptions);
|
|
2214
2381
|
public data: RawMessagePayloadData | null;
|
|
2382
|
+
public readonly usingNewAttachmentAPI: boolean;
|
|
2215
2383
|
public readonly isUser: boolean;
|
|
2216
2384
|
public readonly isWebhook: boolean;
|
|
2217
2385
|
public readonly isMessage: boolean;
|
|
@@ -2239,14 +2407,14 @@ export class MessageReaction {
|
|
|
2239
2407
|
private constructor(client: Client, data: RawMessageReactionData, message: Message);
|
|
2240
2408
|
private _emoji: GuildEmoji | ReactionEmoji;
|
|
2241
2409
|
|
|
2242
|
-
public
|
|
2243
|
-
public readonly client: Client<true>;
|
|
2410
|
+
public readonly client: Client;
|
|
2244
2411
|
public count: number;
|
|
2245
2412
|
public burstCount: number;
|
|
2246
|
-
public
|
|
2413
|
+
public burstColors: string[];
|
|
2247
2414
|
public isBurst: boolean;
|
|
2248
2415
|
public readonly emoji: GuildEmoji | ReactionEmoji;
|
|
2249
2416
|
public me: boolean;
|
|
2417
|
+
public countDetails: ReactionCountDetailsData;
|
|
2250
2418
|
public message: Message | PartialMessage;
|
|
2251
2419
|
public readonly partial: false;
|
|
2252
2420
|
public users: ReactionUserManager;
|
|
@@ -2270,19 +2438,23 @@ export class MessageSelectMenu extends BaseMessageComponent {
|
|
|
2270
2438
|
public options: MessageSelectOption[];
|
|
2271
2439
|
public placeholder: string | null;
|
|
2272
2440
|
public type: SelectMenuComponentType;
|
|
2441
|
+
public addChannelTypes(...channelTypes: ChannelTypes[]): this;
|
|
2273
2442
|
public addOptions(...options: MessageSelectOptionData[] | MessageSelectOptionData[][]): this;
|
|
2274
2443
|
public setOptions(...options: MessageSelectOptionData[] | MessageSelectOptionData[][]): this;
|
|
2444
|
+
public setChannelTypes(...channelTypes: ChannelTypes[]): this;
|
|
2275
2445
|
public setCustomId(customId: string): this;
|
|
2276
2446
|
public setDisabled(disabled?: boolean): this;
|
|
2277
2447
|
public setMaxValues(maxValues: number): this;
|
|
2278
2448
|
public setMinValues(minValues: number): this;
|
|
2279
2449
|
public setPlaceholder(placeholder: string): this;
|
|
2450
|
+
public setType(type: SelectMenuComponentType | SelectMenuComponentTypes): this;
|
|
2280
2451
|
public spliceOptions(
|
|
2281
2452
|
index: number,
|
|
2282
2453
|
deleteCount: number,
|
|
2283
2454
|
...options: MessageSelectOptionData[] | MessageSelectOptionData[][]
|
|
2284
2455
|
): this;
|
|
2285
2456
|
public toJSON(): APISelectMenuComponent;
|
|
2457
|
+
public select(message: Message, values?: any[]): Promise<InteractionResponse>;
|
|
2286
2458
|
}
|
|
2287
2459
|
|
|
2288
2460
|
export class Modal {
|
|
@@ -2290,13 +2462,45 @@ export class Modal {
|
|
|
2290
2462
|
public components: MessageActionRow<ModalActionRowComponent>[];
|
|
2291
2463
|
public customId: string | null;
|
|
2292
2464
|
public title: string | null;
|
|
2293
|
-
public
|
|
2294
|
-
public
|
|
2295
|
-
public
|
|
2296
|
-
public readonly
|
|
2297
|
-
public
|
|
2298
|
-
|
|
2465
|
+
public application: object | null;
|
|
2466
|
+
public client: Client | null;
|
|
2467
|
+
public nonce: Snowflake | null;
|
|
2468
|
+
public readonly sendFromInteraction: InteractionResponse | null;
|
|
2469
|
+
public addComponents(
|
|
2470
|
+
...components: (
|
|
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;
|
|
2299
2491
|
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;
|
|
2300
2504
|
}
|
|
2301
2505
|
|
|
2302
2506
|
export class ModalSubmitFieldsResolver {
|
|
@@ -2359,37 +2563,45 @@ export class OAuth2Guild extends BaseGuild {
|
|
|
2359
2563
|
public permissions: Readonly<Permissions>;
|
|
2360
2564
|
}
|
|
2361
2565
|
|
|
2362
|
-
export class
|
|
2566
|
+
export class PartialGroupDMChannel extends TextBasedChannelMixin(Channel, [
|
|
2567
|
+
'bulkDelete',
|
|
2363
2568
|
'fetchWebhooks',
|
|
2364
2569
|
'createWebhook',
|
|
2365
2570
|
'setRateLimitPerUser',
|
|
2366
2571
|
'setNSFW',
|
|
2367
2572
|
]) {
|
|
2368
2573
|
private constructor(client: Client, data: RawPartialGroupDMChannelData);
|
|
2574
|
+
public type: 'GROUP_DM';
|
|
2369
2575
|
public name: string | null;
|
|
2370
2576
|
public icon: string | null;
|
|
2371
|
-
public flags: Readonly<ChannelFlags>;
|
|
2372
|
-
private _recipients: RawUserData[];
|
|
2373
|
-
public type: 'GROUP_DM';
|
|
2374
|
-
public ownerId: Snowflake;
|
|
2375
2577
|
public readonly recipients: Collection<Snowflake, User>;
|
|
2376
|
-
public
|
|
2578
|
+
public messages: MessageManager;
|
|
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>;
|
|
2377
2589
|
public iconURL(options?: StaticImageURLOptions): string | null;
|
|
2378
|
-
public
|
|
2379
|
-
public
|
|
2380
|
-
public
|
|
2381
|
-
public
|
|
2382
|
-
public setOwner(owner: UserResolvable): Promise<this>;
|
|
2383
|
-
public addUser(user: UserResolvable): Promise<this>;
|
|
2384
|
-
public removeUser(user: UserResolvable): Promise<this>;
|
|
2590
|
+
public addMember(user: User): Promise<PartialGroupDMChannel>;
|
|
2591
|
+
public removeMember(user: User): Promise<PartialGroupDMChannel>;
|
|
2592
|
+
public setName(name: string): Promise<PartialGroupDMChannel>;
|
|
2593
|
+
public setIcon(icon: Base64Resolvable | null): Promise<PartialGroupDMChannel>;
|
|
2385
2594
|
public getInvite(): Promise<Invite>;
|
|
2386
|
-
public
|
|
2387
|
-
public
|
|
2388
|
-
public
|
|
2389
|
-
public
|
|
2595
|
+
public fetchInvite(force: boolean): Promise<Invite>;
|
|
2596
|
+
public removeInvite(invite: Invite): Promise<PartialGroupDMChannel>;
|
|
2597
|
+
public delete(slient?: boolean): Promise<this>;
|
|
2598
|
+
public setOwner(user: UserResolvable): Promise<PartialGroupDMChannel>;
|
|
2390
2599
|
public readonly voiceAdapterCreator: InternalDiscordGatewayAdapterCreator;
|
|
2600
|
+
public call(options?: CallOptions): Promise<VoiceConnection>;
|
|
2601
|
+
public sync(): undefined;
|
|
2391
2602
|
public readonly shard: WebSocketShard;
|
|
2392
2603
|
public readonly voiceUsers: Collection<Snowflake, User>;
|
|
2604
|
+
public readonly voiceConnection?: VoiceConnection;
|
|
2393
2605
|
}
|
|
2394
2606
|
|
|
2395
2607
|
export class PermissionOverwrites extends Base {
|
|
@@ -2425,9 +2637,8 @@ export class Permissions extends BitField<PermissionString, bigint> {
|
|
|
2425
2637
|
|
|
2426
2638
|
export class Presence extends Base {
|
|
2427
2639
|
protected constructor(client: Client, data?: RawPresenceData);
|
|
2428
|
-
public activities:
|
|
2640
|
+
public activities: Activity[];
|
|
2429
2641
|
public clientStatus: ClientPresenceStatusData | null;
|
|
2430
|
-
public lastModified: number | null;
|
|
2431
2642
|
public guild: Guild | null;
|
|
2432
2643
|
public readonly member: GuildMember | null;
|
|
2433
2644
|
public status: PresenceStatus;
|
|
@@ -2491,7 +2702,6 @@ export class Role extends Base {
|
|
|
2491
2702
|
/** @deprecated This will be removed in the next major version, see https://github.com/discordjs/discord.js/issues/7091 */
|
|
2492
2703
|
public deleted: boolean;
|
|
2493
2704
|
public readonly editable: boolean;
|
|
2494
|
-
public flags: Readonly<RoleFlags>;
|
|
2495
2705
|
public guild: Guild;
|
|
2496
2706
|
public readonly hexColor: HexColorString;
|
|
2497
2707
|
public hoist: boolean;
|
|
@@ -2527,13 +2737,6 @@ export class Role extends Base {
|
|
|
2527
2737
|
public static comparePositions(role1: Role, role2: Role): number;
|
|
2528
2738
|
}
|
|
2529
2739
|
|
|
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
|
-
|
|
2537
2740
|
export class BaseSelectMenuInteraction<
|
|
2538
2741
|
Cached extends CacheType = CacheType,
|
|
2539
2742
|
> extends MessageComponentInteraction<Cached> {
|
|
@@ -2626,7 +2829,6 @@ export interface ShardEventTypes {
|
|
|
2626
2829
|
error: [error: Error];
|
|
2627
2830
|
message: [message: any];
|
|
2628
2831
|
}
|
|
2629
|
-
|
|
2630
2832
|
export class Shard extends EventEmitter {
|
|
2631
2833
|
private constructor(manager: ShardingManager, id: number);
|
|
2632
2834
|
private _evals: Map<string, Promise<unknown>>;
|
|
@@ -2730,11 +2932,6 @@ export class ShardingManager extends EventEmitter {
|
|
|
2730
2932
|
public once(event: 'shardCreate', listener: (shard: Shard) => Awaitable<void>): this;
|
|
2731
2933
|
}
|
|
2732
2934
|
|
|
2733
|
-
export interface FetchRecommendedShardsOptions {
|
|
2734
|
-
guildsPerShard?: number;
|
|
2735
|
-
multipleOf?: number;
|
|
2736
|
-
}
|
|
2737
|
-
|
|
2738
2935
|
export class SnowflakeUtil extends null {
|
|
2739
2936
|
private constructor();
|
|
2740
2937
|
public static deconstruct(snowflake: Snowflake): DeconstructedSnowflake;
|
|
@@ -2910,6 +3107,9 @@ export class Team extends Base {
|
|
|
2910
3107
|
public readonly createdTimestamp: number;
|
|
2911
3108
|
|
|
2912
3109
|
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>;
|
|
2913
3113
|
public toJSON(): unknown;
|
|
2914
3114
|
public toString(): string;
|
|
2915
3115
|
}
|
|
@@ -2931,58 +3131,6 @@ export class TextChannel extends BaseGuildTextChannel {
|
|
|
2931
3131
|
public type: 'GUILD_TEXT';
|
|
2932
3132
|
}
|
|
2933
3133
|
|
|
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
|
-
|
|
2986
3134
|
export class TextInputComponent extends BaseMessageComponent {
|
|
2987
3135
|
public constructor(data?: TextInputComponent | TextInputComponentOptions);
|
|
2988
3136
|
public customId: string | null;
|
|
@@ -2993,6 +3141,13 @@ export class TextInputComponent extends BaseMessageComponent {
|
|
|
2993
3141
|
public placeholder: string | null;
|
|
2994
3142
|
public style: TextInputStyle;
|
|
2995
3143
|
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;
|
|
2996
3151
|
public setValue(value: string): this;
|
|
2997
3152
|
public toJSON(): RawTextInputComponentData;
|
|
2998
3153
|
public static resolveStyle(style: TextInputStyleResolvable): TextInputStyle;
|
|
@@ -3001,6 +3156,7 @@ export class TextInputComponent extends BaseMessageComponent {
|
|
|
3001
3156
|
export class ThreadChannel extends TextBasedChannelMixin(Channel, ['fetchWebhooks', 'createWebhook', 'setNSFW']) {
|
|
3002
3157
|
private constructor(guild: Guild, data?: RawThreadChannelData, client?: Client);
|
|
3003
3158
|
public archived: boolean | null;
|
|
3159
|
+
public readonly firstMessage: Message | null;
|
|
3004
3160
|
public readonly archivedAt: Date | null;
|
|
3005
3161
|
public archiveTimestamp: number | null;
|
|
3006
3162
|
public readonly createdAt: Date | null;
|
|
@@ -3096,15 +3252,15 @@ export class Typing extends Base {
|
|
|
3096
3252
|
export class User extends PartialTextBasedChannel(Base) {
|
|
3097
3253
|
protected constructor(client: Client, data: RawUserData);
|
|
3098
3254
|
private _equals(user: APIUser): boolean;
|
|
3099
|
-
|
|
3255
|
+
public application: ClientApplication;
|
|
3100
3256
|
public accentColor: number | null | undefined;
|
|
3101
3257
|
public avatar: string | null;
|
|
3102
3258
|
public avatarDecoration: string | null;
|
|
3103
|
-
public avatarDecorationSKUId: Snowflake | null;
|
|
3104
3259
|
public banner: string | null | undefined;
|
|
3105
|
-
public bannerColor: string | null | undefined;
|
|
3106
3260
|
public bot: boolean;
|
|
3261
|
+
public pronouns: string | null;
|
|
3107
3262
|
public readonly createdAt: Date;
|
|
3263
|
+
public readonly relationships: RelationshipTypes;
|
|
3108
3264
|
public readonly createdTimestamp: number;
|
|
3109
3265
|
public discriminator: string;
|
|
3110
3266
|
public readonly displayName: string;
|
|
@@ -3112,16 +3268,22 @@ export class User extends PartialTextBasedChannel(Base) {
|
|
|
3112
3268
|
public readonly dmChannel: DMChannel | null;
|
|
3113
3269
|
public flags: Readonly<UserFlags> | null;
|
|
3114
3270
|
public globalName: string | null;
|
|
3271
|
+
public botInGuildsCount: number | null | undefined;
|
|
3115
3272
|
public readonly hexAccentColor: HexColorString | null | undefined;
|
|
3116
3273
|
public id: Snowflake;
|
|
3117
3274
|
public readonly partial: false;
|
|
3118
3275
|
public system: boolean;
|
|
3119
3276
|
public readonly tag: string;
|
|
3120
3277
|
public username: string;
|
|
3121
|
-
public readonly note: string |
|
|
3122
|
-
public readonly
|
|
3123
|
-
public
|
|
3124
|
-
public
|
|
3278
|
+
public readonly note: string | null;
|
|
3279
|
+
public readonly nickname: string | null;
|
|
3280
|
+
public connectedAccounts: object[];
|
|
3281
|
+
public premiumSince: Date;
|
|
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;
|
|
3125
3287
|
public avatarURL(options?: ImageURLOptions): string | null;
|
|
3126
3288
|
public avatarDecorationURL(options?: StaticImageURLOptions): string | null;
|
|
3127
3289
|
public bannerURL(options?: ImageURLOptions): string | null;
|
|
@@ -3131,12 +3293,18 @@ export class User extends PartialTextBasedChannel(Base) {
|
|
|
3131
3293
|
public equals(user: User): boolean;
|
|
3132
3294
|
public fetch(force?: boolean): Promise<User>;
|
|
3133
3295
|
public fetchFlags(force?: boolean): Promise<UserFlags>;
|
|
3134
|
-
public
|
|
3296
|
+
public setFriend(): Promise<User>;
|
|
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>;
|
|
3135
3304
|
public toString(): UserMention;
|
|
3136
|
-
public
|
|
3137
|
-
public
|
|
3138
|
-
public
|
|
3139
|
-
public deleteRelationship(): Promise<boolean>;
|
|
3305
|
+
public ring(): Promise<boolean>;
|
|
3306
|
+
public themeColors?: [number, number];
|
|
3307
|
+
public readonly hexThemeColor: [string, string] | null;
|
|
3140
3308
|
}
|
|
3141
3309
|
|
|
3142
3310
|
export class UserContextMenuInteraction<Cached extends CacheType = CacheType> extends ContextMenuInteraction<Cached> {
|
|
@@ -3179,7 +3347,6 @@ export class Util extends null {
|
|
|
3179
3347
|
public static escapeNumberedList(text: string): string;
|
|
3180
3348
|
public static escapeMaskedLink(text: string): string;
|
|
3181
3349
|
public static cleanCodeBlockContent(text: string): string;
|
|
3182
|
-
public static fetchRecommendedShards(token: string, options?: FetchRecommendedShardsOptions): Promise<number>;
|
|
3183
3350
|
public static flatten(obj: unknown, ...props: Record<string, boolean | string>[]): unknown;
|
|
3184
3351
|
public static makeError(obj: MakeErrorOptions): Error;
|
|
3185
3352
|
public static makePlainError(err: Error): MakeErrorOptions;
|
|
@@ -3208,21 +3375,7 @@ export class Formatters extends null {
|
|
|
3208
3375
|
public static blockQuote: typeof blockQuote;
|
|
3209
3376
|
public static bold: typeof bold;
|
|
3210
3377
|
public static channelMention: typeof channelMention;
|
|
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}>`;
|
|
3378
|
+
public static chatInputApplicationCommandMention: typeof chatInputApplicationCommandMention;
|
|
3226
3379
|
public static codeBlock: typeof codeBlock;
|
|
3227
3380
|
public static formatEmoji: typeof formatEmoji;
|
|
3228
3381
|
public static hideLinkEmbed: typeof hideLinkEmbed;
|
|
@@ -3261,13 +3414,12 @@ export class VoiceRegion {
|
|
|
3261
3414
|
|
|
3262
3415
|
export class VoiceState extends Base {
|
|
3263
3416
|
private constructor(guild: Guild, data: RawVoiceStateData);
|
|
3264
|
-
public readonly channel: VoiceBasedChannel |
|
|
3417
|
+
public readonly channel: VoiceBasedChannel | null;
|
|
3265
3418
|
public channelId: Snowflake | null;
|
|
3266
3419
|
public readonly deaf: boolean | null;
|
|
3267
3420
|
public guild: Guild;
|
|
3268
3421
|
public id: Snowflake;
|
|
3269
3422
|
public readonly member: GuildMember | null;
|
|
3270
|
-
public readonly user: User | null;
|
|
3271
3423
|
public readonly mute: boolean | null;
|
|
3272
3424
|
public selfDeaf: boolean | null;
|
|
3273
3425
|
public selfMute: boolean | null;
|
|
@@ -3278,16 +3430,14 @@ export class VoiceState extends Base {
|
|
|
3278
3430
|
public selfVideo: boolean | null;
|
|
3279
3431
|
public suppress: boolean;
|
|
3280
3432
|
public requestToSpeakTimestamp: number | null;
|
|
3281
|
-
|
|
3433
|
+
public readonly user: User | null;
|
|
3282
3434
|
public setDeaf(deaf?: boolean, reason?: string): Promise<GuildMember>;
|
|
3283
3435
|
public setMute(mute?: boolean, reason?: string): Promise<GuildMember>;
|
|
3284
3436
|
public disconnect(reason?: string): Promise<GuildMember>;
|
|
3285
3437
|
public setChannel(channel: GuildVoiceChannelResolvable | null, reason?: string): Promise<GuildMember>;
|
|
3286
3438
|
public setRequestToSpeak(request?: boolean): Promise<void>;
|
|
3287
3439
|
public setSuppressed(suppressed?: boolean): Promise<void>;
|
|
3288
|
-
public setStatus(status?: string): Promise<void>;
|
|
3289
3440
|
public getPreview(): Promise<string>;
|
|
3290
|
-
public postPreview(base64Image: string): Promise<void>;
|
|
3291
3441
|
}
|
|
3292
3442
|
|
|
3293
3443
|
export class Webhook extends WebhookMixin() {
|
|
@@ -3369,8 +3519,8 @@ export class WebSocketShard extends EventEmitter {
|
|
|
3369
3519
|
private constructor(manager: WebSocketManager, id: number);
|
|
3370
3520
|
private sequence: number;
|
|
3371
3521
|
private closeSequence: number;
|
|
3372
|
-
private resumeURL: string | null;
|
|
3373
3522
|
private sessionId: string | null;
|
|
3523
|
+
private resumeURL: string | null;
|
|
3374
3524
|
private lastPingTimestamp: number;
|
|
3375
3525
|
private lastHeartbeatAcked: boolean;
|
|
3376
3526
|
private ratelimit: { queue: unknown[]; total: number; remaining: number; time: 60e3; timer: NodeJS.Timeout | null };
|
|
@@ -3513,7 +3663,6 @@ export const Constants: {
|
|
|
3513
3663
|
size: AllowedImageSize,
|
|
3514
3664
|
dynamic: boolean,
|
|
3515
3665
|
): string;
|
|
3516
|
-
AvatarDecoration(userId: Snowflake, hash: string, format: AllowedImageFormat, size: AllowedImageSize): string;
|
|
3517
3666
|
Banner(id: Snowflake, hash: string, format: DynamicImageFormat, size: AllowedImageSize, dynamic: boolean): string;
|
|
3518
3667
|
DefaultAvatar(index: number): string;
|
|
3519
3668
|
DiscoverySplash(guildId: Snowflake, hash: string, format: AllowedImageFormat, size: AllowedImageSize): string;
|
|
@@ -3554,8 +3703,10 @@ export const Constants: {
|
|
|
3554
3703
|
GuildScheduledEventPrivacyLevels: EnumHolder<typeof GuildScheduledEventPrivacyLevels>;
|
|
3555
3704
|
GuildScheduledEventStatuses: EnumHolder<typeof GuildScheduledEventStatuses>;
|
|
3556
3705
|
IntegrationExpireBehaviors: IntegrationExpireBehaviors[];
|
|
3557
|
-
|
|
3558
|
-
|
|
3706
|
+
InteractionResponseTypes: EnumHolder<typeof InteractionResponseTypes>;
|
|
3707
|
+
InteractionTypes: EnumHolder<typeof InteractionTypes>;
|
|
3708
|
+
InviteScopes: InviteScope[];
|
|
3709
|
+
MaxBulkDeletableMessageAge: 1_209_600_000;
|
|
3559
3710
|
MembershipStates: EnumHolder<typeof MembershipStates>;
|
|
3560
3711
|
MessageButtonStyles: EnumHolder<typeof MessageButtonStyles>;
|
|
3561
3712
|
MessageComponentTypes: EnumHolder<typeof MessageComponentTypes>;
|
|
@@ -3596,7 +3747,6 @@ export const Constants: {
|
|
|
3596
3747
|
TextInputStyles: EnumHolder<typeof TextInputStyles>;
|
|
3597
3748
|
ThreadChannelTypes: ThreadChannelTypes[];
|
|
3598
3749
|
UserAgent: string;
|
|
3599
|
-
ciphers: string[];
|
|
3600
3750
|
VerificationLevels: EnumHolder<typeof VerificationLevels>;
|
|
3601
3751
|
VideoQualityModes: EnumHolder<typeof VideoQualityModes>;
|
|
3602
3752
|
VoiceBasedChannelTypes: VoiceBasedChannelTypes[];
|
|
@@ -3613,6 +3763,15 @@ export const Constants: {
|
|
|
3613
3763
|
WSEvents: {
|
|
3614
3764
|
[K in WSEventType]: K;
|
|
3615
3765
|
};
|
|
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;
|
|
3616
3775
|
};
|
|
3617
3776
|
|
|
3618
3777
|
export const version: string;
|
|
@@ -3638,7 +3797,7 @@ export abstract class DataManager<K, Holds, R> extends BaseManager {
|
|
|
3638
3797
|
}
|
|
3639
3798
|
|
|
3640
3799
|
export abstract class CachedManager<K, Holds, R> extends DataManager<K, Holds, R> {
|
|
3641
|
-
protected constructor(client: Client, holds: Constructable<Holds
|
|
3800
|
+
protected constructor(client: Client, holds: Constructable<Holds>);
|
|
3642
3801
|
private readonly _cache: Collection<K, Holds>;
|
|
3643
3802
|
private _add(data: unknown, cache?: boolean, { id, extras }?: { id: K; extras: unknown[] }): Holds;
|
|
3644
3803
|
}
|
|
@@ -3654,7 +3813,8 @@ export class ApplicationCommandManager<
|
|
|
3654
3813
|
PermissionsOptionsExtras = { guild: GuildResolvable },
|
|
3655
3814
|
PermissionsGuildType = null,
|
|
3656
3815
|
> extends CachedManager<Snowflake, ApplicationCommandScope, ApplicationCommandResolvable> {
|
|
3657
|
-
|
|
3816
|
+
// @ts-ignore
|
|
3817
|
+
protected constructor(client: Client, iterable?: Iterable<unknown>, user: User);
|
|
3658
3818
|
public permissions: ApplicationCommandPermissionsManager<
|
|
3659
3819
|
{ command?: ApplicationCommandResolvable } & PermissionsOptionsExtras,
|
|
3660
3820
|
{ command: ApplicationCommandResolvable } & PermissionsOptionsExtras,
|
|
@@ -3699,8 +3859,11 @@ export class ApplicationCommandPermissionsManager<
|
|
|
3699
3859
|
GuildType,
|
|
3700
3860
|
CommandIdType,
|
|
3701
3861
|
> extends BaseManager {
|
|
3702
|
-
private constructor(
|
|
3703
|
-
|
|
3862
|
+
private constructor(
|
|
3863
|
+
manager: ApplicationCommandManager | GuildApplicationCommandManager | ApplicationCommand,
|
|
3864
|
+
user: User,
|
|
3865
|
+
);
|
|
3866
|
+
private manager: ApplicationCommandManager | GuildApplicationCommandManager | ApplicationCommand;
|
|
3704
3867
|
|
|
3705
3868
|
public client: Client;
|
|
3706
3869
|
public commandId: CommandIdType;
|
|
@@ -3747,72 +3910,71 @@ export class BaseGuildEmojiManager extends CachedManager<Snowflake, GuildEmoji,
|
|
|
3747
3910
|
export class ChannelManager extends CachedManager<Snowflake, AnyChannel, ChannelResolvable> {
|
|
3748
3911
|
private constructor(client: Client, iterable: Iterable<RawChannelData>);
|
|
3749
3912
|
public fetch(id: Snowflake, options?: FetchChannelOptions): Promise<AnyChannel | null>;
|
|
3750
|
-
public createGroupDM(recipients: UserResolvable[]): Promise<
|
|
3913
|
+
public createGroupDM(recipients: UserResolvable[]): Promise<PartialGroupDMChannel>;
|
|
3751
3914
|
}
|
|
3752
3915
|
|
|
3753
|
-
export
|
|
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>;
|
|
3779
|
-
}
|
|
3916
|
+
export type FetchGuildApplicationCommandFetchOptions = Omit<FetchApplicationCommandOptions, 'guildId'>;
|
|
3780
3917
|
|
|
3781
|
-
export class
|
|
3782
|
-
constructor(client: Client
|
|
3783
|
-
public cache: Collection<
|
|
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>;
|
|
3918
|
+
export class GuildFolderManager extends BaseManager {
|
|
3919
|
+
private constructor(client: Client);
|
|
3920
|
+
public cache: Collection<number, GuildFolder>;
|
|
3787
3921
|
}
|
|
3788
3922
|
|
|
3789
|
-
export
|
|
3923
|
+
export interface RawGuildFolderData {
|
|
3924
|
+
id: number | null;
|
|
3925
|
+
name: string | null;
|
|
3926
|
+
guild_ids: Snowflake[];
|
|
3927
|
+
color: number | null;
|
|
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;
|
|
3938
|
+
}
|
|
3790
3939
|
|
|
3791
3940
|
export class ClientUserSettingManager extends BaseManager {
|
|
3792
3941
|
private constructor(client: Client);
|
|
3793
|
-
public
|
|
3794
|
-
public locale
|
|
3795
|
-
public activityDisplay
|
|
3796
|
-
public
|
|
3797
|
-
public displayImage
|
|
3798
|
-
public linkedImageDisplay
|
|
3799
|
-
public autoplayGIF
|
|
3800
|
-
public previewLink
|
|
3801
|
-
public
|
|
3802
|
-
public allowTTS
|
|
3803
|
-
public compactMode
|
|
3804
|
-
public convertEmoticons
|
|
3805
|
-
public DMScanLevel
|
|
3806
|
-
public theme
|
|
3807
|
-
public developerMode
|
|
3808
|
-
public afkTimeout
|
|
3809
|
-
public stickerAnimationMode
|
|
3810
|
-
public showEmojiReactions
|
|
3811
|
-
public
|
|
3812
|
-
|
|
3942
|
+
public rawSetting: RawUserSettingsData | object;
|
|
3943
|
+
public locale: localeSetting | null;
|
|
3944
|
+
public activityDisplay: boolean | null;
|
|
3945
|
+
public DMfromServerMode: boolean | null;
|
|
3946
|
+
public displayImage: boolean | null;
|
|
3947
|
+
public linkedImageDisplay: boolean | null;
|
|
3948
|
+
public autoplayGIF: boolean | null;
|
|
3949
|
+
public previewLink: boolean | null;
|
|
3950
|
+
public animatedEmojis: boolean | null;
|
|
3951
|
+
public allowTTS: boolean | null;
|
|
3952
|
+
public compactMode: boolean | null;
|
|
3953
|
+
public convertEmoticons: boolean | null;
|
|
3954
|
+
public DMScanLevel: DMScanLevel;
|
|
3955
|
+
public theme: 'dark' | 'light' | null;
|
|
3956
|
+
public developerMode: boolean | null;
|
|
3957
|
+
public afkTimeout: number | null; // second
|
|
3958
|
+
public stickerAnimationMode: stickerAnimationMode;
|
|
3959
|
+
public showEmojiReactions: boolean | null;
|
|
3960
|
+
public customStatus:
|
|
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>;
|
|
3813
3973
|
public edit(data: Partial<RawUserSettingsData>): Promise<this>;
|
|
3814
|
-
public
|
|
3815
|
-
public setTheme(value
|
|
3974
|
+
public setDisplayCompactMode(value?: boolean): Promise<this>;
|
|
3975
|
+
public setTheme(value?: 'dark' | 'light'): Promise<this>;
|
|
3976
|
+
public setLocale(value: localeSetting): Promise<this>;
|
|
3977
|
+
// @ts-ignore
|
|
3816
3978
|
public setCustomStatus(value?: CustomStatusOption | CustomStatus): Promise<this>;
|
|
3817
3979
|
public restrictedGuilds(status: boolean): Promise<void>;
|
|
3818
3980
|
public addRestrictedGuild(guildId: GuildResolvable): Promise<void>;
|
|
@@ -3820,8 +3982,8 @@ export class ClientUserSettingManager extends BaseManager {
|
|
|
3820
3982
|
}
|
|
3821
3983
|
|
|
3822
3984
|
export class GuildSettingManager extends BaseManager {
|
|
3823
|
-
private constructor(
|
|
3824
|
-
public
|
|
3985
|
+
private constructor(client: Client, guildId: Snowflake);
|
|
3986
|
+
public rawSetting?: RawGuildSettingsData;
|
|
3825
3987
|
public suppressEveryone?: boolean;
|
|
3826
3988
|
public suppressRoles?: boolean;
|
|
3827
3989
|
public muteScheduledEvents?: boolean;
|
|
@@ -3839,81 +4001,22 @@ export class GuildSettingManager extends BaseManager {
|
|
|
3839
4001
|
public edit(data: Partial<RawGuildSettingsData>): Promise<this>;
|
|
3840
4002
|
}
|
|
3841
4003
|
|
|
3842
|
-
export
|
|
3843
|
-
|
|
3844
|
-
|
|
3845
|
-
|
|
3846
|
-
|
|
3847
|
-
|
|
3848
|
-
|
|
3849
|
-
|
|
3850
|
-
|
|
3851
|
-
|
|
3852
|
-
|
|
3853
|
-
|
|
3854
|
-
|
|
3855
|
-
|
|
3856
|
-
|
|
3857
|
-
|
|
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;
|
|
4004
|
+
export class GuildApplicationCommandManager extends ApplicationCommandManager<ApplicationCommand, {}, Guild> {
|
|
4005
|
+
private constructor(guild: Guild, iterable?: Iterable<RawApplicationCommandData>);
|
|
4006
|
+
public guild: Guild;
|
|
4007
|
+
public create(command: ApplicationCommandDataResolvable): Promise<ApplicationCommand>;
|
|
4008
|
+
public delete(command: ApplicationCommandResolvable): Promise<ApplicationCommand | null>;
|
|
4009
|
+
public edit(
|
|
4010
|
+
command: ApplicationCommandResolvable,
|
|
4011
|
+
data: Partial<ApplicationCommandDataResolvable>,
|
|
4012
|
+
): Promise<ApplicationCommand>;
|
|
4013
|
+
public fetch(id: Snowflake, options?: FetchGuildApplicationCommandFetchOptions): Promise<ApplicationCommand>;
|
|
4014
|
+
public fetch(options: FetchGuildApplicationCommandFetchOptions): Promise<Collection<Snowflake, ApplicationCommand>>;
|
|
4015
|
+
public fetch(
|
|
4016
|
+
id?: undefined,
|
|
4017
|
+
options?: FetchGuildApplicationCommandFetchOptions,
|
|
4018
|
+
): Promise<Collection<Snowflake, ApplicationCommand>>;
|
|
4019
|
+
public set(commands: ApplicationCommandDataResolvable[]): Promise<Collection<Snowflake, ApplicationCommand>>;
|
|
3917
4020
|
}
|
|
3918
4021
|
|
|
3919
4022
|
export type MappedGuildChannelTypes = EnumValueMapped<
|
|
@@ -4004,35 +4107,49 @@ export class GuildManager extends CachedManager<Snowflake, Guild, GuildResolvabl
|
|
|
4004
4107
|
public fetch(options?: FetchGuildsOptions): Promise<Collection<Snowflake, OAuth2Guild>>;
|
|
4005
4108
|
}
|
|
4006
4109
|
|
|
4110
|
+
export interface BruteforceOptions {
|
|
4111
|
+
limit?: number;
|
|
4112
|
+
delay?: number;
|
|
4113
|
+
depth?: number;
|
|
4114
|
+
}
|
|
4115
|
+
|
|
4007
4116
|
export class GuildMemberManager extends CachedManager<Snowflake, GuildMember, GuildMemberResolvable> {
|
|
4008
4117
|
private constructor(guild: Guild, iterable?: Iterable<RawGuildMemberData>);
|
|
4009
4118
|
public guild: Guild;
|
|
4010
|
-
public
|
|
4119
|
+
public readonly me: GuildMember | null;
|
|
4011
4120
|
public add(
|
|
4012
4121
|
user: UserResolvable,
|
|
4013
4122
|
options: AddGuildMemberOptions & { fetchWhenExisting: false },
|
|
4014
4123
|
): Promise<GuildMember | null>;
|
|
4015
4124
|
public add(user: UserResolvable, options: AddGuildMemberOptions): Promise<GuildMember>;
|
|
4016
|
-
public addRole(user: UserResolvable, role: RoleResolvable, reason?: string): Promise<GuildMember | User | Snowflake>;
|
|
4017
4125
|
public ban(user: UserResolvable, options?: BanOptions): Promise<GuildMember | User | Snowflake>;
|
|
4018
4126
|
public edit(user: UserResolvable, data: GuildMemberEditData, reason?: string): Promise<GuildMember>;
|
|
4019
4127
|
public fetch(
|
|
4020
4128
|
options: UserResolvable | FetchMemberOptions | (FetchMembersOptions & { user: UserResolvable }),
|
|
4021
4129
|
): Promise<GuildMember>;
|
|
4022
4130
|
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>>;
|
|
4023
4140
|
public fetchMe(options?: BaseFetchOptions): Promise<GuildMember>;
|
|
4024
4141
|
public kick(user: UserResolvable, reason?: string): Promise<GuildMember | User | Snowflake>;
|
|
4025
4142
|
public list(options?: GuildListMembersOptions): Promise<Collection<Snowflake, GuildMember>>;
|
|
4026
4143
|
public prune(options: GuildPruneMembersOptions & { dry?: false; count: false }): Promise<null>;
|
|
4027
4144
|
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>;
|
|
4028
4148
|
public removeRole(
|
|
4029
4149
|
user: UserResolvable,
|
|
4030
4150
|
role: RoleResolvable,
|
|
4031
4151
|
reason?: string,
|
|
4032
4152
|
): 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>>;
|
|
4036
4153
|
}
|
|
4037
4154
|
|
|
4038
4155
|
export class GuildBanManager extends CachedManager<Snowflake, GuildBan, GuildBanResolvable> {
|
|
@@ -4133,6 +4250,26 @@ export class MessageManager extends CachedManager<Snowflake, Message, MessageRes
|
|
|
4133
4250
|
public search(options: MessageSearchOptions): Promise<MessageSearchResult>;
|
|
4134
4251
|
}
|
|
4135
4252
|
|
|
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
|
+
|
|
4136
4273
|
export interface MessageSearchOptions {
|
|
4137
4274
|
authors: UserResolvable[];
|
|
4138
4275
|
content: string;
|
|
@@ -4213,7 +4350,6 @@ export class RoleManager extends CachedManager<Snowflake, Role, RoleResolvable>
|
|
|
4213
4350
|
public edit(role: RoleResolvable, options: RoleData, reason?: string): Promise<Role>;
|
|
4214
4351
|
public delete(role: RoleResolvable, reason?: string): Promise<void>;
|
|
4215
4352
|
public setPosition(role: RoleResolvable, position: number, options?: SetRolePositionOptions): Promise<Role>;
|
|
4216
|
-
public setPositions(rolePositions: readonly RolePosition[]): Promise<Guild>;
|
|
4217
4353
|
public comparePositions(role1: RoleResolvable, role2: RoleResolvable): number;
|
|
4218
4354
|
}
|
|
4219
4355
|
|
|
@@ -4235,18 +4371,10 @@ export class ThreadManager extends CachedManager<Snowflake, ThreadChannel, Threa
|
|
|
4235
4371
|
public fetchActive(cache?: boolean, options?: FetchChannelThreadsOptions): Promise<FetchedThreads>;
|
|
4236
4372
|
}
|
|
4237
4373
|
|
|
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
|
-
|
|
4246
4374
|
export class ThreadMemberManager extends CachedManager<Snowflake, ThreadMember, ThreadMemberResolvable> {
|
|
4247
4375
|
private constructor(thread: ThreadChannel, iterable?: Iterable<RawThreadMemberData>);
|
|
4248
4376
|
public thread: ThreadChannel;
|
|
4249
|
-
public
|
|
4377
|
+
public readonly me: ThreadMember | null;
|
|
4250
4378
|
public add(member: UserResolvable | '@me', reason?: string): Promise<Snowflake>;
|
|
4251
4379
|
public fetch(options?: FetchThreadMembersWithoutGuildMemberDataOptions): Promise<Collection<Snowflake, ThreadMember>>;
|
|
4252
4380
|
public fetch(member: ThreadMember<true>, options?: FetchMemberOptions): Promise<ThreadMember<true>>;
|
|
@@ -4258,19 +4386,8 @@ export class ThreadMemberManager extends CachedManager<Snowflake, ThreadMember,
|
|
|
4258
4386
|
options: FetchThreadMembersWithGuildMemberDataOptions,
|
|
4259
4387
|
): Promise<Collection<Snowflake, ThreadMember<true>>>;
|
|
4260
4388
|
public fetch(member: UserResolvable, options?: FetchThreadMemberOptions): Promise<ThreadMember>;
|
|
4261
|
-
|
|
4262
|
-
|
|
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
|
-
|
|
4389
|
+
/** @deprecated Use `fetch(member, options)` instead. */
|
|
4390
|
+
public fetch(cache: boolean, options?: FetchMembersOptions): Promise<Collection<Snowflake, ThreadMember>>;
|
|
4274
4391
|
public fetchMe(options?: BaseFetchOptions): Promise<ThreadMember>;
|
|
4275
4392
|
public remove(id: Snowflake | '@me', reason?: string): Promise<Snowflake>;
|
|
4276
4393
|
}
|
|
@@ -4280,11 +4397,30 @@ export class UserManager extends CachedManager<Snowflake, User, UserResolvable>
|
|
|
4280
4397
|
private dmChannel(userId: Snowflake): DMChannel | null;
|
|
4281
4398
|
public createDM(user: UserResolvable, options?: BaseFetchOptions): Promise<DMChannel>;
|
|
4282
4399
|
public deleteDM(user: UserResolvable): Promise<DMChannel>;
|
|
4283
|
-
public fetch(user: UserResolvable, options?: BaseFetchOptions): Promise<User>;
|
|
4400
|
+
public fetch(user: UserResolvable, options?: BaseFetchOptions & { guildId?: Snowflake }): Promise<User>;
|
|
4284
4401
|
public fetchFlags(user: UserResolvable, options?: BaseFetchOptions): Promise<UserFlags>;
|
|
4285
4402
|
public send(user: UserResolvable, options: string | MessagePayload | MessageOptions): Promise<Message>;
|
|
4286
4403
|
}
|
|
4287
4404
|
|
|
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
|
+
|
|
4288
4424
|
export class VoiceStateManager extends CachedManager<Snowflake, VoiceState, typeof VoiceState> {
|
|
4289
4425
|
private constructor(guild: Guild, iterable?: Iterable<RawVoiceStateData>);
|
|
4290
4426
|
public guild: Guild;
|
|
@@ -4315,14 +4451,26 @@ export interface TextBasedChannelFields extends PartialTextBasedChannelFields {
|
|
|
4315
4451
|
lastPinTimestamp: number | null;
|
|
4316
4452
|
readonly lastPinAt: Date | null;
|
|
4317
4453
|
messages: MessageManager;
|
|
4454
|
+
interactions: InteractionManager;
|
|
4455
|
+
awaitMessageComponent<T extends MessageComponentTypeResolvable = 'ACTION_ROW'>(
|
|
4456
|
+
options?: AwaitMessageCollectorOptionsParams<T, true>,
|
|
4457
|
+
): Promise<MappedInteractionTypes[T]>;
|
|
4318
4458
|
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]>;
|
|
4319
4466
|
createMessageCollector(options?: MessageCollectorOptions): MessageCollector;
|
|
4320
4467
|
createWebhook(name: string, options?: ChannelWebhookCreateOptions): Promise<Webhook>;
|
|
4321
4468
|
setRateLimitPerUser(rateLimitPerUser: number, reason?: string): Promise<this>;
|
|
4322
4469
|
setNSFW(nsfw?: boolean, reason?: string): Promise<this>;
|
|
4323
4470
|
fetchWebhooks(): Promise<Collection<Snowflake, Webhook>>;
|
|
4324
4471
|
sendTyping(): Promise<void>;
|
|
4325
|
-
sendSlash(
|
|
4472
|
+
sendSlash(bot: UserResolvable, commandName: string, ...args: any): Promise<InteractionResponse>;
|
|
4473
|
+
searchInteraction(applicationId: Snowflake, type?: ApplicationCommandTypes): Promise<object>;
|
|
4326
4474
|
}
|
|
4327
4475
|
|
|
4328
4476
|
export function PartialWebhookMixin<T>(Base?: Constructable<T>): Constructable<T & PartialWebhookFields>;
|
|
@@ -4355,6 +4503,9 @@ export interface WebhookFields extends PartialWebhookFields {
|
|
|
4355
4503
|
//#endregion
|
|
4356
4504
|
|
|
4357
4505
|
//#region Typedefs
|
|
4506
|
+
export type PurchasedFlagsString = 'NITRO_CLASSIC' | 'NITRO' | 'GUILD_BOOST';
|
|
4507
|
+
|
|
4508
|
+
export type PremiumUsageFlagsString = 'PREMIUM_DISCRIMINATOR' | 'ANIMATED_AVATAR' | 'PROFILE_BANNER';
|
|
4358
4509
|
|
|
4359
4510
|
export type ActivityFlagsString =
|
|
4360
4511
|
| 'INSTANCE'
|
|
@@ -4367,19 +4518,12 @@ export type ActivityFlagsString =
|
|
|
4367
4518
|
| 'PARTY_PRIVACY_VOICE_CHANNEL'
|
|
4368
4519
|
| 'EMBEDDED';
|
|
4369
4520
|
|
|
4370
|
-
export type
|
|
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'>;
|
|
4521
|
+
export type ActivitiesOptions = Omit<ActivityOptions | CustomStatus | RichPresence | SpotifyRPC, 'shardId'>;
|
|
4377
4522
|
|
|
4378
4523
|
export interface ActivityOptions {
|
|
4379
|
-
name
|
|
4380
|
-
state?: string;
|
|
4524
|
+
name?: string;
|
|
4381
4525
|
url?: string;
|
|
4382
|
-
type?:
|
|
4526
|
+
type?: ExcludeEnum<typeof ActivityTypes, 'CUSTOM'>;
|
|
4383
4527
|
shardId?: number | readonly number[];
|
|
4384
4528
|
}
|
|
4385
4529
|
|
|
@@ -4411,7 +4555,6 @@ export interface ClientApplicationInstallParams {
|
|
|
4411
4555
|
scopes: InviteScope[];
|
|
4412
4556
|
permissions: Readonly<Permissions>;
|
|
4413
4557
|
}
|
|
4414
|
-
|
|
4415
4558
|
export interface APIErrors {
|
|
4416
4559
|
UNKNOWN_ACCOUNT: 10001;
|
|
4417
4560
|
UNKNOWN_APPLICATION: 10002;
|
|
@@ -4469,6 +4612,7 @@ export interface APIErrors {
|
|
|
4469
4612
|
MAXIMUM_PINS: 30003;
|
|
4470
4613
|
MAXIMUM_RECIPIENTS: 30004;
|
|
4471
4614
|
MAXIMUM_ROLES: 30005;
|
|
4615
|
+
MAXIMUM_USERNAMES: 30006;
|
|
4472
4616
|
MAXIMUM_WEBHOOKS: 30007;
|
|
4473
4617
|
MAXIMUM_EMOJIS: 30008;
|
|
4474
4618
|
MAXIMUM_REACTIONS: 30010;
|
|
@@ -4511,6 +4655,7 @@ export interface APIErrors {
|
|
|
4511
4655
|
INVALID_AUTHENTICATION_TOKEN: 50014;
|
|
4512
4656
|
NOTE_TOO_LONG: 50015;
|
|
4513
4657
|
INVALID_BULK_DELETE_QUANTITY: 50016;
|
|
4658
|
+
INVALID_MFA_LEVEL: 50017;
|
|
4514
4659
|
CANNOT_PIN_MESSAGE_IN_OTHER_CHANNEL: 50019;
|
|
4515
4660
|
INVALID_OR_TAKEN_INVITE_CODE: 50020;
|
|
4516
4661
|
CANNOT_EXECUTE_ON_SYSTEM_MESSAGE: 50021;
|
|
@@ -4526,6 +4671,7 @@ export interface APIErrors {
|
|
|
4526
4671
|
INVALID_API_VERSION: 50041;
|
|
4527
4672
|
FILE_UPLOADED_EXCEEDS_MAXIMUM_SIZE: 50045;
|
|
4528
4673
|
INVALID_FILE_UPLOADED: 50046;
|
|
4674
|
+
GIFT_CODE_CLAIMED: 50050;
|
|
4529
4675
|
CANNOT_SELF_REDEEM_GIFT: 50054;
|
|
4530
4676
|
INVALID_GUILD: 50055;
|
|
4531
4677
|
INVALID_MESSAGE_TYPE: 50068;
|
|
@@ -4547,6 +4693,7 @@ export interface APIErrors {
|
|
|
4547
4693
|
YOU_CANNOT_SEND_VOICE_MESSAGES_IN_THIS_CHANNEL: 50173;
|
|
4548
4694
|
CANNOT_CONVERT_PREMIUM_EMOJI_TO_NORMAL_EMOJI: 50145;
|
|
4549
4695
|
TWO_FACTOR_REQUIRED: 60003;
|
|
4696
|
+
INVALID_TWO_FACTOR_CODE: 60008;
|
|
4550
4697
|
NO_USERS_WITH_DISCORDTAG_EXIST: 80004;
|
|
4551
4698
|
REACTION_BLOCKED: 90001;
|
|
4552
4699
|
RESOURCE_OVERLOADED: 130000;
|
|
@@ -4581,12 +4728,375 @@ export interface ApplicationAsset {
|
|
|
4581
4728
|
type: 'BIG' | 'SMALL';
|
|
4582
4729
|
}
|
|
4583
4730
|
|
|
4584
|
-
export interface
|
|
4585
|
-
|
|
4586
|
-
|
|
4587
|
-
/** @deprecated
|
|
4588
|
-
|
|
4589
|
-
|
|
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
|
+
export interface BaseApplicationCommandData {
|
|
5095
|
+
name: string;
|
|
5096
|
+
nameLocalizations?: LocalizationMap;
|
|
5097
|
+
/** @deprecated Use {@link defaultMemberPermissions} and {@link dmPermission} instead. */
|
|
5098
|
+
defaultPermission?: boolean;
|
|
5099
|
+
defaultMemberPermissions?: PermissionResolvable | null;
|
|
4590
5100
|
dmPermission?: boolean;
|
|
4591
5101
|
}
|
|
4592
5102
|
|
|
@@ -4875,7 +5385,16 @@ export type ApplicationCommandPermissionType = keyof typeof ApplicationCommandPe
|
|
|
4875
5385
|
export type ApplicationCommandResolvable = ApplicationCommand | Snowflake;
|
|
4876
5386
|
|
|
4877
5387
|
export type ApplicationFlagsString =
|
|
5388
|
+
| 'EMBEDDED_RELEASED'
|
|
5389
|
+
| 'MANAGED_EMOJI'
|
|
5390
|
+
| 'EMBEDDED_IAP'
|
|
5391
|
+
| 'GROUP_DM_CREATE'
|
|
5392
|
+
| 'RPC_PRIVATE_BETA'
|
|
4878
5393
|
| 'APPLICATION_AUTO_MODERATION_RULE_CREATE_BADGE'
|
|
5394
|
+
| 'ALLOW_ASSETS'
|
|
5395
|
+
| 'ALLOW_ACTIVITY_ACTION_SPECTATE'
|
|
5396
|
+
| 'ALLOW_ACTIVITY_ACTION_JOIN_REQUEST'
|
|
5397
|
+
| 'RPC_HAS_CONNECTED'
|
|
4879
5398
|
| 'GATEWAY_PRESENCE'
|
|
4880
5399
|
| 'GATEWAY_PRESENCE_LIMITED'
|
|
4881
5400
|
| 'GATEWAY_GUILD_MEMBERS'
|
|
@@ -4884,7 +5403,10 @@ export type ApplicationFlagsString =
|
|
|
4884
5403
|
| 'EMBEDDED'
|
|
4885
5404
|
| 'GATEWAY_MESSAGE_CONTENT'
|
|
4886
5405
|
| 'GATEWAY_MESSAGE_CONTENT_LIMITED'
|
|
4887
|
-
| '
|
|
5406
|
+
| 'EMBEDDED_FIRST_PARTY'
|
|
5407
|
+
| 'APPLICATION_COMMAND_BADGE'
|
|
5408
|
+
| 'ACTIVE'
|
|
5409
|
+
| 'IFRAME_MODAL';
|
|
4888
5410
|
|
|
4889
5411
|
export interface ApplicationRoleConnectionMetadataEditOptions {
|
|
4890
5412
|
name: string;
|
|
@@ -5047,6 +5569,7 @@ export type CacheWithLimitsOptions = {
|
|
|
5047
5569
|
? LimitedCollectionOptions<K, V> | number
|
|
5048
5570
|
: never;
|
|
5049
5571
|
};
|
|
5572
|
+
|
|
5050
5573
|
export interface CategoryCreateChannelOptions {
|
|
5051
5574
|
permissionOverwrites?: OverwriteResolvable[] | Collection<Snowflake, OverwriteResolvable>;
|
|
5052
5575
|
topic?: string;
|
|
@@ -5071,7 +5594,6 @@ export interface CategoryCreateChannelOptions {
|
|
|
5071
5594
|
defaultReactionEmoji?: DefaultReactionEmoji;
|
|
5072
5595
|
defaultSortOrder?: SortOrderType;
|
|
5073
5596
|
defaultForumLayout?: ForumLayoutType;
|
|
5074
|
-
defaultThreadRateLimitPerUser?: number;
|
|
5075
5597
|
reason?: string;
|
|
5076
5598
|
}
|
|
5077
5599
|
|
|
@@ -5120,178 +5642,24 @@ export interface ChannelPosition {
|
|
|
5120
5642
|
position?: number;
|
|
5121
5643
|
}
|
|
5122
5644
|
|
|
5123
|
-
export type GuildTextChannelResolvable = TextChannel | NewsChannel | Snowflake;
|
|
5124
|
-
export type ChannelResolvable = AnyChannel | Snowflake;
|
|
5125
|
-
|
|
5126
|
-
export interface ChannelWebhookCreateOptions {
|
|
5127
|
-
avatar?: BufferResolvable | Base64Resolvable | null;
|
|
5128
|
-
reason?: string;
|
|
5129
|
-
}
|
|
5130
|
-
|
|
5131
|
-
export interface BaseClientEvents {
|
|
5132
|
-
apiResponse: [request: APIRequest, response: Response];
|
|
5133
|
-
apiRequest: [request: APIRequest];
|
|
5134
|
-
debug: [message: string];
|
|
5135
|
-
rateLimit: [rateLimitData: RateLimitData];
|
|
5136
|
-
invalidRequestWarning: [invalidRequestWarningData: InvalidRequestWarningData];
|
|
5137
|
-
}
|
|
5138
|
-
|
|
5139
|
-
export interface
|
|
5140
|
-
|
|
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
|
-
|
|
5263
|
-
export interface ClientFetchInviteOptions {
|
|
5264
|
-
guildScheduledEventId?: Snowflake;
|
|
5265
|
-
}
|
|
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>);
|
|
5645
|
+
export type GuildTextChannelResolvable = TextChannel | NewsChannel | Snowflake;
|
|
5646
|
+
export type ChannelResolvable = AnyChannel | Snowflake;
|
|
5647
|
+
|
|
5648
|
+
export interface ChannelWebhookCreateOptions {
|
|
5649
|
+
avatar?: BufferResolvable | Base64Resolvable | null;
|
|
5650
|
+
reason?: string;
|
|
5651
|
+
}
|
|
5652
|
+
|
|
5653
|
+
export interface BaseClientEvents {
|
|
5654
|
+
apiResponse: [request: APIRequest, response: Response];
|
|
5655
|
+
apiRequest: [request: APIRequest];
|
|
5656
|
+
debug: [message: string];
|
|
5657
|
+
rateLimit: [rateLimitData: RateLimitData];
|
|
5658
|
+
invalidRequestWarning: [invalidRequestWarningData: InvalidRequestWarningData];
|
|
5659
|
+
}
|
|
5660
|
+
|
|
5661
|
+
export interface ClientFetchInviteOptions {
|
|
5662
|
+
guildScheduledEventId?: Snowflake;
|
|
5295
5663
|
}
|
|
5296
5664
|
|
|
5297
5665
|
export type ClientPresenceStatus = 'online' | 'idle' | 'dnd';
|
|
@@ -5306,7 +5674,7 @@ export interface ClientUserEditData {
|
|
|
5306
5674
|
username?: string;
|
|
5307
5675
|
avatar?: BufferResolvable | Base64Resolvable | null;
|
|
5308
5676
|
banner?: BufferResolvable | Base64Resolvable | null;
|
|
5309
|
-
bio?: string;
|
|
5677
|
+
bio?: string | null;
|
|
5310
5678
|
}
|
|
5311
5679
|
|
|
5312
5680
|
export interface CloseEvent {
|
|
@@ -5440,107 +5808,6 @@ export interface ConstantsColors {
|
|
|
5440
5808
|
NOT_QUITE_BLACK: 0x23272a;
|
|
5441
5809
|
}
|
|
5442
5810
|
|
|
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
|
-
|
|
5544
5811
|
export interface ConstantsOpcodes {
|
|
5545
5812
|
DISPATCH: 0;
|
|
5546
5813
|
HEARTBEAT: 1;
|
|
@@ -5554,31 +5821,6 @@ export interface ConstantsOpcodes {
|
|
|
5554
5821
|
INVALID_SESSION: 9;
|
|
5555
5822
|
HELLO: 10;
|
|
5556
5823
|
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;
|
|
5582
5824
|
}
|
|
5583
5825
|
|
|
5584
5826
|
export interface ConstantsShardEvents {
|
|
@@ -5703,7 +5945,7 @@ export type ExplicitContentFilterLevel = keyof typeof ExplicitContentFilterLevel
|
|
|
5703
5945
|
|
|
5704
5946
|
export interface FetchApplicationCommandOptions extends BaseFetchOptions {
|
|
5705
5947
|
guildId?: Snowflake;
|
|
5706
|
-
locale?:
|
|
5948
|
+
locale?: localeSetting;
|
|
5707
5949
|
withLocalizations?: boolean;
|
|
5708
5950
|
}
|
|
5709
5951
|
|
|
@@ -5799,7 +6041,6 @@ export interface FetchReactionUsersOptions {
|
|
|
5799
6041
|
export interface FetchThreadMemberOptions extends BaseFetchOptions {
|
|
5800
6042
|
withMember?: boolean;
|
|
5801
6043
|
}
|
|
5802
|
-
|
|
5803
6044
|
export interface FetchThreadMembersWithGuildMemberDataOptions {
|
|
5804
6045
|
withMember: true;
|
|
5805
6046
|
after?: Snowflake;
|
|
@@ -5808,7 +6049,7 @@ export interface FetchThreadMembersWithGuildMemberDataOptions {
|
|
|
5808
6049
|
}
|
|
5809
6050
|
|
|
5810
6051
|
export interface FetchThreadMembersWithoutGuildMemberDataOptions {
|
|
5811
|
-
withMember
|
|
6052
|
+
withMember: false;
|
|
5812
6053
|
cache?: boolean;
|
|
5813
6054
|
}
|
|
5814
6055
|
|
|
@@ -6098,12 +6339,6 @@ export interface GuildEditData {
|
|
|
6098
6339
|
features?: GuildFeatures[];
|
|
6099
6340
|
}
|
|
6100
6341
|
|
|
6101
|
-
export interface GroupDMChannelEditData {
|
|
6102
|
-
name?: string;
|
|
6103
|
-
icon?: BufferResolvable | Base64Resolvable | null;
|
|
6104
|
-
owner?: UserResolvable;
|
|
6105
|
-
}
|
|
6106
|
-
|
|
6107
6342
|
export interface GuildEmojiCreateOptions {
|
|
6108
6343
|
roles?: Collection<Snowflake, Role> | RoleResolvable[];
|
|
6109
6344
|
reason?: string;
|
|
@@ -6129,6 +6364,7 @@ export type GuildFeatures =
|
|
|
6129
6364
|
| 'ANIMATED_ICON'
|
|
6130
6365
|
| 'AUTO_MODERATION'
|
|
6131
6366
|
| 'BANNER'
|
|
6367
|
+
| 'CLYDE_ENABLED'
|
|
6132
6368
|
| 'COMMERCE'
|
|
6133
6369
|
| 'COMMUNITY'
|
|
6134
6370
|
| 'CREATOR_MONETIZABLE_PROVISIONAL'
|
|
@@ -6150,8 +6386,8 @@ export type GuildFeatures =
|
|
|
6150
6386
|
| 'THREE_DAY_THREAD_ARCHIVE'
|
|
6151
6387
|
| 'SEVEN_DAY_THREAD_ARCHIVE'
|
|
6152
6388
|
| 'PRIVATE_THREADS'
|
|
6153
|
-
| 'ROLE_ICONS'
|
|
6154
6389
|
| 'RAID_ALERTS_DISABLED'
|
|
6390
|
+
| 'ROLE_ICONS'
|
|
6155
6391
|
| 'ROLE_SUBSCRIPTIONS_AVAILABLE_FOR_PURCHASE'
|
|
6156
6392
|
| 'ROLE_SUBSCRIPTIONS_ENABLED';
|
|
6157
6393
|
|
|
@@ -6281,7 +6517,6 @@ export interface HTTPAttachmentData {
|
|
|
6281
6517
|
export interface HTTPErrorData {
|
|
6282
6518
|
json: unknown;
|
|
6283
6519
|
files: HTTPAttachmentData[];
|
|
6284
|
-
headers?: Record<string, string>;
|
|
6285
6520
|
}
|
|
6286
6521
|
|
|
6287
6522
|
export interface HTTPOptions {
|
|
@@ -6357,6 +6592,13 @@ export type IntentsString =
|
|
|
6357
6592
|
| 'AUTO_MODERATION_CONFIGURATION'
|
|
6358
6593
|
| 'AUTO_MODERATION_EXECUTION';
|
|
6359
6594
|
|
|
6595
|
+
export interface InviteGenerationOptions {
|
|
6596
|
+
permissions?: PermissionResolvable;
|
|
6597
|
+
guild?: GuildResolvable;
|
|
6598
|
+
disableGuildSelect?: boolean;
|
|
6599
|
+
scopes: InviteScope[];
|
|
6600
|
+
}
|
|
6601
|
+
|
|
6360
6602
|
export type GuildInvitableChannelResolvable =
|
|
6361
6603
|
| TextChannel
|
|
6362
6604
|
| VoiceChannel
|
|
@@ -6392,8 +6634,7 @@ export type InviteScope =
|
|
|
6392
6634
|
| 'guilds'
|
|
6393
6635
|
| 'guilds.join'
|
|
6394
6636
|
| 'gdm.join'
|
|
6395
|
-
| 'webhook.incoming'
|
|
6396
|
-
| 'role_connections.write';
|
|
6637
|
+
| 'webhook.incoming';
|
|
6397
6638
|
|
|
6398
6639
|
export interface LifetimeFilterOptions<K, V> {
|
|
6399
6640
|
excludeFromSweep?: (value: V, key: K, collection: LimitedCollection<K, V>) => boolean;
|
|
@@ -6445,7 +6686,6 @@ export interface MessageActivity {
|
|
|
6445
6686
|
}
|
|
6446
6687
|
|
|
6447
6688
|
export interface BaseButtonOptions extends BaseMessageComponentOptions {
|
|
6448
|
-
type: 'BUTTON' | MessageComponentTypes.BUTTON;
|
|
6449
6689
|
disabled?: boolean;
|
|
6450
6690
|
emoji?: EmojiIdentifierResolvable;
|
|
6451
6691
|
label?: string;
|
|
@@ -6492,16 +6732,35 @@ export type MessageComponentType = keyof typeof MessageComponentTypes;
|
|
|
6492
6732
|
|
|
6493
6733
|
export type MessageComponentTypeResolvable = MessageComponentType | MessageComponentTypes;
|
|
6494
6734
|
|
|
6495
|
-
export type GuildForumThreadMessageCreateOptions = MessageOptions & Pick<MessageOptions, 'flags' | 'stickers'>;
|
|
6496
|
-
|
|
6497
6735
|
export interface MessageEditOptions {
|
|
6498
6736
|
attachments?: MessageAttachment[];
|
|
6499
6737
|
content?: string | null;
|
|
6500
|
-
|
|
6501
|
-
|
|
6502
|
-
|
|
6503
|
-
|
|
6504
|
-
|
|
6738
|
+
id?: Snowflake | number;
|
|
6739
|
+
parentId?: Snowflake | number;
|
|
6740
|
+
type?: ExcludeEnum<
|
|
6741
|
+
typeof ChannelTypes,
|
|
6742
|
+
| 'DM'
|
|
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;
|
|
6505
6764
|
}
|
|
6506
6765
|
|
|
6507
6766
|
export interface MessageEmbedAuthor {
|
|
@@ -6604,14 +6863,15 @@ export interface MessageOptions {
|
|
|
6604
6863
|
tts?: boolean;
|
|
6605
6864
|
nonce?: string | number;
|
|
6606
6865
|
content?: string | null;
|
|
6607
|
-
embeds?: (MessageEmbed | MessageEmbedOptions | APIEmbed)[];
|
|
6866
|
+
embeds?: (WebEmbed | MessageEmbed | MessageEmbedOptions | APIEmbed)[];
|
|
6608
6867
|
components?: (MessageActionRow | (Required<BaseMessageComponentOptions> & MessageActionRowOptions))[];
|
|
6609
6868
|
allowedMentions?: MessageMentionOptions;
|
|
6610
6869
|
files?: (FileOptions | BufferResolvable | Stream | MessageAttachment)[];
|
|
6611
6870
|
reply?: ReplyOptions;
|
|
6612
6871
|
stickers?: StickerResolvable[];
|
|
6613
6872
|
attachments?: MessageAttachment[];
|
|
6614
|
-
flags?: BitFieldResolvable<'SUPPRESS_EMBEDS' | 'SUPPRESS_NOTIFICATIONS'
|
|
6873
|
+
flags?: BitFieldResolvable<'SUPPRESS_EMBEDS' | 'SUPPRESS_NOTIFICATIONS', number>;
|
|
6874
|
+
usingNewAttachmentAPI?: boolean;
|
|
6615
6875
|
}
|
|
6616
6876
|
|
|
6617
6877
|
export type MessageReactionResolvable = MessageReaction | Snowflake | string;
|
|
@@ -6632,9 +6892,12 @@ export interface BaseMessageSelectMenuOptions {
|
|
|
6632
6892
|
minValues?: number;
|
|
6633
6893
|
placeholder?: string;
|
|
6634
6894
|
}
|
|
6635
|
-
|
|
6636
6895
|
export interface StringMessageSelectMenuOptions extends BaseMessageSelectMenuOptions {
|
|
6637
|
-
type?:
|
|
6896
|
+
type?:
|
|
6897
|
+
| 'STRING_SELECT'
|
|
6898
|
+
| 'SELECT_MENU'
|
|
6899
|
+
| SelectMenuComponentTypes.STRING_SELECT
|
|
6900
|
+
| SelectMenuComponentTypes.SELECT_MENU;
|
|
6638
6901
|
options?: MessageSelectOptionData[];
|
|
6639
6902
|
}
|
|
6640
6903
|
|
|
@@ -6787,9 +7050,7 @@ export type PermissionString =
|
|
|
6787
7050
|
| 'MANAGE_EVENTS'
|
|
6788
7051
|
| 'VIEW_CREATOR_MONETIZATION_ANALYTICS'
|
|
6789
7052
|
| 'USE_SOUNDBOARD'
|
|
6790
|
-
| 'SEND_VOICE_MESSAGES'
|
|
6791
|
-
| 'USE_CLYDE_AI'
|
|
6792
|
-
| 'SET_VOICE_CHANNEL_STATUS';
|
|
7053
|
+
| 'SEND_VOICE_MESSAGES';
|
|
6793
7054
|
|
|
6794
7055
|
export type RecursiveArray<T> = ReadonlyArray<T | RecursiveArray<T>>;
|
|
6795
7056
|
|
|
@@ -6804,7 +7065,7 @@ export type PremiumTier = keyof typeof PremiumTiers;
|
|
|
6804
7065
|
export interface PresenceData {
|
|
6805
7066
|
status?: PresenceStatusData;
|
|
6806
7067
|
afk?: boolean;
|
|
6807
|
-
activities?:
|
|
7068
|
+
activities?: ActivitiesOptions[];
|
|
6808
7069
|
shardId?: number | number[];
|
|
6809
7070
|
}
|
|
6810
7071
|
|
|
@@ -6834,9 +7095,6 @@ export interface PartialChannelData {
|
|
|
6834
7095
|
videoQualityMode?: VideoQualityMode;
|
|
6835
7096
|
permissionOverwrites?: PartialOverwriteData[];
|
|
6836
7097
|
rateLimitPerUser?: number;
|
|
6837
|
-
availableTags?: GuildForumTagData[];
|
|
6838
|
-
defaultReactionEmoji?: DefaultReactionEmoji;
|
|
6839
|
-
defaultThreadRateLimitPerUser?: number;
|
|
6840
7098
|
}
|
|
6841
7099
|
|
|
6842
7100
|
export type Partialize<
|
|
@@ -6997,6 +7255,11 @@ export interface StartThreadOptions {
|
|
|
6997
7255
|
rateLimitPerUser?: number;
|
|
6998
7256
|
}
|
|
6999
7257
|
|
|
7258
|
+
export interface MessageButtonLocation {
|
|
7259
|
+
row: number;
|
|
7260
|
+
col: number;
|
|
7261
|
+
}
|
|
7262
|
+
|
|
7000
7263
|
export type Status = number;
|
|
7001
7264
|
|
|
7002
7265
|
export type StickerFormatType = keyof typeof StickerFormatTypes;
|
|
@@ -7015,10 +7278,6 @@ export type SystemChannelFlagsString =
|
|
|
7015
7278
|
|
|
7016
7279
|
export type SystemChannelFlagsResolvable = BitFieldResolvable<SystemChannelFlagsString, number>;
|
|
7017
7280
|
|
|
7018
|
-
export type ChannelFlagsResolvable = BitFieldResolvable<ChannelFlagsString, number>;
|
|
7019
|
-
|
|
7020
|
-
export type SelectMenuComponentType = keyof typeof SelectMenuComponentTypes;
|
|
7021
|
-
|
|
7022
7281
|
export type SystemMessageType = Exclude<
|
|
7023
7282
|
MessageType,
|
|
7024
7283
|
'DEFAULT' | 'REPLY' | 'APPLICATION_COMMAND' | 'CONTEXT_MENU_COMMAND'
|
|
@@ -7093,9 +7352,13 @@ export type AnyChannel =
|
|
|
7093
7352
|
| TextChannel
|
|
7094
7353
|
| ThreadChannel
|
|
7095
7354
|
| VoiceChannel
|
|
7096
|
-
| ForumChannel
|
|
7355
|
+
| ForumChannel
|
|
7356
|
+
| PartialGroupDMChannel;
|
|
7097
7357
|
|
|
7098
|
-
export type TextBasedChannel = Exclude<
|
|
7358
|
+
export type TextBasedChannel = Exclude<
|
|
7359
|
+
Extract<AnyChannel, { messages: MessageManager; interactions: InteractionManager }>,
|
|
7360
|
+
ForumChannel
|
|
7361
|
+
>;
|
|
7099
7362
|
|
|
7100
7363
|
export type TextBasedChannelTypes = TextBasedChannel['type'];
|
|
7101
7364
|
|
|
@@ -7143,11 +7406,6 @@ export interface GuildTextThreadCreateOptions<AllowedThreadType> extends StartTh
|
|
|
7143
7406
|
rateLimitPerUser?: number;
|
|
7144
7407
|
}
|
|
7145
7408
|
|
|
7146
|
-
export interface GuildForumThreadCreateOptions extends StartThreadOptions {
|
|
7147
|
-
message: GuildForumThreadMessageCreateOptions | MessagePayload;
|
|
7148
|
-
appliedTags?: Snowflake[];
|
|
7149
|
-
}
|
|
7150
|
-
|
|
7151
7409
|
export interface ThreadEditData {
|
|
7152
7410
|
name?: string;
|
|
7153
7411
|
archived?: boolean;
|
|
@@ -7168,17 +7426,38 @@ export type UserFlagsString =
|
|
|
7168
7426
|
| 'PARTNERED_SERVER_OWNER'
|
|
7169
7427
|
| 'HYPESQUAD_EVENTS'
|
|
7170
7428
|
| 'BUGHUNTER_LEVEL_1'
|
|
7429
|
+
| 'MFA_SMS'
|
|
7430
|
+
| 'PREMIUM_PROMO_DISMISSED'
|
|
7171
7431
|
| 'HOUSE_BRAVERY'
|
|
7172
7432
|
| 'HOUSE_BRILLIANCE'
|
|
7173
7433
|
| 'HOUSE_BALANCE'
|
|
7174
7434
|
| 'EARLY_SUPPORTER'
|
|
7175
7435
|
| 'TEAM_USER'
|
|
7436
|
+
| 'INTERNAL_APPLICATION'
|
|
7437
|
+
| 'SYSTEM'
|
|
7438
|
+
| 'HAS_UNREAD_URGENT_MESSAGES'
|
|
7176
7439
|
| 'BUGHUNTER_LEVEL_2'
|
|
7440
|
+
| 'UNDERAGE_DELETED'
|
|
7177
7441
|
| 'VERIFIED_BOT'
|
|
7178
7442
|
| 'EARLY_VERIFIED_BOT_DEVELOPER'
|
|
7179
7443
|
| 'DISCORD_CERTIFIED_MODERATOR'
|
|
7180
7444
|
| 'BOT_HTTP_INTERACTIONS'
|
|
7181
|
-
| '
|
|
7445
|
+
| 'SPAMMER'
|
|
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';
|
|
7182
7461
|
|
|
7183
7462
|
export type UserMention = `<@${Snowflake}>`;
|
|
7184
7463
|
|
|
@@ -7208,15 +7487,6 @@ export interface WebhookClientDataURL {
|
|
|
7208
7487
|
url: string;
|
|
7209
7488
|
}
|
|
7210
7489
|
|
|
7211
|
-
export type FriendRequestOptions =
|
|
7212
|
-
| {
|
|
7213
|
-
user: UserResolvable;
|
|
7214
|
-
}
|
|
7215
|
-
| {
|
|
7216
|
-
username: string;
|
|
7217
|
-
discriminator: number | null;
|
|
7218
|
-
};
|
|
7219
|
-
|
|
7220
7490
|
export type WebhookClientOptions = Pick<
|
|
7221
7491
|
ClientOptions,
|
|
7222
7492
|
'allowedMentions' | 'restTimeOffset' | 'restRequestTimeout' | 'retryLimit' | 'http'
|
|
@@ -7232,6 +7502,7 @@ export type WebhookEditMessageOptions = Pick<
|
|
|
7232
7502
|
WebhookMessageOptions,
|
|
7233
7503
|
'content' | 'embeds' | 'files' | 'allowedMentions' | 'components' | 'attachments' | 'threadId'
|
|
7234
7504
|
>;
|
|
7505
|
+
|
|
7235
7506
|
export interface InteractionEditReplyOptions extends WebhookEditMessageOptions {
|
|
7236
7507
|
message?: MessageResolvable | '@original';
|
|
7237
7508
|
}
|
|
@@ -7251,7 +7522,6 @@ export interface WebhookMessageOptions extends Omit<MessageOptions, 'reply' | 's
|
|
|
7251
7522
|
export type WebhookType = keyof typeof WebhookTypes;
|
|
7252
7523
|
|
|
7253
7524
|
export interface WebSocketOptions {
|
|
7254
|
-
agent?: Omit<AgentOptions, 'keepAlive'>;
|
|
7255
7525
|
compress?: boolean;
|
|
7256
7526
|
properties?: WebSocketProperties;
|
|
7257
7527
|
}
|
|
@@ -7293,10 +7563,11 @@ export interface WelcomeScreenEditData {
|
|
|
7293
7563
|
export type WSEventType =
|
|
7294
7564
|
| 'READY'
|
|
7295
7565
|
| 'RESUMED'
|
|
7566
|
+
| 'APPLICATION_COMMAND_AUTOCOMPLETE_RESPONSE'
|
|
7296
7567
|
| 'APPLICATION_COMMAND_CREATE'
|
|
7297
7568
|
| 'APPLICATION_COMMAND_DELETE'
|
|
7298
|
-
| 'APPLICATION_COMMAND_PERMISSIONS_UPDATE'
|
|
7299
7569
|
| 'APPLICATION_COMMAND_UPDATE'
|
|
7570
|
+
| 'APPLICATION_COMMAND_PERMISSIONS_UPDATE'
|
|
7300
7571
|
| 'AUTO_MODERATION_ACTION_EXECUTION'
|
|
7301
7572
|
| 'AUTO_MODERATION_RULE_CREATE'
|
|
7302
7573
|
| 'AUTO_MODERATION_RULE_DELETE'
|
|
@@ -7387,4 +7658,85 @@ export type InternalDiscordGatewayAdapterCreator = (
|
|
|
7387
7658
|
methods: InternalDiscordGatewayAdapterLibraryMethods,
|
|
7388
7659
|
) => InternalDiscordGatewayAdapterImplementerMethods;
|
|
7389
7660
|
|
|
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
|
+
|
|
7390
7742
|
//#endregion
|