disgroove 3.0.1-dev.739a5a9 → 3.0.1-dev.c1d6d42
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 +38 -8
- package/dist/lib/Client.d.ts +45 -3
- package/dist/lib/Client.js +54 -0
- package/dist/lib/constants.d.ts +77 -5
- package/dist/lib/constants.js +83 -2
- package/dist/lib/gateway/Dispatcher.d.ts +4 -1
- package/dist/lib/gateway/Dispatcher.js +24 -0
- package/dist/lib/gateway/Transmitter.d.ts +3 -1
- package/dist/lib/gateway/Transmitter.js +7 -0
- package/dist/lib/rest/Endpoints.d.ts +2 -0
- package/dist/lib/rest/Endpoints.js +7 -3
- package/dist/lib/transformers/AuditLogs.js +2 -0
- package/dist/lib/transformers/Components.d.ts +7 -1
- package/dist/lib/transformers/Components.js +80 -0
- package/dist/lib/transformers/Guilds.js +10 -0
- package/dist/lib/transformers/Interactions.js +46 -0
- package/dist/lib/transformers/Invites.d.ts +3 -0
- package/dist/lib/transformers/Invites.js +32 -0
- package/dist/lib/transformers/Messages.d.ts +1 -1
- package/dist/lib/transformers/Messages.js +78 -20
- package/dist/lib/transformers/Users.d.ts +3 -1
- package/dist/lib/transformers/Users.js +16 -10
- package/dist/lib/types/application.d.ts +2 -2
- package/dist/lib/types/audit-log.d.ts +2 -0
- package/dist/lib/types/components.d.ts +131 -5
- package/dist/lib/types/gateway-events.d.ts +61 -1
- package/dist/lib/types/guild.d.ts +3 -1
- package/dist/lib/types/invite.d.ts +2 -2
- package/dist/lib/types/message.d.ts +66 -1
- package/dist/package.json +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,14 +1,42 @@
|
|
|
1
1
|
# disgroove
|
|
2
2
|
|
|
3
|
-
A
|
|
3
|
+
> A lightweight (≈ **791 KB** unpacked) and low-level Node.js dependency for interfacing with Discord, focused on accuracy and flexibility.
|
|
4
|
+
> It is designed for developers who want full control over the Discord API without heavy abstractions and want as little RAM and CPU usage as possible.
|
|
4
5
|
|
|
5
|
-
|
|
6
|
-
- Lightweight
|
|
7
|
-
- Flexible
|
|
8
|
-
- 100% coverage of the [Official Discord API Documentation](https://discord.com/developers/docs/intro)
|
|
6
|
+
> **disgroove** is intended for developers already familiar with the Discord API and gateway model.
|
|
9
7
|
|
|
10
|
-
##
|
|
8
|
+
## Why disgroove?
|
|
9
|
+
|
|
10
|
+
### ✅ Accurate with the official Discord API
|
|
11
|
+
|
|
12
|
+
All commits (since __July 3, 2024__), types, REST requests, and utilities strictly follow the [official Discord API documentation repository](https://github.com/discord/discord-api-docs) and are referenced to the [Discord API developer docs](https://docs.discord.com/developers/intro).
|
|
13
|
+
|
|
14
|
+
Development releases are mainly published when breaking changes are introduced in the Discord API.
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
### 🧠 Minimal caching
|
|
19
|
+
|
|
20
|
+
**disgroove** only caches guilds.
|
|
21
|
+
|
|
22
|
+
Guilds are mapped from the `READY` gateway event and kept in sync through
|
|
23
|
+
`GUILD_CREATE`, `GUILD_UPDATE` and `GUILD_DELETE` gateway events.
|
|
24
|
+
|
|
25
|
+
This design significantly decreases RAM and CPU usage and keeps the library lightweight.
|
|
11
26
|
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
### 🔧 Highly flexible and low-level
|
|
30
|
+
|
|
31
|
+
**disgroove** doesn't hide Discord features behind abstractions.
|
|
32
|
+
|
|
33
|
+
Every REST request is built directly on top of the [Discord API developer docs](https://docs.discord.com/developers/intro), with no changes.
|
|
34
|
+
|
|
35
|
+
You can listen to any gateway event directly using `Shard.ws.on(...)` and perform raw REST requests using `Client.rest.request(...)`
|
|
36
|
+
|
|
37
|
+
This allows you to use new Discord features immediately, even before a dedicated **disgroove** update is released.
|
|
38
|
+
|
|
39
|
+
## Example
|
|
12
40
|
```js
|
|
13
41
|
const {
|
|
14
42
|
Client,
|
|
@@ -17,7 +45,7 @@ const {
|
|
|
17
45
|
InteractionCallbackType,
|
|
18
46
|
MessageFlags,
|
|
19
47
|
} = require("disgroove");
|
|
20
|
-
const client = new Client(
|
|
48
|
+
const client = new Client(process.env.TOKEN);
|
|
21
49
|
|
|
22
50
|
client.once("ready", () => {
|
|
23
51
|
console.log("Logged in as", client.user.username);
|
|
@@ -28,7 +56,7 @@ client.once("ready", () => {
|
|
|
28
56
|
});
|
|
29
57
|
});
|
|
30
58
|
|
|
31
|
-
client.on("interactionCreate",
|
|
59
|
+
client.on("interactionCreate", (interaction) => {
|
|
32
60
|
if (interaction.type !== InteractionType.ApplicationCommand) return;
|
|
33
61
|
|
|
34
62
|
if (interaction.data.name === "ping") {
|
|
@@ -46,3 +74,5 @@ client.connect();
|
|
|
46
74
|
```
|
|
47
75
|
|
|
48
76
|
More examples on the [GitHub repository](https://github.com/sergiogotuzzo/disgroove/tree/main/examples)
|
|
77
|
+
|
|
78
|
+
> Enjoy **disgroove**? Leave a ⭐ to this repository!
|
package/dist/lib/Client.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { GatewayIntents, type OAuth2Scopes, type ActionTypes, type ImageWidgetStyleOptions, type ReactionTypes, type ApplicationCommandTypes, type EventTypes, type TriggerTypes, type ChannelTypes, type VideoQualityModes, type SortOrderTypes, type ForumLayoutTypes, type InviteTargetTypes, type VerificationLevel, type DefaultMessageNotificationLevel, type ExplicitContentFilterLevel, type SystemChannelFlags, type ApplicationFlags, type ApplicationIntegrationTypes, type ChannelFlags, type GuildFeatures, type GuildScheduledEventEntityTypes, type GuildScheduledEventPrivacyLevel, type GuildScheduledEventStatus, type MessageFlags, type OnboardingMode, type PrivacyLevel, type GuildMemberFlags, type InteractionContextTypes, type LobbyMemberFlags, InviteTargetUsersJobStatusErrorCodes } from "./constants";
|
|
1
|
+
import { GatewayIntents, type OAuth2Scopes, type ActionTypes, type ImageWidgetStyleOptions, type ReactionTypes, type ApplicationCommandTypes, type EventTypes, type TriggerTypes, type ChannelTypes, type VideoQualityModes, type SortOrderTypes, type ForumLayoutTypes, type InviteTargetTypes, type VerificationLevel, type DefaultMessageNotificationLevel, type ExplicitContentFilterLevel, type SystemChannelFlags, type ApplicationFlags, type ApplicationIntegrationTypes, type ChannelFlags, type GuildFeatures, type GuildScheduledEventEntityTypes, type GuildScheduledEventPrivacyLevel, type GuildScheduledEventStatus, type MessageFlags, type OnboardingMode, type PrivacyLevel, type GuildMemberFlags, type InteractionContextTypes, type LobbyMemberFlags, type InviteTargetUsersJobStatusErrorCodes, type AuthorTypes, type SearchHasTypes, type SearchEmbedTypes, type SearchSortModes } from "./constants";
|
|
2
2
|
import { RequestManager, type FileData } from "./rest";
|
|
3
3
|
import EventEmitter from "node:events";
|
|
4
4
|
import { Shard } from "./gateway";
|
|
@@ -11,7 +11,7 @@ import type { Channel, FollowedChannel, ThreadMember, Overwrite, DefaultReaction
|
|
|
11
11
|
import type { LocaleMap, snowflake, timestamp } from "./types/common";
|
|
12
12
|
import type { Emoji } from "./types/emoji";
|
|
13
13
|
import type { Entitlement } from "./types/entitlements";
|
|
14
|
-
import type { AutoModerationActionExecutionEvent, ChannelPinsUpdateEvent, ThreadListSyncEvent, ThreadMemberUpdateEventExtra, ThreadMembersUpdateEvent, GuildCreateEventExtra, GuildAuditLogEntryCreateExtra, GuildBanAddEvent, GuildBanRemoveEvent, GuildMemberAddEventExtra, GuildMemberRemoveEvent, GuildMemberUpdateEvent, GuildMembersChunkEvent, IntegrationCreateEventExtra, IntegrationUpdateEventExtra, IntegrationDeleteEvent, InviteCreateEvent, InviteDeleteEvent, MessageCreateEventExtra, MessageDeleteEvent, MessageDeleteBulkEvent, MessageReactionAddEvent, MessageReactionRemoveEvent, MessageReactionRemoveAllEvent, MessageReactionRemoveEmojiEvent, PresenceUpdateEvent, TypingStartEvent, VoiceServerUpdateEvent, MessagePollVoteAddEvent, MessagePollVoteRemoveEvent, GatewayPresenceUpdate, RawPayload, IdentifyConnectionProperties, VoiceChannelEffectSendEvent, GuildSoundboardSoundDeleteEvent, RateLimitedEvent } from "./types/gateway-events";
|
|
14
|
+
import type { AutoModerationActionExecutionEvent, ChannelPinsUpdateEvent, ThreadListSyncEvent, ThreadMemberUpdateEventExtra, ThreadMembersUpdateEvent, GuildCreateEventExtra, GuildAuditLogEntryCreateExtra, GuildBanAddEvent, GuildBanRemoveEvent, GuildMemberAddEventExtra, GuildMemberRemoveEvent, GuildMemberUpdateEvent, GuildMembersChunkEvent, IntegrationCreateEventExtra, IntegrationUpdateEventExtra, IntegrationDeleteEvent, InviteCreateEvent, InviteDeleteEvent, MessageCreateEventExtra, MessageDeleteEvent, MessageDeleteBulkEvent, MessageReactionAddEvent, MessageReactionRemoveEvent, MessageReactionRemoveAllEvent, MessageReactionRemoveEmojiEvent, PresenceUpdateEvent, TypingStartEvent, VoiceServerUpdateEvent, MessagePollVoteAddEvent, MessagePollVoteRemoveEvent, GatewayPresenceUpdate, RawPayload, IdentifyConnectionProperties, VoiceChannelEffectSendEvent, GuildSoundboardSoundDeleteEvent, RateLimitedEvent, ChannelInfoEvent, VoiceChannelStatusUpdateEvent, VoiceChannelStartTimeUpdateEvent } from "./types/gateway-events";
|
|
15
15
|
import type { Guild, GuildMember, WelcomeScreen, GuildWidgetSettings, Ban, Integration, GuildOnboarding, GuildPreview, GuildWidget, UnavailableGuild, OnboardingPrompt, WelcomeScreenChannel, IncidentsData } from "./types/guild";
|
|
16
16
|
import type { GuildScheduledEvent, GuildScheduledEventUser, GuildScheduledEventEntityMetadata, GuildScheduledEventRecurrenceRule } from "./types/guild-scheduled-event";
|
|
17
17
|
import type { GuildTemplate } from "./types/guild-template";
|
|
@@ -26,7 +26,7 @@ import type { User, ApplicationRoleConnection, Connection } from "./types/user";
|
|
|
26
26
|
import type { VoiceRegion, VoiceState } from "./types/voice";
|
|
27
27
|
import type { Webhook } from "./types/webhook";
|
|
28
28
|
import type { ClientOptions as WebSocketOptions } from "ws";
|
|
29
|
-
import type { Embed, AllowedMentions, Attachment, Message, MessageReference, MessagePin } from "./types/message";
|
|
29
|
+
import type { Embed, AllowedMentions, Attachment, Message, MessageReference, MessagePin, SharedClientTheme } from "./types/message";
|
|
30
30
|
import type { Subscription } from "./types/subscription";
|
|
31
31
|
import type { SoundboardSound } from "./types/soundboard";
|
|
32
32
|
import type { ActionRow, Button, ChannelSelect, Container, File, MediaGallery, MentionableSelect, RoleSelect, Section, Separator, StringSelect, TextDisplay, Thumbnail, UserSelect } from "./types/components";
|
|
@@ -316,6 +316,7 @@ export declare class Client extends EventEmitter {
|
|
|
316
316
|
flags?: MessageFlags;
|
|
317
317
|
enforceNonce?: boolean;
|
|
318
318
|
poll?: PollCreateParams;
|
|
319
|
+
sharedClientTheme?: SharedClientTheme;
|
|
319
320
|
}): Promise<Message>;
|
|
320
321
|
/** https://discord.com/developers/docs/resources/message#create-reaction */
|
|
321
322
|
createMessageReaction(channelId: snowflake, messageId: snowflake, emoji: string): void;
|
|
@@ -1091,6 +1092,40 @@ export declare class Client extends EventEmitter {
|
|
|
1091
1092
|
query: string;
|
|
1092
1093
|
limit?: number;
|
|
1093
1094
|
}): Promise<Array<GuildMember>>;
|
|
1095
|
+
/** https://docs.discord.com/developers/resources/message#search-guild-messages */
|
|
1096
|
+
searchGuildMessages(guildId: snowflake, options?: {
|
|
1097
|
+
limit?: number;
|
|
1098
|
+
offset?: number;
|
|
1099
|
+
maxId?: snowflake;
|
|
1100
|
+
minId?: snowflake;
|
|
1101
|
+
slop?: number;
|
|
1102
|
+
content?: string;
|
|
1103
|
+
channelId?: snowflake;
|
|
1104
|
+
authorType?: Array<AuthorTypes>;
|
|
1105
|
+
authorId?: Array<snowflake>;
|
|
1106
|
+
mentions?: Array<snowflake>;
|
|
1107
|
+
mentionsRolesId?: Array<snowflake>;
|
|
1108
|
+
mentionEveryone?: boolean;
|
|
1109
|
+
repliedToUserId?: Array<snowflake>;
|
|
1110
|
+
repliedToMessageId?: Array<snowflake>;
|
|
1111
|
+
pinned?: boolean;
|
|
1112
|
+
has?: Array<SearchHasTypes>;
|
|
1113
|
+
embedType?: Array<SearchEmbedTypes>;
|
|
1114
|
+
embedProvider?: Array<string>;
|
|
1115
|
+
linkHostname?: Array<string>;
|
|
1116
|
+
attachmentFilename?: Array<string>;
|
|
1117
|
+
attachmentExtension?: Array<string>;
|
|
1118
|
+
sortBy?: SearchSortModes;
|
|
1119
|
+
sortOrder?: string;
|
|
1120
|
+
includeNfsw?: boolean;
|
|
1121
|
+
}): Promise<{
|
|
1122
|
+
doingDeepHistoricalIndex: boolean;
|
|
1123
|
+
documentsIndexed?: number;
|
|
1124
|
+
totalResults: number;
|
|
1125
|
+
messages: Array<Message>;
|
|
1126
|
+
threads?: Array<Channel>;
|
|
1127
|
+
members?: Array<ThreadMember>;
|
|
1128
|
+
}>;
|
|
1094
1129
|
/** https://discord.com/developers/docs/resources/soundboard#send-soundboard-sound */
|
|
1095
1130
|
sendSoundboardSound(channelId: snowflake, options: {
|
|
1096
1131
|
soundId: snowflake;
|
|
@@ -1098,6 +1133,10 @@ export declare class Client extends EventEmitter {
|
|
|
1098
1133
|
}): void;
|
|
1099
1134
|
/** https://discord.com/developers/docs/topics/gateway-events#update-presence */
|
|
1100
1135
|
setPresence(options: Partial<Pick<GatewayPresenceUpdate, "activities" | "status" | "afk">>): void;
|
|
1136
|
+
/** https://docs.discord.com/developers/resources/channel#set-voice-channel-status */
|
|
1137
|
+
setVoiceChannelStatus(channelId: snowflake, options: {
|
|
1138
|
+
status: string | null;
|
|
1139
|
+
}, reason?: string): void;
|
|
1101
1140
|
/** https://discord.com/developers/docs/resources/guild-template#sync-guild-template */
|
|
1102
1141
|
syncGuildTemplate(guildId: snowflake, code: string): Promise<GuildTemplate>;
|
|
1103
1142
|
/** https://discord.com/developers/docs/resources/channel#trigger-typing-indicator */
|
|
@@ -1153,6 +1192,7 @@ export interface ClientEvents {
|
|
|
1153
1192
|
channelCreate: [channel: Channel];
|
|
1154
1193
|
channelUpdate: [channel: Channel];
|
|
1155
1194
|
channelDelete: [channel: Channel];
|
|
1195
|
+
channelInfo: [info: ChannelInfoEvent];
|
|
1156
1196
|
channelPinsUpdate: [pins: ChannelPinsUpdateEvent];
|
|
1157
1197
|
threadCreate: [thread: Channel];
|
|
1158
1198
|
threadUpdate: [thread: Channel];
|
|
@@ -1228,6 +1268,8 @@ export interface ClientEvents {
|
|
|
1228
1268
|
typingStart: [typing: TypingStartEvent];
|
|
1229
1269
|
userUpdate: [user: User];
|
|
1230
1270
|
voiceChannelEffectSend: [voiceEffect: VoiceChannelEffectSendEvent];
|
|
1271
|
+
voiceChannelStatusUpdate: [voiceChannel: VoiceChannelStatusUpdateEvent];
|
|
1272
|
+
voiceChannelStartTimeUpdate: [voiceChannel: VoiceChannelStartTimeUpdateEvent];
|
|
1231
1273
|
voiceStateUpdate: [voiceState: VoiceState];
|
|
1232
1274
|
voiceServerUpdate: [voiceServer: VoiceServerUpdateEvent];
|
|
1233
1275
|
webhooksUpdate: [channelId: snowflake, guildId: snowflake];
|
package/dist/lib/Client.js
CHANGED
|
@@ -652,6 +652,14 @@ class Client extends node_events_1.default {
|
|
|
652
652
|
layout_type: options.poll.layoutType,
|
|
653
653
|
}
|
|
654
654
|
: undefined,
|
|
655
|
+
shared_client_theme: options.sharedClientTheme !== undefined
|
|
656
|
+
? {
|
|
657
|
+
colors: options.sharedClientTheme.colors,
|
|
658
|
+
gradient_angle: options.sharedClientTheme.gradientAngle,
|
|
659
|
+
base_mix: options.sharedClientTheme.baseMix,
|
|
660
|
+
base_theme: options.sharedClientTheme.baseTheme,
|
|
661
|
+
}
|
|
662
|
+
: undefined,
|
|
655
663
|
},
|
|
656
664
|
files: options.files,
|
|
657
665
|
});
|
|
@@ -2474,6 +2482,45 @@ class Client extends node_events_1.default {
|
|
|
2474
2482
|
});
|
|
2475
2483
|
return response.map((guildMember) => transformers_1.Guilds.guildMemberFromRaw(guildMember));
|
|
2476
2484
|
}
|
|
2485
|
+
/** https://docs.discord.com/developers/resources/message#search-guild-messages */
|
|
2486
|
+
async searchGuildMessages(guildId, options) {
|
|
2487
|
+
const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildMessagesSearch(guildId), {
|
|
2488
|
+
query: {
|
|
2489
|
+
limit: options?.limit,
|
|
2490
|
+
offset: options?.offset,
|
|
2491
|
+
max_id: options?.maxId,
|
|
2492
|
+
min_id: options?.minId,
|
|
2493
|
+
slop: options?.slop,
|
|
2494
|
+
content: options?.content,
|
|
2495
|
+
channel_id: options?.channelId,
|
|
2496
|
+
author_type: options?.authorType,
|
|
2497
|
+
author_id: options?.authorId,
|
|
2498
|
+
mentions: options?.mentions,
|
|
2499
|
+
mentions_roles_id: options?.mentionsRolesId,
|
|
2500
|
+
mention_everyone: options?.mentionEveryone,
|
|
2501
|
+
replied_to_user_id: options?.repliedToUserId,
|
|
2502
|
+
replied_to_message_id: options?.repliedToMessageId,
|
|
2503
|
+
pinned: options?.pinned,
|
|
2504
|
+
has: options?.has,
|
|
2505
|
+
embed_type: options?.embedType,
|
|
2506
|
+
embed_provider: options?.embedProvider,
|
|
2507
|
+
link_hostname: options?.linkHostname,
|
|
2508
|
+
attachment_filename: options?.attachmentFilename,
|
|
2509
|
+
attachment_extension: options?.attachmentExtension,
|
|
2510
|
+
sort_by: options?.sortBy,
|
|
2511
|
+
sort_order: options?.sortOrder,
|
|
2512
|
+
include_nsfw: options?.includeNfsw,
|
|
2513
|
+
},
|
|
2514
|
+
});
|
|
2515
|
+
return {
|
|
2516
|
+
doingDeepHistoricalIndex: response.doing_deep_historical_index,
|
|
2517
|
+
documentsIndexed: response.documents_indexed,
|
|
2518
|
+
totalResults: response.total_results,
|
|
2519
|
+
messages: response.messages.map((message) => transformers_1.Messages.messageFromRaw(message)),
|
|
2520
|
+
threads: response.threads?.map((thread) => transformers_1.Channels.channelFromRaw(thread)),
|
|
2521
|
+
members: response.members?.map((member) => transformers_1.Channels.threadMemberFromRaw(member)),
|
|
2522
|
+
};
|
|
2523
|
+
}
|
|
2477
2524
|
/** https://discord.com/developers/docs/resources/soundboard#send-soundboard-sound */
|
|
2478
2525
|
sendSoundboardSound(channelId, options) {
|
|
2479
2526
|
this.rest.request(rest_1.RESTMethods.Post, rest_1.Endpoints.sendSoundboardSound(channelId), {
|
|
@@ -2487,6 +2534,13 @@ class Client extends node_events_1.default {
|
|
|
2487
2534
|
setPresence(options) {
|
|
2488
2535
|
this.shards.forEach((shard) => shard.transmitter.updatePresence(options));
|
|
2489
2536
|
}
|
|
2537
|
+
/** https://docs.discord.com/developers/resources/channel#set-voice-channel-status */
|
|
2538
|
+
setVoiceChannelStatus(channelId, options, reason) {
|
|
2539
|
+
this.rest.request(rest_1.RESTMethods.Put, rest_1.Endpoints.channelVoiceStatus(channelId), {
|
|
2540
|
+
json: options,
|
|
2541
|
+
reason,
|
|
2542
|
+
});
|
|
2543
|
+
}
|
|
2490
2544
|
/** https://discord.com/developers/docs/resources/guild-template#sync-guild-template */
|
|
2491
2545
|
async syncGuildTemplate(guildId, code) {
|
|
2492
2546
|
const response = await this.rest.request(rest_1.RESTMethods.Put, rest_1.Endpoints.guildTemplate(guildId, code));
|
package/dist/lib/constants.d.ts
CHANGED
|
@@ -138,7 +138,10 @@ export declare enum ComponentTypes {
|
|
|
138
138
|
Separator = 14,
|
|
139
139
|
Container = 17,
|
|
140
140
|
Label = 18,
|
|
141
|
-
FileUpload = 19
|
|
141
|
+
FileUpload = 19,
|
|
142
|
+
RadioGroup = 21,
|
|
143
|
+
CheckboxGroup = 22,
|
|
144
|
+
Checkbox = 23
|
|
142
145
|
}
|
|
143
146
|
/** https://discord.com/developers/docs/components/reference#button-button-styles */
|
|
144
147
|
export declare enum ButtonStyles {
|
|
@@ -159,6 +162,10 @@ export declare enum SeparatorSpacing {
|
|
|
159
162
|
Small = 1,
|
|
160
163
|
Large = 2
|
|
161
164
|
}
|
|
165
|
+
/** https://docs.discord.com/developers/components/reference#unfurled-media-item-unfurled-media-item-flags */
|
|
166
|
+
export declare enum UnfurledMediaItemFlags {
|
|
167
|
+
IsAnimated = 1
|
|
168
|
+
}
|
|
162
169
|
/** https://discord.com/developers/docs/resources/application#application-object-application-integration-types */
|
|
163
170
|
export declare enum ApplicationIntegrationTypes {
|
|
164
171
|
GuildInstall = 0,
|
|
@@ -267,7 +274,9 @@ export declare enum AuditLogEvents {
|
|
|
267
274
|
OnboardingCreate = 166,
|
|
268
275
|
OnboardingUpdate = 167,
|
|
269
276
|
HomeSettingsCreate = 190,
|
|
270
|
-
HomeSettingsUpdate = 191
|
|
277
|
+
HomeSettingsUpdate = 191,
|
|
278
|
+
VoiceChannelStatusUpdate = 192,
|
|
279
|
+
VoiceChannelStatusDelete = 193
|
|
271
280
|
}
|
|
272
281
|
/** https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-trigger-types */
|
|
273
282
|
export declare enum TriggerTypes {
|
|
@@ -611,9 +620,21 @@ export declare enum EmbedTypes {
|
|
|
611
620
|
Link = "link",
|
|
612
621
|
PollResult = "poll_result"
|
|
613
622
|
}
|
|
623
|
+
/** https://docs.discord.com/developers/resources/message#embed-object-embed-flags */
|
|
624
|
+
export declare enum EmbedFlags {
|
|
625
|
+
IsContentInventoryEntry = 32
|
|
626
|
+
}
|
|
627
|
+
/** https://docs.discord.com/developers/resources/message#embed-object-embed-media-flags */
|
|
628
|
+
export declare enum EmbedMediaFlags {
|
|
629
|
+
IsAnimated = 32
|
|
630
|
+
}
|
|
614
631
|
/** https://discord.com/developers/docs/resources/message#attachment-object-attachment-flags */
|
|
615
632
|
export declare enum AttachmentFlags {
|
|
616
|
-
|
|
633
|
+
IsClip = 1,
|
|
634
|
+
IsThumbnail = 2,
|
|
635
|
+
IsRemix = 4,
|
|
636
|
+
IsSpoiler = 8,
|
|
637
|
+
IsAnimated = 32
|
|
617
638
|
}
|
|
618
639
|
/** https://discord.com/developers/docs/resources/message#allowed-mentions-object-allowed-mention-types */
|
|
619
640
|
export declare enum AllowedMentionTypes {
|
|
@@ -621,6 +642,45 @@ export declare enum AllowedMentionTypes {
|
|
|
621
642
|
UserMentions = "users",
|
|
622
643
|
EveryoneMentions = "everyone"
|
|
623
644
|
}
|
|
645
|
+
/** https://docs.discord.com/developers/resources/message#base-theme-types */
|
|
646
|
+
export declare enum BaseThemeTypes {
|
|
647
|
+
Unset = 0,
|
|
648
|
+
Dark = 1,
|
|
649
|
+
Light = 2,
|
|
650
|
+
Darker = 3,
|
|
651
|
+
Midnight = 4
|
|
652
|
+
}
|
|
653
|
+
/** https://docs.discord.com/developers/resources/message#search-guild-messages-author-types */
|
|
654
|
+
export declare enum AuthorTypes {
|
|
655
|
+
User = "user",
|
|
656
|
+
Bot = "bot",
|
|
657
|
+
Webhook = "webhook"
|
|
658
|
+
}
|
|
659
|
+
/** https://docs.discord.com/developers/resources/message#search-guild-messages-search-has-types */
|
|
660
|
+
export declare enum SearchHasTypes {
|
|
661
|
+
Image = "image",
|
|
662
|
+
Sound = "sound",
|
|
663
|
+
Video = "video",
|
|
664
|
+
File = "file",
|
|
665
|
+
Sticker = "sticker",
|
|
666
|
+
Embed = "embed",
|
|
667
|
+
Link = "link",
|
|
668
|
+
Poll = "poll",
|
|
669
|
+
Snapshot = "snapshot"
|
|
670
|
+
}
|
|
671
|
+
/** https://docs.discord.com/developers/resources/message#search-guild-messages-search-embed-types */
|
|
672
|
+
export declare enum SearchEmbedTypes {
|
|
673
|
+
Image = "image",
|
|
674
|
+
Video = "video",
|
|
675
|
+
GIF = "gif",
|
|
676
|
+
Sound = "sound",
|
|
677
|
+
Article = "article"
|
|
678
|
+
}
|
|
679
|
+
/** https://docs.discord.com/developers/resources/message#search-guild-messages-search-sort-modes */
|
|
680
|
+
export declare enum SearchSortModes {
|
|
681
|
+
Timestamp = "timestamp",
|
|
682
|
+
Relevance = "relevance"
|
|
683
|
+
}
|
|
624
684
|
/** https://discord.com/developers/docs/resources/message#get-reactions-reaction-types */
|
|
625
685
|
export declare enum ReactionTypes {
|
|
626
686
|
Normal = 0,
|
|
@@ -772,6 +832,7 @@ export declare enum GatewayEvents {
|
|
|
772
832
|
ChannelCreate = "CHANNEL_CREATE",
|
|
773
833
|
ChannelUpdate = "CHANNEL_UPDATE",
|
|
774
834
|
ChannelDelete = "CHANNEL_DELETE",
|
|
835
|
+
ChannelInfo = "CHANNEL_INFO",
|
|
775
836
|
ChannelPinsUpdate = "CHANNEL_PINS_UPDATE",
|
|
776
837
|
ThreadCreate = "THREAD_CREATE",
|
|
777
838
|
ThreadUpdate = "THREAD_UPDATE",
|
|
@@ -832,6 +893,8 @@ export declare enum GatewayEvents {
|
|
|
832
893
|
TypingStart = "TYPING_START",
|
|
833
894
|
UserUpdate = "USER_UPDATE",
|
|
834
895
|
VoiceChannelEffectSend = "VOICE_CHANNEL_EFFECT_SEND",
|
|
896
|
+
VoiceChannelStartTimeUpdate = "VOICE_CHANNEL_START_TIME_UPDATE",
|
|
897
|
+
VoiceChannelStatusUpdate = "VOICE_CHANNEL_STATUS_UPDATE",
|
|
835
898
|
VoiceStateUpdate = "VOICE_STATE_UPDATE",
|
|
836
899
|
VoiceServerUpdate = "VOICE_SERVER_UPDATE",
|
|
837
900
|
WebhooksUpdate = "WEBHOOKS_UPDATE",
|
|
@@ -908,7 +971,8 @@ export declare enum GatewayOPCodes {
|
|
|
908
971
|
InvalidSession = 9,
|
|
909
972
|
Hello = 10,
|
|
910
973
|
HeartbeatACK = 11,
|
|
911
|
-
RequestSoundboardSounds = 31
|
|
974
|
+
RequestSoundboardSounds = 31,
|
|
975
|
+
RequestChannelInfo = 43
|
|
912
976
|
}
|
|
913
977
|
/** https://discord.com/developers/docs/topics/opcodes-and-status-codes#gateway-gateway-close-event-codes */
|
|
914
978
|
export declare enum GatewayCloseEventCodes {
|
|
@@ -955,7 +1019,10 @@ export declare enum VoiceCloseEventCodes {
|
|
|
955
1019
|
Disconnect = 4014,
|
|
956
1020
|
VoiceServerCrashed = 4015,
|
|
957
1021
|
UnknownEncryptionMode = 4016,
|
|
958
|
-
|
|
1022
|
+
ProtocolRequired = 4017,
|
|
1023
|
+
BadRequest = 4020,
|
|
1024
|
+
RateLimited = 4021,
|
|
1025
|
+
CallTerminated = 4022
|
|
959
1026
|
}
|
|
960
1027
|
/** https://discord.com/developers/docs/topics/opcodes-and-status-codes#http-http-response-codes */
|
|
961
1028
|
export declare enum HTTPResponseCodes {
|
|
@@ -1161,10 +1228,13 @@ export declare enum JSONErrorCodes {
|
|
|
1161
1228
|
YouCannotSendVoiceMessagesInThisChannel = 50173,
|
|
1162
1229
|
TheUserAccountMustFirstBeVerified = 50178,
|
|
1163
1230
|
TheProvidedFileDoesNotHaveAValidDuration = 50192,
|
|
1231
|
+
CannotSendMessagesToThisUserDueToHavingNoMutualGuilds = 50278,
|
|
1164
1232
|
YouDoNotHavePermissionToSendThisSticker = 50600,
|
|
1165
1233
|
TwoFactorAuthenticationIsRequired = 60003,
|
|
1166
1234
|
NoUsersWithDiscordTagExist = 80004,
|
|
1167
1235
|
ReactionWasBlocked = 90001,
|
|
1236
|
+
UserCannotUseBurstReactions = 90002,
|
|
1237
|
+
IndexNotYetAvailable = 110000,
|
|
1168
1238
|
ApplicationNotYetAvailable = 110001,
|
|
1169
1239
|
APIResourceOverloaded = 130000,
|
|
1170
1240
|
TheStageIsAlreadyOpen = 150006,
|
|
@@ -1173,6 +1243,7 @@ export declare enum JSONErrorCodes {
|
|
|
1173
1243
|
ThreadLocked = 160005,
|
|
1174
1244
|
MaximumActiveThreads = 160006,
|
|
1175
1245
|
MaximumActiveAnnouncementThreads = 160007,
|
|
1246
|
+
YouCannotForwardAMessageWhoseContentYouCannotRead = 160014,
|
|
1176
1247
|
InvalidJSONForUploadedLottieFile = 170001,
|
|
1177
1248
|
UploadedLottiesCannotContainRasterizedImages = 170002,
|
|
1178
1249
|
StickerMaximumFramerateExceeded = 170003,
|
|
@@ -1278,6 +1349,7 @@ export declare const BitwisePermissionFlags: {
|
|
|
1278
1349
|
readonly CreateEvents: bigint;
|
|
1279
1350
|
readonly UseExternalSounds: bigint;
|
|
1280
1351
|
readonly SendVoiceMessages: bigint;
|
|
1352
|
+
readonly SetVoiceChannelStatus: bigint;
|
|
1281
1353
|
readonly SendPolls: bigint;
|
|
1282
1354
|
readonly UseExternalApps: bigint;
|
|
1283
1355
|
readonly PinMessages: bigint;
|
package/dist/lib/constants.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.
|
|
3
|
+
exports.GuildScheduledEventRecurrenceRuleWeekday = exports.GuildScheduledEventRecurrenceRuleFrequency = exports.GuildScheduledEventStatus = exports.GuildScheduledEventEntityTypes = exports.GuildScheduledEventPrivacyLevel = exports.ImageWidgetStyleOptions = exports.PromptTypes = exports.OnboardingMode = exports.IntegrationExpireBehaviors = exports.GuildMemberFlags = exports.MutableGuildFeatures = exports.GuildFeatures = exports.SystemChannelFlags = exports.PremiumTier = exports.GuildNSFWLevel = exports.VerificationLevel = exports.MFALevel = exports.ExplicitContentFilterLevel = exports.DefaultMessageNotificationLevel = exports.ForumLayoutTypes = exports.SortOrderTypes = exports.ChannelFlags = exports.VideoQualityModes = exports.ChannelTypes = exports.ActionTypes = exports.EventTypes = exports.KeywordPresetTypes = exports.TriggerTypes = exports.AuditLogEvents = exports.ApplicationRoleConnectionMetadataType = exports.ActivityLocationKind = exports.ApplicationFlags = exports.ApplicationEventWebhookStatus = exports.ApplicationIntegrationTypes = exports.UnfurledMediaItemFlags = exports.SeparatorSpacing = exports.TextInputStyles = exports.ButtonStyles = exports.ComponentTypes = exports.InteractionCallbackType = exports.InteractionContextTypes = exports.InteractionType = exports.ApplicationCommandPermissionType = exports.EntryPointCommandHandlerTypes = exports.ApplicationCommandOptionType = exports.ApplicationCommandTypes = exports.Locales = exports.ImageFormats = exports.GuildNavigationTypes = exports.TimestampStyles = void 0;
|
|
4
|
+
exports.TeamMemberRoleTypes = exports.RoleFlags = exports.BitwisePermissionFlags = exports.RPCCloseEventCodes = exports.RPCErrorCodes = exports.JSONErrorCodes = exports.HTTPResponseCodes = exports.VoiceCloseEventCodes = exports.VoiceOPCodes = exports.GatewayCloseEventCodes = exports.GatewayOPCodes = exports.OAuth2Scopes = exports.AnimationTypes = exports.ActivityFlags = exports.ActivityType = exports.GatewayEvents = exports.StatusTypes = exports.GatewayIntents = exports.DeviceType = exports.WebhookTypes = exports.SubscriptionStatuses = exports.VisibilityTypes = exports.Services = exports.PremiumTypes = exports.UserFlags = exports.StickerFormatTypes = exports.StickerTypes = exports.PrivacyLevel = exports.LayoutType = exports.ReactionTypes = exports.SearchSortModes = exports.SearchEmbedTypes = exports.SearchHasTypes = exports.AuthorTypes = exports.BaseThemeTypes = exports.AllowedMentionTypes = exports.AttachmentFlags = exports.EmbedMediaFlags = exports.EmbedFlags = exports.EmbedTypes = exports.MessageReferenceTypes = exports.MessageFlags = exports.MessageActivityTypes = exports.MessageTypes = exports.LobbyMemberFlags = exports.InviteTargetUsersJobStatusErrorCodes = exports.GuildInviteFlags = exports.InviteTargetTypes = exports.InviteTypes = exports.GuildScheduledEventRecurrenceRuleMonth = void 0;
|
|
5
|
+
exports.EntitlementTypes = exports.SKUFlags = exports.SKUTypes = exports.MembershipState = void 0;
|
|
5
6
|
/** https://discord.com/developers/docs/reference#message-formatting-timestamp-styles */
|
|
6
7
|
var TimestampStyles;
|
|
7
8
|
(function (TimestampStyles) {
|
|
@@ -155,6 +156,9 @@ var ComponentTypes;
|
|
|
155
156
|
ComponentTypes[ComponentTypes["Container"] = 17] = "Container";
|
|
156
157
|
ComponentTypes[ComponentTypes["Label"] = 18] = "Label";
|
|
157
158
|
ComponentTypes[ComponentTypes["FileUpload"] = 19] = "FileUpload";
|
|
159
|
+
ComponentTypes[ComponentTypes["RadioGroup"] = 21] = "RadioGroup";
|
|
160
|
+
ComponentTypes[ComponentTypes["CheckboxGroup"] = 22] = "CheckboxGroup";
|
|
161
|
+
ComponentTypes[ComponentTypes["Checkbox"] = 23] = "Checkbox";
|
|
158
162
|
})(ComponentTypes || (exports.ComponentTypes = ComponentTypes = {}));
|
|
159
163
|
/** https://discord.com/developers/docs/components/reference#button-button-styles */
|
|
160
164
|
var ButtonStyles;
|
|
@@ -178,6 +182,11 @@ var SeparatorSpacing;
|
|
|
178
182
|
SeparatorSpacing[SeparatorSpacing["Small"] = 1] = "Small";
|
|
179
183
|
SeparatorSpacing[SeparatorSpacing["Large"] = 2] = "Large";
|
|
180
184
|
})(SeparatorSpacing || (exports.SeparatorSpacing = SeparatorSpacing = {}));
|
|
185
|
+
/** https://docs.discord.com/developers/components/reference#unfurled-media-item-unfurled-media-item-flags */
|
|
186
|
+
var UnfurledMediaItemFlags;
|
|
187
|
+
(function (UnfurledMediaItemFlags) {
|
|
188
|
+
UnfurledMediaItemFlags[UnfurledMediaItemFlags["IsAnimated"] = 1] = "IsAnimated";
|
|
189
|
+
})(UnfurledMediaItemFlags || (exports.UnfurledMediaItemFlags = UnfurledMediaItemFlags = {}));
|
|
181
190
|
/** https://discord.com/developers/docs/resources/application#application-object-application-integration-types */
|
|
182
191
|
var ApplicationIntegrationTypes;
|
|
183
192
|
(function (ApplicationIntegrationTypes) {
|
|
@@ -293,6 +302,8 @@ var AuditLogEvents;
|
|
|
293
302
|
AuditLogEvents[AuditLogEvents["OnboardingUpdate"] = 167] = "OnboardingUpdate";
|
|
294
303
|
AuditLogEvents[AuditLogEvents["HomeSettingsCreate"] = 190] = "HomeSettingsCreate";
|
|
295
304
|
AuditLogEvents[AuditLogEvents["HomeSettingsUpdate"] = 191] = "HomeSettingsUpdate";
|
|
305
|
+
AuditLogEvents[AuditLogEvents["VoiceChannelStatusUpdate"] = 192] = "VoiceChannelStatusUpdate";
|
|
306
|
+
AuditLogEvents[AuditLogEvents["VoiceChannelStatusDelete"] = 193] = "VoiceChannelStatusDelete";
|
|
296
307
|
})(AuditLogEvents || (exports.AuditLogEvents = AuditLogEvents = {}));
|
|
297
308
|
/** https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-trigger-types */
|
|
298
309
|
var TriggerTypes;
|
|
@@ -675,10 +686,24 @@ var EmbedTypes;
|
|
|
675
686
|
EmbedTypes["Link"] = "link";
|
|
676
687
|
EmbedTypes["PollResult"] = "poll_result";
|
|
677
688
|
})(EmbedTypes || (exports.EmbedTypes = EmbedTypes = {}));
|
|
689
|
+
/** https://docs.discord.com/developers/resources/message#embed-object-embed-flags */
|
|
690
|
+
var EmbedFlags;
|
|
691
|
+
(function (EmbedFlags) {
|
|
692
|
+
EmbedFlags[EmbedFlags["IsContentInventoryEntry"] = 32] = "IsContentInventoryEntry";
|
|
693
|
+
})(EmbedFlags || (exports.EmbedFlags = EmbedFlags = {}));
|
|
694
|
+
/** https://docs.discord.com/developers/resources/message#embed-object-embed-media-flags */
|
|
695
|
+
var EmbedMediaFlags;
|
|
696
|
+
(function (EmbedMediaFlags) {
|
|
697
|
+
EmbedMediaFlags[EmbedMediaFlags["IsAnimated"] = 32] = "IsAnimated";
|
|
698
|
+
})(EmbedMediaFlags || (exports.EmbedMediaFlags = EmbedMediaFlags = {}));
|
|
678
699
|
/** https://discord.com/developers/docs/resources/message#attachment-object-attachment-flags */
|
|
679
700
|
var AttachmentFlags;
|
|
680
701
|
(function (AttachmentFlags) {
|
|
702
|
+
AttachmentFlags[AttachmentFlags["IsClip"] = 1] = "IsClip";
|
|
703
|
+
AttachmentFlags[AttachmentFlags["IsThumbnail"] = 2] = "IsThumbnail";
|
|
681
704
|
AttachmentFlags[AttachmentFlags["IsRemix"] = 4] = "IsRemix";
|
|
705
|
+
AttachmentFlags[AttachmentFlags["IsSpoiler"] = 8] = "IsSpoiler";
|
|
706
|
+
AttachmentFlags[AttachmentFlags["IsAnimated"] = 32] = "IsAnimated";
|
|
682
707
|
})(AttachmentFlags || (exports.AttachmentFlags = AttachmentFlags = {}));
|
|
683
708
|
/** https://discord.com/developers/docs/resources/message#allowed-mentions-object-allowed-mention-types */
|
|
684
709
|
var AllowedMentionTypes;
|
|
@@ -687,6 +712,50 @@ var AllowedMentionTypes;
|
|
|
687
712
|
AllowedMentionTypes["UserMentions"] = "users";
|
|
688
713
|
AllowedMentionTypes["EveryoneMentions"] = "everyone";
|
|
689
714
|
})(AllowedMentionTypes || (exports.AllowedMentionTypes = AllowedMentionTypes = {}));
|
|
715
|
+
/** https://docs.discord.com/developers/resources/message#base-theme-types */
|
|
716
|
+
var BaseThemeTypes;
|
|
717
|
+
(function (BaseThemeTypes) {
|
|
718
|
+
BaseThemeTypes[BaseThemeTypes["Unset"] = 0] = "Unset";
|
|
719
|
+
BaseThemeTypes[BaseThemeTypes["Dark"] = 1] = "Dark";
|
|
720
|
+
BaseThemeTypes[BaseThemeTypes["Light"] = 2] = "Light";
|
|
721
|
+
BaseThemeTypes[BaseThemeTypes["Darker"] = 3] = "Darker";
|
|
722
|
+
BaseThemeTypes[BaseThemeTypes["Midnight"] = 4] = "Midnight";
|
|
723
|
+
})(BaseThemeTypes || (exports.BaseThemeTypes = BaseThemeTypes = {}));
|
|
724
|
+
/** https://docs.discord.com/developers/resources/message#search-guild-messages-author-types */
|
|
725
|
+
var AuthorTypes;
|
|
726
|
+
(function (AuthorTypes) {
|
|
727
|
+
AuthorTypes["User"] = "user";
|
|
728
|
+
AuthorTypes["Bot"] = "bot";
|
|
729
|
+
AuthorTypes["Webhook"] = "webhook";
|
|
730
|
+
})(AuthorTypes || (exports.AuthorTypes = AuthorTypes = {}));
|
|
731
|
+
/** https://docs.discord.com/developers/resources/message#search-guild-messages-search-has-types */
|
|
732
|
+
var SearchHasTypes;
|
|
733
|
+
(function (SearchHasTypes) {
|
|
734
|
+
SearchHasTypes["Image"] = "image";
|
|
735
|
+
SearchHasTypes["Sound"] = "sound";
|
|
736
|
+
SearchHasTypes["Video"] = "video";
|
|
737
|
+
SearchHasTypes["File"] = "file";
|
|
738
|
+
SearchHasTypes["Sticker"] = "sticker";
|
|
739
|
+
SearchHasTypes["Embed"] = "embed";
|
|
740
|
+
SearchHasTypes["Link"] = "link";
|
|
741
|
+
SearchHasTypes["Poll"] = "poll";
|
|
742
|
+
SearchHasTypes["Snapshot"] = "snapshot";
|
|
743
|
+
})(SearchHasTypes || (exports.SearchHasTypes = SearchHasTypes = {}));
|
|
744
|
+
/** https://docs.discord.com/developers/resources/message#search-guild-messages-search-embed-types */
|
|
745
|
+
var SearchEmbedTypes;
|
|
746
|
+
(function (SearchEmbedTypes) {
|
|
747
|
+
SearchEmbedTypes["Image"] = "image";
|
|
748
|
+
SearchEmbedTypes["Video"] = "video";
|
|
749
|
+
SearchEmbedTypes["GIF"] = "gif";
|
|
750
|
+
SearchEmbedTypes["Sound"] = "sound";
|
|
751
|
+
SearchEmbedTypes["Article"] = "article";
|
|
752
|
+
})(SearchEmbedTypes || (exports.SearchEmbedTypes = SearchEmbedTypes = {}));
|
|
753
|
+
/** https://docs.discord.com/developers/resources/message#search-guild-messages-search-sort-modes */
|
|
754
|
+
var SearchSortModes;
|
|
755
|
+
(function (SearchSortModes) {
|
|
756
|
+
SearchSortModes["Timestamp"] = "timestamp";
|
|
757
|
+
SearchSortModes["Relevance"] = "relevance";
|
|
758
|
+
})(SearchSortModes || (exports.SearchSortModes = SearchSortModes = {}));
|
|
690
759
|
/** https://discord.com/developers/docs/resources/message#get-reactions-reaction-types */
|
|
691
760
|
var ReactionTypes;
|
|
692
761
|
(function (ReactionTypes) {
|
|
@@ -853,6 +922,7 @@ var GatewayEvents;
|
|
|
853
922
|
GatewayEvents["ChannelCreate"] = "CHANNEL_CREATE";
|
|
854
923
|
GatewayEvents["ChannelUpdate"] = "CHANNEL_UPDATE";
|
|
855
924
|
GatewayEvents["ChannelDelete"] = "CHANNEL_DELETE";
|
|
925
|
+
GatewayEvents["ChannelInfo"] = "CHANNEL_INFO";
|
|
856
926
|
GatewayEvents["ChannelPinsUpdate"] = "CHANNEL_PINS_UPDATE";
|
|
857
927
|
GatewayEvents["ThreadCreate"] = "THREAD_CREATE";
|
|
858
928
|
GatewayEvents["ThreadUpdate"] = "THREAD_UPDATE";
|
|
@@ -913,6 +983,8 @@ var GatewayEvents;
|
|
|
913
983
|
GatewayEvents["TypingStart"] = "TYPING_START";
|
|
914
984
|
GatewayEvents["UserUpdate"] = "USER_UPDATE";
|
|
915
985
|
GatewayEvents["VoiceChannelEffectSend"] = "VOICE_CHANNEL_EFFECT_SEND";
|
|
986
|
+
GatewayEvents["VoiceChannelStartTimeUpdate"] = "VOICE_CHANNEL_START_TIME_UPDATE";
|
|
987
|
+
GatewayEvents["VoiceChannelStatusUpdate"] = "VOICE_CHANNEL_STATUS_UPDATE";
|
|
916
988
|
GatewayEvents["VoiceStateUpdate"] = "VOICE_STATE_UPDATE";
|
|
917
989
|
GatewayEvents["VoiceServerUpdate"] = "VOICE_SERVER_UPDATE";
|
|
918
990
|
GatewayEvents["WebhooksUpdate"] = "WEBHOOKS_UPDATE";
|
|
@@ -995,6 +1067,7 @@ var GatewayOPCodes;
|
|
|
995
1067
|
GatewayOPCodes[GatewayOPCodes["Hello"] = 10] = "Hello";
|
|
996
1068
|
GatewayOPCodes[GatewayOPCodes["HeartbeatACK"] = 11] = "HeartbeatACK";
|
|
997
1069
|
GatewayOPCodes[GatewayOPCodes["RequestSoundboardSounds"] = 31] = "RequestSoundboardSounds";
|
|
1070
|
+
GatewayOPCodes[GatewayOPCodes["RequestChannelInfo"] = 43] = "RequestChannelInfo";
|
|
998
1071
|
})(GatewayOPCodes || (exports.GatewayOPCodes = GatewayOPCodes = {}));
|
|
999
1072
|
/** https://discord.com/developers/docs/topics/opcodes-and-status-codes#gateway-gateway-close-event-codes */
|
|
1000
1073
|
var GatewayCloseEventCodes;
|
|
@@ -1044,7 +1117,10 @@ var VoiceCloseEventCodes;
|
|
|
1044
1117
|
VoiceCloseEventCodes[VoiceCloseEventCodes["Disconnect"] = 4014] = "Disconnect";
|
|
1045
1118
|
VoiceCloseEventCodes[VoiceCloseEventCodes["VoiceServerCrashed"] = 4015] = "VoiceServerCrashed";
|
|
1046
1119
|
VoiceCloseEventCodes[VoiceCloseEventCodes["UnknownEncryptionMode"] = 4016] = "UnknownEncryptionMode";
|
|
1120
|
+
VoiceCloseEventCodes[VoiceCloseEventCodes["ProtocolRequired"] = 4017] = "ProtocolRequired";
|
|
1047
1121
|
VoiceCloseEventCodes[VoiceCloseEventCodes["BadRequest"] = 4020] = "BadRequest";
|
|
1122
|
+
VoiceCloseEventCodes[VoiceCloseEventCodes["RateLimited"] = 4021] = "RateLimited";
|
|
1123
|
+
VoiceCloseEventCodes[VoiceCloseEventCodes["CallTerminated"] = 4022] = "CallTerminated";
|
|
1048
1124
|
})(VoiceCloseEventCodes || (exports.VoiceCloseEventCodes = VoiceCloseEventCodes = {}));
|
|
1049
1125
|
/** https://discord.com/developers/docs/topics/opcodes-and-status-codes#http-http-response-codes */
|
|
1050
1126
|
var HTTPResponseCodes;
|
|
@@ -1252,10 +1328,13 @@ var JSONErrorCodes;
|
|
|
1252
1328
|
JSONErrorCodes[JSONErrorCodes["YouCannotSendVoiceMessagesInThisChannel"] = 50173] = "YouCannotSendVoiceMessagesInThisChannel";
|
|
1253
1329
|
JSONErrorCodes[JSONErrorCodes["TheUserAccountMustFirstBeVerified"] = 50178] = "TheUserAccountMustFirstBeVerified";
|
|
1254
1330
|
JSONErrorCodes[JSONErrorCodes["TheProvidedFileDoesNotHaveAValidDuration"] = 50192] = "TheProvidedFileDoesNotHaveAValidDuration";
|
|
1331
|
+
JSONErrorCodes[JSONErrorCodes["CannotSendMessagesToThisUserDueToHavingNoMutualGuilds"] = 50278] = "CannotSendMessagesToThisUserDueToHavingNoMutualGuilds";
|
|
1255
1332
|
JSONErrorCodes[JSONErrorCodes["YouDoNotHavePermissionToSendThisSticker"] = 50600] = "YouDoNotHavePermissionToSendThisSticker";
|
|
1256
1333
|
JSONErrorCodes[JSONErrorCodes["TwoFactorAuthenticationIsRequired"] = 60003] = "TwoFactorAuthenticationIsRequired";
|
|
1257
1334
|
JSONErrorCodes[JSONErrorCodes["NoUsersWithDiscordTagExist"] = 80004] = "NoUsersWithDiscordTagExist";
|
|
1258
1335
|
JSONErrorCodes[JSONErrorCodes["ReactionWasBlocked"] = 90001] = "ReactionWasBlocked";
|
|
1336
|
+
JSONErrorCodes[JSONErrorCodes["UserCannotUseBurstReactions"] = 90002] = "UserCannotUseBurstReactions";
|
|
1337
|
+
JSONErrorCodes[JSONErrorCodes["IndexNotYetAvailable"] = 110000] = "IndexNotYetAvailable";
|
|
1259
1338
|
JSONErrorCodes[JSONErrorCodes["ApplicationNotYetAvailable"] = 110001] = "ApplicationNotYetAvailable";
|
|
1260
1339
|
JSONErrorCodes[JSONErrorCodes["APIResourceOverloaded"] = 130000] = "APIResourceOverloaded";
|
|
1261
1340
|
JSONErrorCodes[JSONErrorCodes["TheStageIsAlreadyOpen"] = 150006] = "TheStageIsAlreadyOpen";
|
|
@@ -1264,6 +1343,7 @@ var JSONErrorCodes;
|
|
|
1264
1343
|
JSONErrorCodes[JSONErrorCodes["ThreadLocked"] = 160005] = "ThreadLocked";
|
|
1265
1344
|
JSONErrorCodes[JSONErrorCodes["MaximumActiveThreads"] = 160006] = "MaximumActiveThreads";
|
|
1266
1345
|
JSONErrorCodes[JSONErrorCodes["MaximumActiveAnnouncementThreads"] = 160007] = "MaximumActiveAnnouncementThreads";
|
|
1346
|
+
JSONErrorCodes[JSONErrorCodes["YouCannotForwardAMessageWhoseContentYouCannotRead"] = 160014] = "YouCannotForwardAMessageWhoseContentYouCannotRead";
|
|
1267
1347
|
JSONErrorCodes[JSONErrorCodes["InvalidJSONForUploadedLottieFile"] = 170001] = "InvalidJSONForUploadedLottieFile";
|
|
1268
1348
|
JSONErrorCodes[JSONErrorCodes["UploadedLottiesCannotContainRasterizedImages"] = 170002] = "UploadedLottiesCannotContainRasterizedImages";
|
|
1269
1349
|
JSONErrorCodes[JSONErrorCodes["StickerMaximumFramerateExceeded"] = 170003] = "StickerMaximumFramerateExceeded";
|
|
@@ -1371,6 +1451,7 @@ exports.BitwisePermissionFlags = {
|
|
|
1371
1451
|
CreateEvents: 1n << 44n,
|
|
1372
1452
|
UseExternalSounds: 1n << 45n,
|
|
1373
1453
|
SendVoiceMessages: 1n << 46n,
|
|
1454
|
+
SetVoiceChannelStatus: 1n << 48n,
|
|
1374
1455
|
SendPolls: 1n << 49n,
|
|
1375
1456
|
UseExternalApps: 1n << 50n,
|
|
1376
1457
|
PinMessages: 1n << 51n,
|
|
@@ -4,7 +4,7 @@ import type { RawAuditLogEntry } from "../types/audit-log";
|
|
|
4
4
|
import type { RawAutoModerationRule } from "../types/auto-moderation";
|
|
5
5
|
import type { RawChannel, RawThreadMember } from "../types/channel";
|
|
6
6
|
import type { RawEntitlement } from "../types/entitlements";
|
|
7
|
-
import type { RawRateLimitedEvent, RawAutoModerationActionExecutionEvent, RawChannelPinsUpdateEvent, RawThreadListSyncEvent, RawThreadMemberUpdateEventExtra, RawThreadMembersUpdateEvent, RawGuildCreateEventExtra, RawGuildAuditLogEntryCreateExtra, RawGuildBanAddEvent, RawGuildBanRemoveEvent, RawGuildEmojisUpdateEvent, RawGuildStickersUpdateEvent, RawGuildIntegrationsUpdateEvent, RawGuildMemberAddEventExtra, RawGuildMemberRemoveEvent, RawGuildMemberUpdateEvent, RawGuildMembersChunkEvent, RawGuildRoleCreateEvent, RawGuildRoleUpdateEvent, RawGuildRoleDeleteEvent, RawGuildScheduledEventUserAddEvent, RawGuildScheduledEventUserRemoveEvent, RawGuildSoundboardSoundDeleteEvent, RawGuildSoundboardSoundsUpdateEvent, RawGuildSoundboardSoundsEvent, RawIntegrationCreateEventExtra, RawIntegrationUpdateEventExtra, RawIntegrationDeleteEvent, RawInviteCreateEvent, RawInviteDeleteEvent, RawMessageCreateEventExtra, RawMessageDeleteEvent, RawMessageDeleteBulkEvent, RawMessageReactionAddEvent, RawMessageReactionRemoveEvent, RawMessageReactionRemoveAllEvent, RawMessageReactionRemoveEmojiEvent, RawPresenceUpdateEvent, RawTypingStartEvent, RawVoiceChannelEffectSendEvent, RawVoiceServerUpdateEvent, RawWebhooksUpdateEvent, RawMessagePollVoteAddEvent, RawMessagePollVoteRemoveEvent, RawReadyEvent } from "../types/gateway-events";
|
|
7
|
+
import type { RawRateLimitedEvent, RawAutoModerationActionExecutionEvent, RawChannelPinsUpdateEvent, RawThreadListSyncEvent, RawThreadMemberUpdateEventExtra, RawThreadMembersUpdateEvent, RawGuildCreateEventExtra, RawGuildAuditLogEntryCreateExtra, RawGuildBanAddEvent, RawGuildBanRemoveEvent, RawGuildEmojisUpdateEvent, RawGuildStickersUpdateEvent, RawGuildIntegrationsUpdateEvent, RawGuildMemberAddEventExtra, RawGuildMemberRemoveEvent, RawGuildMemberUpdateEvent, RawGuildMembersChunkEvent, RawGuildRoleCreateEvent, RawGuildRoleUpdateEvent, RawGuildRoleDeleteEvent, RawGuildScheduledEventUserAddEvent, RawGuildScheduledEventUserRemoveEvent, RawGuildSoundboardSoundDeleteEvent, RawGuildSoundboardSoundsUpdateEvent, RawGuildSoundboardSoundsEvent, RawIntegrationCreateEventExtra, RawIntegrationUpdateEventExtra, RawIntegrationDeleteEvent, RawInviteCreateEvent, RawInviteDeleteEvent, RawMessageCreateEventExtra, RawMessageDeleteEvent, RawMessageDeleteBulkEvent, RawMessageReactionAddEvent, RawMessageReactionRemoveEvent, RawMessageReactionRemoveAllEvent, RawMessageReactionRemoveEmojiEvent, RawPresenceUpdateEvent, RawTypingStartEvent, RawVoiceChannelEffectSendEvent, RawVoiceServerUpdateEvent, RawWebhooksUpdateEvent, RawMessagePollVoteAddEvent, RawMessagePollVoteRemoveEvent, RawReadyEvent, RawChannelInfoEvent, RawVoiceChannelStatusUpdateEvent, RawVoiceChannelStartTimeUpdateEvent } from "../types/gateway-events";
|
|
8
8
|
import type { RawGuild, RawUnavailableGuild, RawGuildMember, RawIntegration } from "../types/guild";
|
|
9
9
|
import type { RawGuildScheduledEvent } from "../types/guild-scheduled-event";
|
|
10
10
|
import type { RawInteraction } from "../types/interaction";
|
|
@@ -36,6 +36,7 @@ export interface DispatchEvents {
|
|
|
36
36
|
[GatewayEvents.ChannelCreate]: RawChannel;
|
|
37
37
|
[GatewayEvents.ChannelUpdate]: RawChannel;
|
|
38
38
|
[GatewayEvents.ChannelDelete]: RawChannel;
|
|
39
|
+
[GatewayEvents.ChannelInfo]: RawChannelInfoEvent;
|
|
39
40
|
[GatewayEvents.ChannelPinsUpdate]: RawChannelPinsUpdateEvent;
|
|
40
41
|
[GatewayEvents.ThreadCreate]: RawChannel;
|
|
41
42
|
[GatewayEvents.ThreadUpdate]: RawChannel;
|
|
@@ -96,6 +97,8 @@ export interface DispatchEvents {
|
|
|
96
97
|
[GatewayEvents.TypingStart]: RawTypingStartEvent;
|
|
97
98
|
[GatewayEvents.UserUpdate]: RawUser;
|
|
98
99
|
[GatewayEvents.VoiceChannelEffectSend]: RawVoiceChannelEffectSendEvent;
|
|
100
|
+
[GatewayEvents.VoiceChannelStatusUpdate]: RawVoiceChannelStatusUpdateEvent;
|
|
101
|
+
[GatewayEvents.VoiceChannelStartTimeUpdate]: RawVoiceChannelStartTimeUpdateEvent;
|
|
99
102
|
[GatewayEvents.VoiceStateUpdate]: RawVoiceState;
|
|
100
103
|
[GatewayEvents.VoiceServerUpdate]: RawVoiceServerUpdateEvent;
|
|
101
104
|
[GatewayEvents.WebhooksUpdate]: RawWebhooksUpdateEvent;
|