rockcord 4.0.0-dev.5 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -3
- package/package.json +15 -12
- package/src/client/Client.js +3 -3
- package/src/client/WebhookClient.js +1 -1
- package/src/client/actions/VoiceStateUpdate.js +2 -2
- package/src/client/voice/VoiceConnection.js +2 -2
- package/src/client/voice/dispatcher/AudioDispatcher.js +1 -1
- package/src/client/voice/dispatcher/BaseDispatcher.js +37 -12
- package/src/client/voice/dispatcher/VideoDispatcher.js +83 -0
- package/src/client/voice/networking/CongestionControl.js +84 -0
- package/src/client/voice/networking/DAVE.js +26 -1
- package/src/client/voice/networking/MediaRecovery.js +112 -9
- package/src/client/voice/player/MediaPlayer.js +18 -3
- package/src/client/voice/player/processing/AnnexBNalSplitter.js +0 -1
- package/src/client/voice/receiver/AudioJitter.js +7 -4
- package/src/client/voice/receiver/PacketHandler.js +10 -4
- package/src/client/voice/receiver/Receiver.js +5 -3
- package/src/client/voice/receiver/Recorder.js +44 -14
- package/src/client/voice/util/PlayInterface.js +2 -0
- package/src/client/voice/util/Secretbox.js +1 -1
- package/src/client/websocket/WebSocketShard.js +0 -1
- package/src/managers/ApplicationCommandManager.js +0 -2
- package/src/managers/ApplicationCommandPermissionsManager.js +0 -1
- package/src/managers/GuildChannelManager.js +2 -3
- package/src/managers/GuildMemberManager.js +0 -1
- package/src/managers/GuildTextThreadManager.js +1 -1
- package/src/managers/MessageManager.js +5 -5
- package/src/managers/RoleManager.js +1 -1
- package/src/rest/APIRequest.js +0 -1
- package/src/rest/APIRouter.js +2 -2
- package/src/rest/DiscordAPIError.js +1 -1
- package/src/rest/RequestHandler.js +3 -3
- package/src/sharding/ShardingManager.js +2 -2
- package/src/structures/ApplicationCommand.js +2 -7
- package/src/structures/BaseCommandInteraction.js +1 -2
- package/src/structures/BaseGuildTextChannel.js +1 -1
- package/src/structures/BaseGuildVoiceChannel.js +1 -1
- package/src/structures/ClientPresence.js +0 -1
- package/src/structures/ClientUser.js +13 -5
- package/src/structures/ContainerComponent.js +1 -1
- package/src/structures/DMChannel.js +1 -1
- package/src/structures/GroupDMChannel.js +4 -4
- package/src/structures/Guild.js +0 -2
- package/src/structures/GuildAuditLogs.js +4 -4
- package/src/structures/GuildScheduledEvent.js +0 -2
- package/src/structures/Interaction.js +1 -1
- package/src/structures/InteractionCollector.js +2 -2
- package/src/structures/InteractionWebhook.js +0 -1
- package/src/structures/Message.js +16 -17
- package/src/structures/MessageComponentInteraction.js +1 -1
- package/src/structures/MessageEmbed.js +0 -2
- package/src/structures/MessagePayload.js +2 -2
- package/src/structures/ModalSubmitInteraction.js +2 -2
- package/src/structures/ThreadChannel.js +3 -3
- package/src/structures/ThreadOnlyChannel.js +1 -1
- package/src/structures/WebEmbed.js +0 -1
- package/src/structures/interfaces/Application.js +2 -2
- package/src/structures/interfaces/Collector.js +1 -4
- package/src/structures/interfaces/TextBasedChannel.js +6 -6
- package/src/util/AttachmentFlags.js +0 -1
- package/src/util/Constants.js +0 -2
- package/src/util/Options.js +3 -3
- package/src/util/Util.js +1 -2
- package/typings/index.d.ts +108 -115
- package/typings/rawDataTypes.d.ts +5 -15
package/typings/index.d.ts
CHANGED
|
@@ -72,7 +72,7 @@ import { AgentOptions } from 'node:https';
|
|
|
72
72
|
import { Response, ProxyAgent } from 'undici';
|
|
73
73
|
import { Readable, Writable, Stream } from 'node:stream';
|
|
74
74
|
import { MessagePort, Worker } from 'node:worker_threads';
|
|
75
|
-
import { authenticator } from 'otplib';
|
|
75
|
+
import { authenticator } from '@otplib/v12-adapter';
|
|
76
76
|
import { CookieJar } from 'tough-cookie';
|
|
77
77
|
import { RtpPacket } from 'werift-rtp';
|
|
78
78
|
import * as WebSocket from 'ws';
|
|
@@ -1013,7 +1013,7 @@ export interface JoinChannelConfig {
|
|
|
1013
1013
|
videoCodec?: VideoCodec;
|
|
1014
1014
|
}
|
|
1015
1015
|
|
|
1016
|
-
export type VideoCodec = 'VP8' | 'H264';
|
|
1016
|
+
export type VideoCodec = 'VP8' | 'H264' | 'H265';
|
|
1017
1017
|
|
|
1018
1018
|
export class VolumeInterface extends EventEmitter {
|
|
1019
1019
|
constructor(options?: { volume?: number });
|
|
@@ -1050,6 +1050,8 @@ export interface VideoOptions {
|
|
|
1050
1050
|
inputFFmpegArgs?: string[];
|
|
1051
1051
|
outputFFmpegArgs?: string[];
|
|
1052
1052
|
bitrate?: number | 'auto';
|
|
1053
|
+
/** Loss-based video pacing, enabled by default. Bitrates are in kbps. */
|
|
1054
|
+
congestionControl?: boolean | { bitrate?: number; minBitrate?: number };
|
|
1053
1055
|
}
|
|
1054
1056
|
|
|
1055
1057
|
export class BaseDispatcher extends Writable {
|
|
@@ -1117,10 +1119,13 @@ export class AudioDispatcher extends BaseDispatcher {
|
|
|
1117
1119
|
}
|
|
1118
1120
|
|
|
1119
1121
|
export class VideoDispatcher extends BaseDispatcher {
|
|
1120
|
-
constructor(player: object,
|
|
1122
|
+
constructor(player: object, highWaterMark?: number, streams?: object, fps?: number, payloadType?: number);
|
|
1121
1123
|
|
|
1122
1124
|
public mtu: number;
|
|
1123
1125
|
public fps: number;
|
|
1126
|
+
public readonly congestionControl?: {
|
|
1127
|
+
readonly state: { targetBitrate: number; loss: number; packetsSent: number; reason: string };
|
|
1128
|
+
};
|
|
1124
1129
|
|
|
1125
1130
|
public getTypeDispatcher(): 'video';
|
|
1126
1131
|
|
|
@@ -1243,11 +1248,22 @@ export class StreamConnectionReadonly extends VoiceConnection {
|
|
|
1243
1248
|
export class Recorder<Ready extends boolean = boolean, T = any> extends EventEmitter {
|
|
1244
1249
|
constructor(
|
|
1245
1250
|
receiver: T,
|
|
1246
|
-
options?: {
|
|
1251
|
+
options?: {
|
|
1252
|
+
userId?: Snowflake;
|
|
1253
|
+
codec?: VideoCodec;
|
|
1254
|
+
portUdpVideo?: number;
|
|
1255
|
+
portUdpH264?: number;
|
|
1256
|
+
portUdpOpus?: number;
|
|
1257
|
+
output?: Writable | string;
|
|
1258
|
+
},
|
|
1247
1259
|
);
|
|
1248
1260
|
private promise: Promise<void>;
|
|
1249
1261
|
public readonly receiver: T;
|
|
1250
|
-
public
|
|
1262
|
+
public readonly codec: VideoCodec;
|
|
1263
|
+
public portUdpVideo: number;
|
|
1264
|
+
public portUdpH264: number | null;
|
|
1265
|
+
public portUdpH265: number | null;
|
|
1266
|
+
public portUdpVP8: number | null;
|
|
1251
1267
|
public portUdpOpus: number;
|
|
1252
1268
|
public ready: Ready;
|
|
1253
1269
|
public stream: If<Ready, ChildProcessWithoutNullStreams>;
|
|
@@ -1267,7 +1283,11 @@ export class VoiceReceiver extends EventEmitter {
|
|
|
1267
1283
|
user: UserResolvable,
|
|
1268
1284
|
options?: { mode?: 'opus' | 'pcm'; end?: 'silence' | 'manual'; paddingSilence?: boolean },
|
|
1269
1285
|
): Readable;
|
|
1270
|
-
public createVideoStream(
|
|
1286
|
+
public createVideoStream(
|
|
1287
|
+
user: UserResolvable,
|
|
1288
|
+
output: Writable | string,
|
|
1289
|
+
options?: { codec?: VideoCodec },
|
|
1290
|
+
): Recorder<false, any>;
|
|
1271
1291
|
|
|
1272
1292
|
public on(event: 'debug', listener: (error: Error | string) => void): this;
|
|
1273
1293
|
public on(
|
|
@@ -1353,8 +1373,9 @@ export abstract class Collector<K, V, F extends unknown[] = []> extends EventEmi
|
|
|
1353
1373
|
): this;
|
|
1354
1374
|
}
|
|
1355
1375
|
|
|
1356
|
-
export interface ApplicationCommandInteractionOptionResolver<
|
|
1357
|
-
extends
|
|
1376
|
+
export interface ApplicationCommandInteractionOptionResolver<
|
|
1377
|
+
Cached extends CacheType = CacheType,
|
|
1378
|
+
> extends CommandInteractionOptionResolver<Cached> {
|
|
1358
1379
|
getSubcommand(required?: true): string;
|
|
1359
1380
|
getSubcommand(required: boolean): string | null;
|
|
1360
1381
|
getSubcommandGroup(required?: true): string;
|
|
@@ -1541,8 +1562,10 @@ export class DMChannel extends Channel {
|
|
|
1541
1562
|
public readonly shard: WebSocketShard;
|
|
1542
1563
|
public readonly voiceUsers: Collection<Snowflake, User>;
|
|
1543
1564
|
}
|
|
1544
|
-
export interface DMChannel
|
|
1545
|
-
|
|
1565
|
+
export interface DMChannel extends Omit<
|
|
1566
|
+
TextBasedChannelFields,
|
|
1567
|
+
'fetchWebhooks' | 'createWebhook' | 'setRateLimitPerUser' | 'setNSFW'
|
|
1568
|
+
> {}
|
|
1546
1569
|
|
|
1547
1570
|
export class Emoji extends Base {
|
|
1548
1571
|
protected constructor(client: Client, emoji: RawEmojiData);
|
|
@@ -1709,8 +1732,8 @@ export class GuildAuditLogsEntry<
|
|
|
1709
1732
|
TAction = TActionRaw extends keyof GuildAuditLogsIds
|
|
1710
1733
|
? GuildAuditLogsIds[TActionRaw]
|
|
1711
1734
|
: TActionRaw extends null
|
|
1712
|
-
|
|
1713
|
-
|
|
1735
|
+
? 'ALL'
|
|
1736
|
+
: TActionRaw,
|
|
1714
1737
|
TActionType extends GuildAuditLogsActionType = TAction extends keyof GuildAuditLogsTypes
|
|
1715
1738
|
? GuildAuditLogsTypes[TAction][1]
|
|
1716
1739
|
: 'ALL',
|
|
@@ -2061,10 +2084,10 @@ export type CacheTypeReducer<
|
|
|
2061
2084
|
> = [State] extends ['cached']
|
|
2062
2085
|
? CachedType
|
|
2063
2086
|
: [State] extends ['raw']
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2087
|
+
? RawType
|
|
2088
|
+
: [State] extends ['raw' | 'cached']
|
|
2089
|
+
? PresentType
|
|
2090
|
+
: Fallback;
|
|
2068
2091
|
|
|
2069
2092
|
export class Interaction<Cached extends CacheType = CacheType> extends Base {
|
|
2070
2093
|
// This a technique used to brand different cached types. Or else we'll get `never` errors on typeguard checks.
|
|
@@ -2887,8 +2910,9 @@ export class ModalSubmitFieldsResolver {
|
|
|
2887
2910
|
public getTextInputValue(customId: string): string;
|
|
2888
2911
|
}
|
|
2889
2912
|
|
|
2890
|
-
export interface ModalMessageModalSubmitInteraction<
|
|
2891
|
-
extends
|
|
2913
|
+
export interface ModalMessageModalSubmitInteraction<
|
|
2914
|
+
Cached extends CacheType = CacheType,
|
|
2915
|
+
> extends ModalSubmitInteraction<Cached> {
|
|
2892
2916
|
message: GuildCacheMessage<Cached>;
|
|
2893
2917
|
channelId: Snowflake;
|
|
2894
2918
|
update(options: InteractionUpdateOptions & { fetchReply: true }): Promise<GuildCacheMessage<Cached>>;
|
|
@@ -2967,8 +2991,10 @@ export class GroupDMChannel extends Channel {
|
|
|
2967
2991
|
public readonly shard: WebSocketShard;
|
|
2968
2992
|
public readonly voiceUsers: Collection<Snowflake, User>;
|
|
2969
2993
|
}
|
|
2970
|
-
export interface GroupDMChannel
|
|
2971
|
-
|
|
2994
|
+
export interface GroupDMChannel extends Omit<
|
|
2995
|
+
TextBasedChannelFields,
|
|
2996
|
+
'fetchWebhooks' | 'createWebhook' | 'setRateLimitPerUser' | 'setNSFW'
|
|
2997
|
+
> {}
|
|
2972
2998
|
|
|
2973
2999
|
export class PermissionOverwrites extends Base {
|
|
2974
3000
|
private constructor(client: Client, data: RawPermissionOverwriteData, channel: NonThreadGuildBasedChannel);
|
|
@@ -3511,11 +3537,10 @@ export abstract class ThreadOnlyChannel extends GuildChannel {
|
|
|
3511
3537
|
public setTopic(topic: string | null, reason?: string): Promise<this>;
|
|
3512
3538
|
public setDefaultSortOrder(defaultSortOrder: SortOrderTypes | null, reason?: string): Promise<this>;
|
|
3513
3539
|
}
|
|
3514
|
-
export interface ThreadOnlyChannel
|
|
3515
|
-
|
|
3516
|
-
|
|
3517
|
-
|
|
3518
|
-
> {}
|
|
3540
|
+
export interface ThreadOnlyChannel extends Omit<
|
|
3541
|
+
TextBasedChannelFields,
|
|
3542
|
+
'send' | 'lastMessage' | 'lastPinAt' | 'sendTyping' | 'createMessageCollector' | 'awaitMessages' | 'messages'
|
|
3543
|
+
> {}
|
|
3519
3544
|
|
|
3520
3545
|
export class ForumChannel extends ThreadOnlyChannel {
|
|
3521
3546
|
public type: 'GUILD_FORUM';
|
|
@@ -4256,10 +4281,7 @@ export abstract class CachedManager<K, Holds, R> extends DataManager<K, Holds, R
|
|
|
4256
4281
|
}
|
|
4257
4282
|
|
|
4258
4283
|
export type ApplicationCommandDataResolvable =
|
|
4259
|
-
|
|
|
4260
|
-
| RESTPostAPIApplicationCommandsJSONBody
|
|
4261
|
-
| SlashCommandBuilder
|
|
4262
|
-
| ContextMenuCommandBuilder;
|
|
4284
|
+
ApplicationCommandData | RESTPostAPIApplicationCommandsJSONBody | SlashCommandBuilder | ContextMenuCommandBuilder;
|
|
4263
4285
|
|
|
4264
4286
|
export class ApplicationCommandManager<
|
|
4265
4287
|
ApplicationCommandScope = ApplicationCommand<{ guild: GuildResolvable }>,
|
|
@@ -5023,13 +5045,7 @@ export type AllowedImageFormat = 'webp' | 'png' | 'jpg' | 'jpeg';
|
|
|
5023
5045
|
export type AllowedImageSize = 16 | 32 | 56 | 64 | 96 | 128 | 256 | 300 | 512 | 600 | 1024 | 2048 | 4096;
|
|
5024
5046
|
|
|
5025
5047
|
export type AllowedPartial =
|
|
5026
|
-
|
|
|
5027
|
-
| Channel
|
|
5028
|
-
| GuildMember
|
|
5029
|
-
| Message
|
|
5030
|
-
| MessageReaction
|
|
5031
|
-
| GuildScheduledEvent
|
|
5032
|
-
| ThreadMember;
|
|
5048
|
+
User | Channel | GuildMember | Message | MessageReaction | GuildScheduledEvent | ThreadMember;
|
|
5033
5049
|
|
|
5034
5050
|
export type AllowedThreadTypeForNewsChannel = 'GUILD_NEWS_THREAD' | 10;
|
|
5035
5051
|
|
|
@@ -5223,15 +5239,10 @@ export type CommandOptionDataTypeResolvable = ApplicationCommandOptionType | App
|
|
|
5223
5239
|
export type CommandOptionChannelResolvableType = ApplicationCommandOptionTypes.CHANNEL | 'CHANNEL';
|
|
5224
5240
|
|
|
5225
5241
|
export type CommandOptionChoiceResolvableType =
|
|
5226
|
-
|
|
5227
|
-
| 'STRING'
|
|
5228
|
-
| CommandOptionNumericResolvableType;
|
|
5242
|
+
ApplicationCommandOptionTypes.STRING | 'STRING' | CommandOptionNumericResolvableType;
|
|
5229
5243
|
|
|
5230
5244
|
export type CommandOptionNumericResolvableType =
|
|
5231
|
-
| ApplicationCommandOptionTypes.
|
|
5232
|
-
| 'NUMBER'
|
|
5233
|
-
| ApplicationCommandOptionTypes.INTEGER
|
|
5234
|
-
| 'INTEGER';
|
|
5245
|
+
ApplicationCommandOptionTypes.NUMBER | 'NUMBER' | ApplicationCommandOptionTypes.INTEGER | 'INTEGER';
|
|
5235
5246
|
|
|
5236
5247
|
export type CommandOptionSubOptionResolvableType =
|
|
5237
5248
|
| ApplicationCommandOptionTypes.SUB_COMMAND
|
|
@@ -5269,9 +5280,7 @@ export interface ChatInputApplicationCommandData extends BaseApplicationCommandD
|
|
|
5269
5280
|
}
|
|
5270
5281
|
|
|
5271
5282
|
export type ApplicationCommandData =
|
|
5272
|
-
|
|
|
5273
|
-
| MessageApplicationCommandData
|
|
5274
|
-
| ChatInputApplicationCommandData;
|
|
5283
|
+
UserApplicationCommandData | MessageApplicationCommandData | ChatInputApplicationCommandData;
|
|
5275
5284
|
|
|
5276
5285
|
export interface ApplicationCommandChannelOptionData extends BaseApplicationCommandOptionsData {
|
|
5277
5286
|
type: CommandOptionChannelResolvableType;
|
|
@@ -6356,10 +6365,7 @@ export interface EmbedFooterData {
|
|
|
6356
6365
|
}
|
|
6357
6366
|
|
|
6358
6367
|
export type EmojiIdentifierResolvable =
|
|
6359
|
-
|
|
|
6360
|
-
| `${'' | 'a:'}${string}:${Snowflake}`
|
|
6361
|
-
| `<${'' | 'a'}:${string}:${Snowflake}>`
|
|
6362
|
-
| string;
|
|
6368
|
+
EmojiResolvable | `${'' | 'a:'}${string}:${Snowflake}` | `<${'' | 'a'}:${string}:${Snowflake}>` | string;
|
|
6363
6369
|
|
|
6364
6370
|
export type EmojiResolvable = Snowflake | GuildEmoji | ReactionEmoji;
|
|
6365
6371
|
|
|
@@ -6502,8 +6508,7 @@ export interface FetchThreadMembersWithoutGuildMemberDataOptions {
|
|
|
6502
6508
|
}
|
|
6503
6509
|
|
|
6504
6510
|
export type FetchThreadMembersOptions =
|
|
6505
|
-
|
|
|
6506
|
-
| FetchThreadMembersWithoutGuildMemberDataOptions;
|
|
6511
|
+
FetchThreadMembersWithGuildMemberDataOptions | FetchThreadMembersWithoutGuildMemberDataOptions;
|
|
6507
6512
|
|
|
6508
6513
|
export interface FetchThreadsOptions {
|
|
6509
6514
|
archived?: FetchArchivedThreadOptions;
|
|
@@ -6858,10 +6863,7 @@ export interface GuildMemberEditData {
|
|
|
6858
6863
|
}
|
|
6859
6864
|
|
|
6860
6865
|
export type GuildMemberFlagsString =
|
|
6861
|
-
| '
|
|
6862
|
-
| 'COMPLETED_ONBOARDING'
|
|
6863
|
-
| 'BYPASSES_VERIFICATION'
|
|
6864
|
-
| 'STARTED_ONBOARDING';
|
|
6866
|
+
'DID_REJOIN' | 'COMPLETED_ONBOARDING' | 'BYPASSES_VERIFICATION' | 'STARTED_ONBOARDING';
|
|
6865
6867
|
|
|
6866
6868
|
export type GuildMemberFlagsResolvable = BitFieldResolvable<GuildMemberFlagsString, number>;
|
|
6867
6869
|
|
|
@@ -6970,8 +6972,8 @@ export type GuildScheduledEventResolvable = Snowflake | GuildScheduledEvent;
|
|
|
6970
6972
|
export type GuildScheduledEventSetStatusArg<T extends GuildScheduledEventStatus> = T extends 'SCHEDULED'
|
|
6971
6973
|
? 'ACTIVE' | 'CANCELED'
|
|
6972
6974
|
: T extends 'ACTIVE'
|
|
6973
|
-
|
|
6974
|
-
|
|
6975
|
+
? 'COMPLETED'
|
|
6976
|
+
: never;
|
|
6975
6977
|
|
|
6976
6978
|
export type GuildScheduledEventStatus = keyof typeof GuildScheduledEventStatuses;
|
|
6977
6979
|
|
|
@@ -7029,8 +7031,10 @@ export interface ImageURLOptions extends Omit<StaticImageURLOptions, 'format'> {
|
|
|
7029
7031
|
|
|
7030
7032
|
export type IntegrationType = 'twitch' | 'youtube' | 'discord' | 'guild_subscription';
|
|
7031
7033
|
|
|
7032
|
-
export interface InteractionCollectorOptions<
|
|
7033
|
-
extends
|
|
7034
|
+
export interface InteractionCollectorOptions<
|
|
7035
|
+
T extends Interaction,
|
|
7036
|
+
Cached extends CacheType = CacheType,
|
|
7037
|
+
> extends CollectorOptions<[T]> {
|
|
7034
7038
|
channel?: TextBasedChannelResolvable;
|
|
7035
7039
|
componentType?: MessageComponentType | MessageComponentTypes;
|
|
7036
7040
|
guild?: GuildResolvable;
|
|
@@ -7084,12 +7088,7 @@ export type IntentsString =
|
|
|
7084
7088
|
| 'AUTO_MODERATION_EXECUTION';
|
|
7085
7089
|
|
|
7086
7090
|
export type GuildInvitableChannelResolvable =
|
|
7087
|
-
|
|
|
7088
|
-
| VoiceChannel
|
|
7089
|
-
| NewsChannel
|
|
7090
|
-
| StoreChannel
|
|
7091
|
-
| StageChannel
|
|
7092
|
-
| Snowflake;
|
|
7091
|
+
TextChannel | VoiceChannel | NewsChannel | StoreChannel | StageChannel | Snowflake;
|
|
7093
7092
|
|
|
7094
7093
|
export interface CreateInviteOptions {
|
|
7095
7094
|
temporary?: boolean;
|
|
@@ -7144,23 +7143,18 @@ export type MessageActionRowComponentOptions =
|
|
|
7144
7143
|
| (Required<BaseMessageComponentOptions> & MessageSelectMenuOptions);
|
|
7145
7144
|
|
|
7146
7145
|
export type MessageActionRowComponentResolvable =
|
|
7147
|
-
|
|
|
7148
|
-
| MessageActionRowComponentOptions
|
|
7149
|
-
| APIMessageActionRowComponent;
|
|
7146
|
+
MessageActionRowComponent | MessageActionRowComponentOptions | APIMessageActionRowComponent;
|
|
7150
7147
|
|
|
7151
7148
|
export type ModalActionRowComponent = TextInputComponent;
|
|
7152
7149
|
|
|
7153
7150
|
export type ModalActionRowComponentOptions = TextInputComponentOptions;
|
|
7154
7151
|
|
|
7155
7152
|
export type ModalActionRowComponentResolvable =
|
|
7156
|
-
|
|
|
7157
|
-
| ModalActionRowComponentOptions
|
|
7158
|
-
| APIModalActionRowComponent;
|
|
7153
|
+
ModalActionRowComponent | ModalActionRowComponentOptions | APIModalActionRowComponent;
|
|
7159
7154
|
|
|
7160
7155
|
export interface MessageActionRowOptions<
|
|
7161
|
-
T extends
|
|
7162
|
-
|
|
7163
|
-
| ModalActionRowComponentResolvable = MessageActionRowComponentResolvable,
|
|
7156
|
+
T extends MessageActionRowComponentResolvable | ModalActionRowComponentResolvable =
|
|
7157
|
+
MessageActionRowComponentResolvable,
|
|
7164
7158
|
> extends BaseMessageComponentOptions {
|
|
7165
7159
|
components: T[];
|
|
7166
7160
|
}
|
|
@@ -7209,10 +7203,7 @@ export type MessageChannelComponentCollectorOptions<T extends MessageComponentIn
|
|
|
7209
7203
|
Omit<InteractionCollectorOptions<T>, 'channel' | 'guild' | 'interactionType'>;
|
|
7210
7204
|
|
|
7211
7205
|
export type MessageComponentOptions =
|
|
7212
|
-
|
|
|
7213
|
-
| MessageActionRowOptions
|
|
7214
|
-
| MessageButtonOptions
|
|
7215
|
-
| MessageSelectMenuOptions;
|
|
7206
|
+
BaseMessageComponentOptions | MessageActionRowOptions | MessageButtonOptions | MessageSelectMenuOptions;
|
|
7216
7207
|
|
|
7217
7208
|
export type MessageComponentType = keyof typeof MessageComponentTypes;
|
|
7218
7209
|
|
|
@@ -7343,25 +7334,24 @@ export interface MessageMentionOptions {
|
|
|
7343
7334
|
|
|
7344
7335
|
export type MessageMentionTypes = 'roles' | 'users' | 'everyone';
|
|
7345
7336
|
|
|
7346
|
-
export interface MessageSnapshot
|
|
7347
|
-
|
|
7348
|
-
|
|
7349
|
-
|
|
7350
|
-
|
|
7351
|
-
|
|
7352
|
-
|
|
7353
|
-
|
|
7354
|
-
|
|
7355
|
-
|
|
7356
|
-
|
|
7357
|
-
|
|
7358
|
-
|
|
7359
|
-
|
|
7360
|
-
|
|
7361
|
-
|
|
7362
|
-
|
|
7363
|
-
|
|
7364
|
-
> {}
|
|
7337
|
+
export interface MessageSnapshot extends Partialize<
|
|
7338
|
+
Message,
|
|
7339
|
+
null,
|
|
7340
|
+
Exclude<
|
|
7341
|
+
keyof Message,
|
|
7342
|
+
| 'attachments'
|
|
7343
|
+
| 'client'
|
|
7344
|
+
| 'components'
|
|
7345
|
+
| 'content'
|
|
7346
|
+
| 'createdTimestamp'
|
|
7347
|
+
| 'editedTimestamp'
|
|
7348
|
+
| 'embeds'
|
|
7349
|
+
| 'flags'
|
|
7350
|
+
| 'mentions'
|
|
7351
|
+
| 'stickers'
|
|
7352
|
+
| 'type'
|
|
7353
|
+
>
|
|
7354
|
+
> {}
|
|
7365
7355
|
|
|
7366
7356
|
export interface MessageOptions {
|
|
7367
7357
|
activity?: MessageActivity;
|
|
@@ -7415,9 +7405,7 @@ export interface OtherMessageSelectMenuOptions extends BaseMessageSelectMenuOpti
|
|
|
7415
7405
|
}
|
|
7416
7406
|
|
|
7417
7407
|
export type MessageSelectMenuOptions =
|
|
7418
|
-
|
|
|
7419
|
-
| ChannelMessageSelectMenuOptions
|
|
7420
|
-
| OtherMessageSelectMenuOptions;
|
|
7408
|
+
StringMessageSelectMenuOptions | ChannelMessageSelectMenuOptions | OtherMessageSelectMenuOptions;
|
|
7421
7409
|
|
|
7422
7410
|
export interface MessageSelectOption {
|
|
7423
7411
|
default: boolean;
|
|
@@ -7452,8 +7440,7 @@ export type MFALevel = keyof typeof MFALevels;
|
|
|
7452
7440
|
|
|
7453
7441
|
export interface ModalOptions {
|
|
7454
7442
|
components:
|
|
7455
|
-
|
|
7456
|
-
| MessageActionRowOptions<ModalActionRowComponentResolvable>[];
|
|
7443
|
+
MessageActionRow<ModalActionRowComponent>[] | MessageActionRowOptions<ModalActionRowComponentResolvable>[];
|
|
7457
7444
|
customId: string;
|
|
7458
7445
|
title: string;
|
|
7459
7446
|
}
|
|
@@ -7630,13 +7617,19 @@ export interface PartialDMChannel extends Partialize<DMChannel, null, null, 'las
|
|
|
7630
7617
|
|
|
7631
7618
|
export interface PartialGuildMember extends Partialize<GuildMember, 'joinedAt' | 'joinedTimestamp'> {}
|
|
7632
7619
|
|
|
7633
|
-
export interface PartialMessage
|
|
7634
|
-
|
|
7620
|
+
export interface PartialMessage extends Partialize<
|
|
7621
|
+
Message,
|
|
7622
|
+
'type' | 'system' | 'pinned' | 'tts',
|
|
7623
|
+
'content' | 'cleanContent' | 'author'
|
|
7624
|
+
> {}
|
|
7635
7625
|
|
|
7636
7626
|
export interface PartialMessageReaction extends Partialize<MessageReaction, 'count'> {}
|
|
7637
7627
|
|
|
7638
|
-
export interface PartialGuildScheduledEvent
|
|
7639
|
-
|
|
7628
|
+
export interface PartialGuildScheduledEvent extends Partialize<
|
|
7629
|
+
GuildScheduledEvent,
|
|
7630
|
+
'userCount',
|
|
7631
|
+
'status' | 'privacyLevel' | 'name' | 'entityType'
|
|
7632
|
+
> {}
|
|
7640
7633
|
|
|
7641
7634
|
export interface PartialOverwriteData {
|
|
7642
7635
|
id: Snowflake | number;
|
|
@@ -8158,14 +8151,14 @@ export type WSEventType =
|
|
|
8158
8151
|
export type Serialized<T> = T extends symbol | bigint | (() => any)
|
|
8159
8152
|
? never
|
|
8160
8153
|
: T extends number | string | boolean | undefined
|
|
8161
|
-
|
|
8162
|
-
|
|
8163
|
-
|
|
8164
|
-
|
|
8165
|
-
|
|
8166
|
-
|
|
8167
|
-
|
|
8168
|
-
|
|
8154
|
+
? T
|
|
8155
|
+
: T extends { toJSON(): infer R }
|
|
8156
|
+
? R
|
|
8157
|
+
: T extends ReadonlyArray<infer V>
|
|
8158
|
+
? Serialized<V>[]
|
|
8159
|
+
: T extends ReadonlyMap<unknown, unknown> | ReadonlySet<unknown>
|
|
8160
|
+
? {}
|
|
8161
|
+
: { [K in keyof T]: Serialized<T[K]> };
|
|
8169
8162
|
|
|
8170
8163
|
//#endregion
|
|
8171
8164
|
|
|
@@ -110,20 +110,14 @@ export type RawIntegrationApplicationData = APIGuildIntegrationApplication | Par
|
|
|
110
110
|
export type RawApplicationCommandData = APIApplicationCommand;
|
|
111
111
|
|
|
112
112
|
export type RawChannelData =
|
|
113
|
-
|
|
|
114
|
-
| RawThreadChannelData
|
|
115
|
-
| RawDMChannelData
|
|
116
|
-
| RawPartialGroupDMChannelData;
|
|
113
|
+
RawGuildChannelData | RawThreadChannelData | RawDMChannelData | RawPartialGroupDMChannelData;
|
|
117
114
|
export type RawDMChannelData = APIChannel | APIInteractionDataResolvedChannel;
|
|
118
115
|
export type RawGuildChannelData = APIChannel | APIInteractionDataResolvedChannel | Required<APIPartialChannel>;
|
|
119
116
|
export type RawPartialGroupDMChannelData = APIChannel | Required<APIPartialChannel>;
|
|
120
117
|
export type RawThreadChannelData = APIChannel | APIInteractionDataResolvedChannel;
|
|
121
118
|
|
|
122
119
|
export type RawEmojiData =
|
|
123
|
-
|
|
|
124
|
-
| RawReactionEmojiData
|
|
125
|
-
| GatewayActivityEmoji
|
|
126
|
-
| Omit<Partial<APIPartialEmoji>, 'animated'>;
|
|
120
|
+
RawGuildEmojiData | RawReactionEmojiData | GatewayActivityEmoji | Omit<Partial<APIPartialEmoji>, 'animated'>;
|
|
127
121
|
export type RawGuildEmojiData = APIEmoji;
|
|
128
122
|
export type RawReactionEmojiData = APIEmoji | APIPartialEmoji;
|
|
129
123
|
|
|
@@ -213,8 +207,7 @@ export type RawRoleData = APIRole;
|
|
|
213
207
|
export type RawRichPresenceAssets = GatewayActivityAssets;
|
|
214
208
|
|
|
215
209
|
export type RawStageInstanceData =
|
|
216
|
-
| APIStageInstance
|
|
217
|
-
| (Partial<APIStageInstance> & Pick<APIStageInstance, 'id' | 'channel_id' | 'guild_id'>);
|
|
210
|
+
APIStageInstance | (Partial<APIStageInstance> & Pick<APIStageInstance, 'id' | 'channel_id' | 'guild_id'>);
|
|
218
211
|
|
|
219
212
|
export type RawStickerData = APISticker | APIStickerItem;
|
|
220
213
|
|
|
@@ -227,17 +220,14 @@ export type RawTeamMemberData = APITeamMember;
|
|
|
227
220
|
export type RawTypingData = GatewayTypingStartDispatchData;
|
|
228
221
|
|
|
229
222
|
export type RawUserData =
|
|
230
|
-
|
|
231
|
-
| (GatewayPresenceUpdate['user'] & Pick<APIUser, 'username'>);
|
|
223
|
+
(APIUser & { member?: Omit<APIGuildMember, 'user'> }) | (GatewayPresenceUpdate['user'] & Pick<APIUser, 'username'>);
|
|
232
224
|
|
|
233
225
|
export type RawVoiceRegionData = APIVoiceRegion;
|
|
234
226
|
|
|
235
227
|
export type RawVoiceStateData = GatewayVoiceState | Omit<GatewayVoiceState, 'guild_id'>;
|
|
236
228
|
|
|
237
229
|
export type RawWebhookData =
|
|
238
|
-
| APIWebhook
|
|
239
|
-
| RESTGetAPIWebhookWithTokenResult
|
|
240
|
-
| (Partial<APIWebhook> & Required<Pick<APIWebhook, 'id' | 'guild_id'>>);
|
|
230
|
+
APIWebhook | RESTGetAPIWebhookWithTokenResult | (Partial<APIWebhook> & Required<Pick<APIWebhook, 'id' | 'guild_id'>>);
|
|
241
231
|
|
|
242
232
|
export type RawWelcomeChannelData = APIGuildWelcomeScreenChannel;
|
|
243
233
|
|