chapterjs 0.1.2 → 0.1.4
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/dist/assets/asset.d.ts +46 -0
- package/dist/assets/asset.js +86 -0
- package/dist/assets/public.d.ts +19 -0
- package/dist/assets/public.js +120 -0
- package/dist/cache/cache.d.ts +62 -0
- package/dist/cache/cache.js +80 -0
- package/dist/cache/store.d.ts +45 -0
- package/dist/cache/store.js +53 -0
- package/dist/cli/build.d.ts +41 -0
- package/dist/cli/build.js +206 -0
- package/dist/cli/cli.js +108 -25
- package/dist/cli/cluster.d.ts +70 -0
- package/dist/cli/cluster.js +213 -0
- package/dist/cli/dev.d.ts +18 -1
- package/dist/cli/dev.js +252 -198
- package/dist/cli/env.d.ts +31 -0
- package/dist/cli/env.js +93 -0
- package/dist/cli/log.d.ts +13 -0
- package/dist/cli/log.js +17 -0
- package/dist/cli/node-version.d.ts +8 -0
- package/dist/cli/node-version.js +13 -0
- package/dist/cli/preflight.d.ts +36 -0
- package/dist/cli/preflight.js +122 -0
- package/dist/cli/project.d.ts +122 -0
- package/dist/cli/project.js +452 -0
- package/dist/cli/start.d.ts +25 -0
- package/dist/cli/start.js +225 -0
- package/dist/commands/autocomplete.d.ts +13 -0
- package/dist/commands/autocomplete.js +159 -0
- package/dist/commands/command.d.ts +346 -0
- package/dist/commands/command.js +28 -0
- package/dist/commands/convention.d.ts +64 -0
- package/dist/commands/convention.js +464 -0
- package/dist/commands/register.d.ts +18 -0
- package/dist/commands/register.js +42 -0
- package/dist/commands/router.d.ts +20 -0
- package/dist/commands/router.js +228 -0
- package/dist/commands/tree.d.ts +43 -0
- package/dist/commands/tree.js +206 -0
- package/dist/commands/twins.d.ts +15 -0
- package/dist/commands/twins.js +78 -0
- package/dist/components/button.d.ts +79 -0
- package/dist/components/button.js +108 -0
- package/dist/components/component.d.ts +140 -0
- package/dist/components/component.js +39 -0
- package/dist/components/convention.d.ts +35 -0
- package/dist/components/convention.js +339 -0
- package/dist/components/custom-id.d.ts +72 -0
- package/dist/components/custom-id.js +128 -0
- package/dist/components/embed.d.ts +28 -0
- package/dist/components/embed.js +11 -0
- package/dist/components/file.d.ts +30 -0
- package/dist/components/file.js +52 -0
- package/dist/components/instance.d.ts +100 -0
- package/dist/components/instance.js +86 -0
- package/dist/components/layout.d.ts +103 -0
- package/dist/components/layout.js +279 -0
- package/dist/components/modal.d.ts +244 -0
- package/dist/components/modal.js +399 -0
- package/dist/components/options.d.ts +41 -0
- package/dist/components/options.js +101 -0
- package/dist/components/render.d.ts +12 -0
- package/dist/components/render.js +58 -0
- package/dist/components/router.d.ts +18 -0
- package/dist/components/router.js +256 -0
- package/dist/components/select.d.ts +144 -0
- package/dist/components/select.js +179 -0
- package/dist/core/bot.d.ts +99 -0
- package/dist/core/bot.js +174 -0
- package/dist/core/memory.d.ts +66 -0
- package/dist/core/memory.js +115 -0
- package/dist/discord/api.d.ts +112 -0
- package/dist/discord/api.js +115 -0
- package/dist/discord/cdn.d.ts +67 -0
- package/dist/discord/cdn.js +100 -0
- package/dist/discord/codes.d.ts +171 -0
- package/dist/discord/codes.js +421 -0
- package/dist/discord/endpoint.d.ts +56 -0
- package/dist/discord/endpoint.js +53 -0
- package/dist/discord/endpoints.d.ts +1529 -0
- package/dist/discord/endpoints.js +1139 -0
- package/dist/discord/formatting.d.ts +67 -0
- package/dist/discord/formatting.js +87 -0
- package/dist/discord/index.d.ts +10 -0
- package/dist/discord/index.js +13 -0
- package/dist/discord/intents.d.ts +48 -0
- package/dist/discord/intents.js +128 -0
- package/dist/discord/permissions.d.ts +94 -0
- package/dist/discord/permissions.js +185 -0
- package/dist/discord/snowflake.d.ts +21 -0
- package/dist/discord/snowflake.js +36 -0
- package/dist/discord/types/application-command.d.ts +332 -0
- package/dist/discord/types/application-command.js +48 -0
- package/dist/discord/types/application-role-connection-metadata.d.ts +42 -0
- package/dist/discord/types/application-role-connection-metadata.js +22 -0
- package/dist/discord/types/application.d.ts +208 -0
- package/dist/discord/types/application.js +48 -0
- package/dist/discord/types/audit-log.d.ts +255 -0
- package/dist/discord/types/audit-log.js +144 -0
- package/dist/discord/types/auto-moderation.d.ts +167 -0
- package/dist/discord/types/auto-moderation.js +52 -0
- package/dist/discord/types/channel.d.ts +557 -0
- package/dist/discord/types/channel.js +88 -0
- package/dist/discord/types/common.d.ts +54 -0
- package/dist/discord/types/common.js +38 -0
- package/dist/discord/types/component.d.ts +775 -0
- package/dist/discord/types/component.js +76 -0
- package/dist/discord/types/emoji.d.ts +74 -0
- package/dist/discord/types/emoji.js +1 -0
- package/dist/discord/types/entitlement.d.ts +84 -0
- package/dist/discord/types/entitlement.js +22 -0
- package/dist/discord/types/gateway-events.d.ts +1148 -0
- package/dist/discord/types/gateway-events.js +54 -0
- package/dist/discord/types/gateway.d.ts +38 -0
- package/dist/discord/types/gateway.js +1 -0
- package/dist/discord/types/guild-scheduled-event.d.ts +257 -0
- package/dist/discord/types/guild-scheduled-event.js +68 -0
- package/dist/discord/types/guild-template.d.ts +51 -0
- package/dist/discord/types/guild-template.js +1 -0
- package/dist/discord/types/guild.d.ts +910 -0
- package/dist/discord/types/guild.js +153 -0
- package/dist/discord/types/index.d.ts +31 -0
- package/dist/discord/types/index.js +31 -0
- package/dist/discord/types/interaction.d.ts +321 -0
- package/dist/discord/types/interaction.js +47 -0
- package/dist/discord/types/invite.d.ts +158 -0
- package/dist/discord/types/invite.js +39 -0
- package/dist/discord/types/message.d.ts +834 -0
- package/dist/discord/types/message.js +159 -0
- package/dist/discord/types/oauth2.d.ts +22 -0
- package/dist/discord/types/oauth2.js +1 -0
- package/dist/discord/types/permissions.d.ts +183 -0
- package/dist/discord/types/permissions.js +118 -0
- package/dist/discord/types/poll.d.ts +106 -0
- package/dist/discord/types/poll.js +8 -0
- package/dist/discord/types/sku.d.ts +47 -0
- package/dist/discord/types/sku.js +26 -0
- package/dist/discord/types/soundboard.d.ts +71 -0
- package/dist/discord/types/soundboard.js +1 -0
- package/dist/discord/types/stage-instance.d.ts +58 -0
- package/dist/discord/types/stage-instance.js +10 -0
- package/dist/discord/types/sticker.d.ts +115 -0
- package/dist/discord/types/sticker.js +20 -0
- package/dist/discord/types/subscription.d.ts +54 -0
- package/dist/discord/types/subscription.js +12 -0
- package/dist/discord/types/team.d.ts +55 -0
- package/dist/discord/types/team.js +21 -0
- package/dist/discord/types/user.d.ts +273 -0
- package/dist/discord/types/user.js +83 -0
- package/dist/discord/types/voice.d.ts +72 -0
- package/dist/discord/types/voice.js +1 -0
- package/dist/discord/types/webhook.d.ts +184 -0
- package/dist/discord/types/webhook.js +12 -0
- package/dist/events/convention.d.ts +25 -0
- package/dist/events/convention.js +97 -0
- package/dist/events/event.d.ts +8 -0
- package/dist/events/event.js +20 -0
- package/dist/events/registry.d.ts +706 -0
- package/dist/events/registry.js +839 -0
- package/dist/events/router.d.ts +45 -0
- package/dist/events/router.js +133 -0
- package/dist/events/types.d.ts +7 -0
- package/dist/events/types.js +48 -0
- package/dist/gateway/errors.d.ts +18 -0
- package/dist/gateway/errors.js +47 -0
- package/dist/gateway/gateway.d.ts +64 -0
- package/dist/gateway/gateway.js +117 -0
- package/dist/gateway/identify-queue.d.ts +25 -0
- package/dist/gateway/identify-queue.js +29 -0
- package/dist/gateway/shard.d.ts +94 -0
- package/dist/gateway/shard.js +414 -0
- package/dist/gateway/state.d.ts +11 -0
- package/dist/gateway/state.js +184 -0
- package/dist/index.d.ts +55 -18
- package/dist/index.js +38 -12
- package/dist/interactions/cooldown.d.ts +33 -0
- package/dist/interactions/cooldown.js +74 -0
- package/dist/interactions/dispatch.d.ts +91 -0
- package/dist/interactions/dispatch.js +110 -0
- package/dist/loader/generated.d.ts +37 -0
- package/dist/loader/generated.js +114 -0
- package/dist/loader/hot.d.ts +13 -0
- package/dist/loader/hot.js +85 -0
- package/dist/loader/loader.d.ts +72 -0
- package/dist/loader/loader.js +135 -0
- package/dist/loader/locate.d.ts +10 -0
- package/dist/loader/locate.js +36 -0
- package/dist/loader/watch.d.ts +17 -0
- package/dist/loader/watch.js +66 -0
- package/dist/main.d.ts +3 -0
- package/dist/main.js +6 -0
- package/dist/messages/commands.d.ts +23 -0
- package/dist/messages/commands.js +123 -0
- package/dist/messages/convention.d.ts +89 -0
- package/dist/messages/convention.js +347 -0
- package/dist/messages/messages.d.ts +219 -0
- package/dist/messages/messages.js +30 -0
- package/dist/messages/phrases.d.ts +23 -0
- package/dist/messages/phrases.js +44 -0
- package/dist/messages/translate.d.ts +100 -0
- package/dist/messages/translate.js +249 -0
- package/dist/presence/convention.d.ts +26 -0
- package/dist/presence/convention.js +133 -0
- package/dist/presence/presence.d.ts +57 -0
- package/dist/presence/presence.js +27 -0
- package/dist/rest/errors.d.ts +55 -0
- package/dist/rest/errors.js +92 -0
- package/dist/rest/rate-limiter.d.ts +46 -0
- package/dist/rest/rate-limiter.js +153 -0
- package/dist/rest/rest.d.ts +63 -0
- package/dist/rest/rest.js +194 -0
- package/dist/structures/base.d.ts +48 -0
- package/dist/structures/base.js +84 -0
- package/dist/structures/channel.d.ts +380 -0
- package/dist/structures/channel.js +627 -0
- package/dist/structures/context.d.ts +30 -0
- package/dist/structures/context.js +7 -0
- package/dist/structures/emoji.d.ts +46 -0
- package/dist/structures/emoji.js +65 -0
- package/dist/structures/entities.d.ts +62 -0
- package/dist/structures/entities.js +226 -0
- package/dist/structures/guild.d.ts +348 -0
- package/dist/structures/guild.js +466 -0
- package/dist/structures/interaction.d.ts +197 -0
- package/dist/structures/interaction.js +396 -0
- package/dist/structures/invite.d.ts +38 -0
- package/dist/structures/invite.js +57 -0
- package/dist/structures/known.d.ts +28 -0
- package/dist/structures/known.js +58 -0
- package/dist/structures/member.d.ts +140 -0
- package/dist/structures/member.js +260 -0
- package/dist/structures/message.d.ts +197 -0
- package/dist/structures/message.js +268 -0
- package/dist/structures/payload.d.ts +91 -0
- package/dist/structures/payload.js +184 -0
- package/dist/structures/role.d.ts +69 -0
- package/dist/structures/role.js +112 -0
- package/dist/structures/user.d.ts +59 -0
- package/dist/structures/user.js +94 -0
- package/dist/structures/webhook.d.ts +46 -0
- package/dist/structures/webhook.js +79 -0
- package/dist/tasks/convention.d.ts +26 -0
- package/dist/tasks/convention.js +78 -0
- package/dist/tasks/schedule.d.ts +54 -0
- package/dist/tasks/schedule.js +236 -0
- package/dist/tasks/scheduler.d.ts +33 -0
- package/dist/tasks/scheduler.js +107 -0
- package/dist/tasks/task.d.ts +76 -0
- package/dist/tasks/task.js +28 -0
- package/dist/util/case.d.ts +13 -0
- package/dist/util/case.js +54 -0
- package/dist/util/duration.d.ts +8 -0
- package/dist/util/duration.js +29 -0
- package/dist/util/websocket.d.ts +9 -0
- package/dist/util/websocket.js +31 -0
- package/dist/voice/connection.d.ts +90 -0
- package/dist/voice/connection.js +494 -0
- package/dist/voice/dave.d.ts +109 -0
- package/dist/voice/dave.js +245 -0
- package/dist/voice/opus.d.ts +19 -0
- package/dist/voice/opus.js +273 -0
- package/dist/voice/session.d.ts +55 -0
- package/dist/voice/session.js +405 -0
- package/dist/voice/source.d.ts +22 -0
- package/dist/voice/source.js +195 -0
- package/dist/voice/transport.d.ts +43 -0
- package/dist/voice/transport.js +140 -0
- package/dist/voice/usage.d.ts +4 -0
- package/dist/voice/usage.js +33 -0
- package/package.json +26 -7
- package/vendor/dave/LICENSE +231 -0
- package/vendor/dave/libdave.d.mts +99 -0
- package/vendor/dave/libdave.mjs +2 -0
- package/vendor/dave/libdave.wasm +0 -0
- package/dist/components.d.ts +0 -97
- package/dist/components.js +0 -260
- package/dist/context.d.ts +0 -72
- package/dist/context.js +0 -273
- package/dist/discord/client.d.ts +0 -35
- package/dist/discord/client.js +0 -66
- package/dist/discord/constants.d.ts +0 -49
- package/dist/discord/constants.js +0 -61
- package/dist/discord/events.d.ts +0 -129
- package/dist/discord/events.js +0 -102
- package/dist/discord/gateway.d.ts +0 -61
- package/dist/discord/gateway.js +0 -320
- package/dist/discord/payloads.d.ts +0 -275
- package/dist/discord/payloads.js +0 -3
- package/dist/discord/presence.d.ts +0 -42
- package/dist/discord/presence.js +0 -51
- package/dist/discord/rest.d.ts +0 -49
- package/dist/discord/rest.js +0 -271
- package/dist/discord/types.d.ts +0 -334
- package/dist/discord/types.js +0 -4
- package/dist/events.d.ts +0 -94
- package/dist/events.js +0 -255
- package/dist/presence.d.ts +0 -92
- package/dist/presence.js +0 -250
- package/dist/structures/Channel.d.ts +0 -110
- package/dist/structures/Channel.js +0 -171
- package/dist/structures/Guild.d.ts +0 -70
- package/dist/structures/Guild.js +0 -105
- package/dist/structures/Interaction.d.ts +0 -113
- package/dist/structures/Interaction.js +0 -274
- package/dist/structures/Member.d.ts +0 -70
- package/dist/structures/Member.js +0 -124
- package/dist/structures/Message.d.ts +0 -87
- package/dist/structures/Message.js +0 -182
- package/dist/structures/Reaction.d.ts +0 -38
- package/dist/structures/Reaction.js +0 -64
- package/dist/structures/Role.d.ts +0 -43
- package/dist/structures/Role.js +0 -77
- package/dist/structures/User.d.ts +0 -41
- package/dist/structures/User.js +0 -79
- package/dist/structures/utils.d.ts +0 -72
- package/dist/structures/utils.js +0 -59
- package/dist/utils/errors.d.ts +0 -5
- package/dist/utils/errors.js +0 -28
- package/dist/utils/modules.d.ts +0 -39
- package/dist/utils/modules.js +0 -156
|
@@ -0,0 +1,1148 @@
|
|
|
1
|
+
import type { RawApplication } from './application.js';
|
|
2
|
+
import type { RawGuildApplicationCommandPermissions } from './application-command.js';
|
|
3
|
+
import type { RawAuditLogEntry } from './audit-log.js';
|
|
4
|
+
import type { AutoModerationTriggerType, RawAutoModerationAction, RawAutoModerationRule } from './auto-moderation.js';
|
|
5
|
+
import type { ChannelType, RawChannel, RawThreadMember } from './channel.js';
|
|
6
|
+
import type { ISO8601Timestamp, Snowflake } from './common.js';
|
|
7
|
+
import type { RawEmoji, RawPartialEmoji } from './emoji.js';
|
|
8
|
+
import type { RawEntitlement } from './entitlement.js';
|
|
9
|
+
import type { RawGuild, RawGuildMember, RawIntegration, RawUnavailableGuild } from './guild.js';
|
|
10
|
+
import type { RawGuildScheduledEvent } from './guild-scheduled-event.js';
|
|
11
|
+
import type { RawInteraction } from './interaction.js';
|
|
12
|
+
import type { InviteTargetType } from './invite.js';
|
|
13
|
+
import type { RawMessage, ReactionType } from './message.js';
|
|
14
|
+
import type { RawRole } from './permissions.js';
|
|
15
|
+
import type { RawSoundboardSound } from './soundboard.js';
|
|
16
|
+
import type { RawStageInstance } from './stage-instance.js';
|
|
17
|
+
import type { RawSticker } from './sticker.js';
|
|
18
|
+
import type { RawSubscription } from './subscription.js';
|
|
19
|
+
import type { RawAvatarDecorationData, RawCollectibles, RawUser } from './user.js';
|
|
20
|
+
import type { RawVoiceState } from './voice.js';
|
|
21
|
+
/**
|
|
22
|
+
* Payload Structure
|
|
23
|
+
* @see https://docs.discord.com/developers/events/gateway-events#payload-structure
|
|
24
|
+
*/
|
|
25
|
+
export interface RawGatewayPayload {
|
|
26
|
+
/** Gateway opcode, which indicates the payload type */
|
|
27
|
+
op: number;
|
|
28
|
+
/** Event data */
|
|
29
|
+
d: unknown;
|
|
30
|
+
/** Sequence number of event used for resuming sessions and heartbeating */
|
|
31
|
+
s: number | null;
|
|
32
|
+
/** Event name */
|
|
33
|
+
t: string | null;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Identify Structure
|
|
37
|
+
* @see https://docs.discord.com/developers/events/gateway-events#identify-identify-structure
|
|
38
|
+
*/
|
|
39
|
+
export interface RawIdentify {
|
|
40
|
+
/** Authentication token */
|
|
41
|
+
token: string;
|
|
42
|
+
/** Connection properties */
|
|
43
|
+
properties: RawIdentifyConnectionProperties;
|
|
44
|
+
/** Whether this connection supports compression of packets */
|
|
45
|
+
compress?: boolean;
|
|
46
|
+
/** Value between 50 and 250, total number of members where the gateway will stop sending offline members in the guild member list */
|
|
47
|
+
large_threshold?: number;
|
|
48
|
+
/** Used for Guild Sharding */
|
|
49
|
+
shard?: [number, number];
|
|
50
|
+
/** Presence structure for initial presence information */
|
|
51
|
+
presence?: RawGatewayPresenceUpdate;
|
|
52
|
+
/** Gateway Intents you wish to receive */
|
|
53
|
+
intents: number;
|
|
54
|
+
/** Bitfield representing capabilities of your gateway client */
|
|
55
|
+
capabilities?: number;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Gateway Capabilities
|
|
59
|
+
* @see https://docs.discord.com/developers/events/gateway-events#identify-gateway-capabilities
|
|
60
|
+
*/
|
|
61
|
+
export declare const GatewayCapabilities: {
|
|
62
|
+
/** Opts the client into receiving obfuscated channel metadata over the Gateway for channels it can't view */
|
|
63
|
+
readonly ChannelObfuscation: number;
|
|
64
|
+
};
|
|
65
|
+
export type GatewayCapabilities = (typeof GatewayCapabilities)[keyof typeof GatewayCapabilities];
|
|
66
|
+
/**
|
|
67
|
+
* Identify Connection Properties
|
|
68
|
+
* @see https://docs.discord.com/developers/events/gateway-events#identify-identify-connection-properties
|
|
69
|
+
*/
|
|
70
|
+
export interface RawIdentifyConnectionProperties {
|
|
71
|
+
/** Your operating system */
|
|
72
|
+
os: string;
|
|
73
|
+
/** Your library name */
|
|
74
|
+
browser: string;
|
|
75
|
+
/** Your library name */
|
|
76
|
+
device: string;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Resume Structure
|
|
80
|
+
* @see https://docs.discord.com/developers/events/gateway-events#resume-resume-structure
|
|
81
|
+
*/
|
|
82
|
+
export interface RawResume {
|
|
83
|
+
/** Session token */
|
|
84
|
+
token: string;
|
|
85
|
+
/** Session ID */
|
|
86
|
+
session_id: string;
|
|
87
|
+
/** Last sequence number received */
|
|
88
|
+
seq: number;
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Request Guild Members Structure
|
|
92
|
+
* @see https://docs.discord.com/developers/events/gateway-events#request-guild-members-request-guild-members-structure
|
|
93
|
+
*/
|
|
94
|
+
export interface RawRequestGuildMembers {
|
|
95
|
+
/** ID of the guild to get members for */
|
|
96
|
+
guild_id: Snowflake;
|
|
97
|
+
/** string that username starts with, or an empty string to return all members */
|
|
98
|
+
query?: string;
|
|
99
|
+
/** maximum number of members to send matching the `query`; a limit of `0` can be used with an empty string `query` to return all members */
|
|
100
|
+
limit: number;
|
|
101
|
+
/** used to specify if we want the presences of the matched members */
|
|
102
|
+
presences?: boolean;
|
|
103
|
+
/** used to specify which users you wish to fetch */
|
|
104
|
+
user_ids?: Snowflake | Snowflake[];
|
|
105
|
+
/** nonce to identify the Guild Members Chunk response */
|
|
106
|
+
nonce?: string;
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* Request Soundboard Sounds Structure
|
|
110
|
+
* @see https://docs.discord.com/developers/events/gateway-events#request-soundboard-sounds-request-soundboard-sounds-structure
|
|
111
|
+
*/
|
|
112
|
+
export interface RawRequestSoundboardSounds {
|
|
113
|
+
/** IDs of the guilds to get soundboard sounds for */
|
|
114
|
+
guild_ids: Snowflake[];
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Request Channel Info Structure
|
|
118
|
+
* @see https://docs.discord.com/developers/events/gateway-events#request-channel-info-request-channel-info-structure
|
|
119
|
+
*/
|
|
120
|
+
export interface RawRequestChannelInfo {
|
|
121
|
+
/** The guild id to request channel info for */
|
|
122
|
+
guild_id: Snowflake;
|
|
123
|
+
/** The fields to request. The current available fields are `status` and `voice_start_time`. */
|
|
124
|
+
fields: string[];
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Gateway Voice State Update Structure
|
|
128
|
+
* @see https://docs.discord.com/developers/events/gateway-events#update-voice-state-gateway-voice-state-update-structure
|
|
129
|
+
*/
|
|
130
|
+
export interface RawGatewayVoiceStateUpdate {
|
|
131
|
+
/** ID of the guild */
|
|
132
|
+
guild_id: Snowflake;
|
|
133
|
+
/** ID of the voice channel client wants to join (null if disconnecting) */
|
|
134
|
+
channel_id: Snowflake | null;
|
|
135
|
+
/** Whether the client is muted */
|
|
136
|
+
self_mute: boolean;
|
|
137
|
+
/** Whether the client deafened */
|
|
138
|
+
self_deaf: boolean;
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* Gateway Presence Update Structure
|
|
142
|
+
* @see https://docs.discord.com/developers/events/gateway-events#update-presence-gateway-presence-update-structure
|
|
143
|
+
*/
|
|
144
|
+
export interface RawGatewayPresenceUpdate {
|
|
145
|
+
/** Unix time (in milliseconds) of when the client went idle, or null if the client is not idle */
|
|
146
|
+
since: number | null;
|
|
147
|
+
/** User's activities */
|
|
148
|
+
activities: RawBotActivity[];
|
|
149
|
+
/** User's new status */
|
|
150
|
+
status: PresenceStatus;
|
|
151
|
+
/** Whether or not the client is afk */
|
|
152
|
+
afk: boolean;
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* Hello Structure
|
|
156
|
+
* @see https://docs.discord.com/developers/events/gateway-events#hello-hello-structure
|
|
157
|
+
*/
|
|
158
|
+
export interface RawHello {
|
|
159
|
+
/** Interval (in milliseconds) an app should heartbeat with */
|
|
160
|
+
heartbeat_interval: number;
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* Ready Event Fields
|
|
164
|
+
* @see https://docs.discord.com/developers/events/gateway-events#ready-ready-event-fields
|
|
165
|
+
*/
|
|
166
|
+
export interface RawReadyEvent {
|
|
167
|
+
/** API version */
|
|
168
|
+
v: number;
|
|
169
|
+
/** Information about the user including email */
|
|
170
|
+
user: RawUser;
|
|
171
|
+
/** Guilds the user is in. When sharding is used they are filtered to that shard. */
|
|
172
|
+
guilds: RawUnavailableGuild[];
|
|
173
|
+
/** Used for resuming connections */
|
|
174
|
+
session_id: string;
|
|
175
|
+
/** Gateway URL for resuming connections */
|
|
176
|
+
resume_gateway_url: string;
|
|
177
|
+
/** Shard information associated with this session, if sent when identifying */
|
|
178
|
+
shard?: [number, number];
|
|
179
|
+
/** Contains `id`, `flags`, and `flags_new` */
|
|
180
|
+
application: Partial<RawApplication>;
|
|
181
|
+
}
|
|
182
|
+
/**
|
|
183
|
+
* Auto Moderation Action Execution Event Fields
|
|
184
|
+
* @see https://docs.discord.com/developers/events/gateway-events#auto-moderation-action-execution-auto-moderation-action-execution-event-fields
|
|
185
|
+
*/
|
|
186
|
+
export interface RawAutoModerationActionExecutionEvent {
|
|
187
|
+
/** ID of the guild in which action was executed */
|
|
188
|
+
guild_id: Snowflake;
|
|
189
|
+
/** Action which was executed */
|
|
190
|
+
action: RawAutoModerationAction;
|
|
191
|
+
/** ID of the rule which action belongs to */
|
|
192
|
+
rule_id: Snowflake;
|
|
193
|
+
/** Trigger type of rule which was triggered */
|
|
194
|
+
rule_trigger_type: AutoModerationTriggerType;
|
|
195
|
+
/** ID of the user which generated the content which triggered the rule */
|
|
196
|
+
user_id: Snowflake;
|
|
197
|
+
/** ID of the channel in which user content was posted */
|
|
198
|
+
channel_id?: Snowflake;
|
|
199
|
+
/** ID of any user message which content belongs to * */
|
|
200
|
+
message_id?: Snowflake;
|
|
201
|
+
/** ID of any system auto moderation messages posted as a result of this action ** */
|
|
202
|
+
alert_system_message_id?: Snowflake;
|
|
203
|
+
/** User-generated text content */
|
|
204
|
+
content: string;
|
|
205
|
+
/** Word or phrase configured in the rule that triggered the rule */
|
|
206
|
+
matched_keyword: string | null;
|
|
207
|
+
/** Substring in content that triggered the rule */
|
|
208
|
+
matched_content: string | null;
|
|
209
|
+
}
|
|
210
|
+
/**
|
|
211
|
+
* Channel Info Structure
|
|
212
|
+
* @see https://docs.discord.com/developers/events/gateway-events#channel-info-channel-info-structure
|
|
213
|
+
*/
|
|
214
|
+
export interface RawChannelInfoEvent {
|
|
215
|
+
/** The guild id */
|
|
216
|
+
guild_id: Snowflake;
|
|
217
|
+
/** Ephemeral data for channels in the guild */
|
|
218
|
+
channels: RawChannelInfoChannel[];
|
|
219
|
+
}
|
|
220
|
+
/**
|
|
221
|
+
* Channel Info Channel Structure
|
|
222
|
+
* @see https://docs.discord.com/developers/events/gateway-events#channel-info-channel-info-channel-structure
|
|
223
|
+
*/
|
|
224
|
+
export interface RawChannelInfoChannel {
|
|
225
|
+
/** The channel id */
|
|
226
|
+
id: Snowflake;
|
|
227
|
+
/** The voice channel status */
|
|
228
|
+
status?: string | null;
|
|
229
|
+
/** Unix timestamp (in seconds) of when the voice session started */
|
|
230
|
+
voice_start_time?: number | null;
|
|
231
|
+
}
|
|
232
|
+
/**
|
|
233
|
+
* Voice Channel Status Update
|
|
234
|
+
* @see https://docs.discord.com/developers/events/gateway-events#voice-channel-status-update
|
|
235
|
+
*/
|
|
236
|
+
export interface RawVoiceChannelStatusUpdateEvent {
|
|
237
|
+
/** The channel id */
|
|
238
|
+
id: Snowflake;
|
|
239
|
+
/** The guild id */
|
|
240
|
+
guild_id: Snowflake;
|
|
241
|
+
/** The new voice channel status */
|
|
242
|
+
status: string | null;
|
|
243
|
+
}
|
|
244
|
+
/**
|
|
245
|
+
* Voice Channel Start Time Update
|
|
246
|
+
* @see https://docs.discord.com/developers/events/gateway-events#voice-channel-start-time-update
|
|
247
|
+
*/
|
|
248
|
+
export interface RawVoiceChannelStartTimeUpdateEvent {
|
|
249
|
+
/** The channel id */
|
|
250
|
+
id: Snowflake;
|
|
251
|
+
/** The guild id */
|
|
252
|
+
guild_id: Snowflake;
|
|
253
|
+
/** Unix timestamp (in seconds) of when the voice session started */
|
|
254
|
+
voice_start_time?: number | null;
|
|
255
|
+
}
|
|
256
|
+
/**
|
|
257
|
+
* Thread List Sync Event Fields
|
|
258
|
+
* @see https://docs.discord.com/developers/events/gateway-events#thread-list-sync-thread-list-sync-event-fields
|
|
259
|
+
*/
|
|
260
|
+
export interface RawThreadListSyncEvent {
|
|
261
|
+
/** ID of the guild */
|
|
262
|
+
guild_id: Snowflake;
|
|
263
|
+
/** Parent channel IDs whose threads are being synced. If omitted, then threads were synced for the entire guild. This array may contain channel_ids that have no active threads as well, so you know to clear that data. */
|
|
264
|
+
channel_ids?: Snowflake[];
|
|
265
|
+
/** All active threads in the given channels that the current user can access */
|
|
266
|
+
threads: RawChannel[];
|
|
267
|
+
/** All thread member objects from the synced threads for the current user, indicating which threads the current user has been added to */
|
|
268
|
+
members: RawThreadMember[];
|
|
269
|
+
}
|
|
270
|
+
/**
|
|
271
|
+
* Thread Member Update Event Extra Fields
|
|
272
|
+
* @see https://docs.discord.com/developers/events/gateway-events#thread-member-update-thread-member-update-event-extra-fields
|
|
273
|
+
*/
|
|
274
|
+
export interface RawThreadMemberUpdateExtra {
|
|
275
|
+
/** ID of the guild */
|
|
276
|
+
guild_id: Snowflake;
|
|
277
|
+
}
|
|
278
|
+
/**
|
|
279
|
+
* Thread Members Update Event Fields
|
|
280
|
+
* @see https://docs.discord.com/developers/events/gateway-events#thread-members-update-thread-members-update-event-fields
|
|
281
|
+
*/
|
|
282
|
+
export interface RawThreadMembersUpdateEvent {
|
|
283
|
+
/** ID of the thread */
|
|
284
|
+
id: Snowflake;
|
|
285
|
+
/** ID of the guild */
|
|
286
|
+
guild_id: Snowflake;
|
|
287
|
+
/** Approximate number of members in the thread, capped at 50 */
|
|
288
|
+
member_count: number;
|
|
289
|
+
/** Users who were added to the thread */
|
|
290
|
+
added_members?: RawThreadMember[];
|
|
291
|
+
/** ID of the users who were removed from the thread */
|
|
292
|
+
removed_member_ids?: Snowflake[];
|
|
293
|
+
}
|
|
294
|
+
/**
|
|
295
|
+
* Channel Pins Update Event Fields
|
|
296
|
+
* @see https://docs.discord.com/developers/events/gateway-events#channel-pins-update-channel-pins-update-event-fields
|
|
297
|
+
*/
|
|
298
|
+
export interface RawChannelPinsUpdateEvent {
|
|
299
|
+
/** ID of the guild */
|
|
300
|
+
guild_id?: Snowflake;
|
|
301
|
+
/** ID of the channel */
|
|
302
|
+
channel_id: Snowflake;
|
|
303
|
+
/** Time at which the most recent pinned message was pinned */
|
|
304
|
+
last_pin_timestamp?: ISO8601Timestamp | null;
|
|
305
|
+
}
|
|
306
|
+
/**
|
|
307
|
+
* Guild Create Extra Fields
|
|
308
|
+
* @see https://docs.discord.com/developers/events/gateway-events#guild-create-guild-create-extra-fields
|
|
309
|
+
*/
|
|
310
|
+
export interface RawGuildCreateExtra {
|
|
311
|
+
/** When this guild was joined at */
|
|
312
|
+
joined_at: ISO8601Timestamp;
|
|
313
|
+
/** `true` if this is considered a large guild */
|
|
314
|
+
large: boolean;
|
|
315
|
+
/** `true` if this guild is unavailable due to an outage */
|
|
316
|
+
unavailable?: boolean;
|
|
317
|
+
/** Total number of members in this guild */
|
|
318
|
+
member_count: number;
|
|
319
|
+
/** States of members currently in voice channels; lacks the `guild_id` key */
|
|
320
|
+
voice_states: Partial<RawVoiceState>[];
|
|
321
|
+
/** Users in the guild */
|
|
322
|
+
members: RawGuildMember[];
|
|
323
|
+
/** Channels in the guild */
|
|
324
|
+
channels: RawChannel[];
|
|
325
|
+
/** All active threads in the guild that current user has permission to view */
|
|
326
|
+
threads: RawChannel[];
|
|
327
|
+
/** Presences of the members in the guild, will only include non-offline members if the size is greater than `large threshold` */
|
|
328
|
+
presences: Partial<RawPresenceUpdateEvent>[];
|
|
329
|
+
/** Stage instances in the guild */
|
|
330
|
+
stage_instances: RawStageInstance[];
|
|
331
|
+
/** Scheduled events in the guild */
|
|
332
|
+
guild_scheduled_events: RawGuildScheduledEvent[];
|
|
333
|
+
/** Soundboard sounds in the guild */
|
|
334
|
+
soundboard_sounds: RawSoundboardSound[];
|
|
335
|
+
}
|
|
336
|
+
/**
|
|
337
|
+
* Guild Audit Log Entry Create Event Extra Fields
|
|
338
|
+
* @see https://docs.discord.com/developers/events/gateway-events#guild-audit-log-entry-create-guild-audit-log-entry-create-event-extra-fields
|
|
339
|
+
*/
|
|
340
|
+
export interface RawGuildAuditLogEntryCreateExtra {
|
|
341
|
+
/** ID of the guild */
|
|
342
|
+
guild_id: Snowflake;
|
|
343
|
+
}
|
|
344
|
+
/**
|
|
345
|
+
* Guild Ban Add Event Fields
|
|
346
|
+
* @see https://docs.discord.com/developers/events/gateway-events#guild-ban-add-guild-ban-add-event-fields
|
|
347
|
+
*/
|
|
348
|
+
export interface RawGuildBanAddEvent {
|
|
349
|
+
/** ID of the guild */
|
|
350
|
+
guild_id: Snowflake;
|
|
351
|
+
/** User who was banned */
|
|
352
|
+
user: RawUser;
|
|
353
|
+
}
|
|
354
|
+
/**
|
|
355
|
+
* Guild Ban Remove Event Fields
|
|
356
|
+
* @see https://docs.discord.com/developers/events/gateway-events#guild-ban-remove-guild-ban-remove-event-fields
|
|
357
|
+
*/
|
|
358
|
+
export interface RawGuildBanRemoveEvent {
|
|
359
|
+
/** ID of the guild */
|
|
360
|
+
guild_id: Snowflake;
|
|
361
|
+
/** User who was unbanned */
|
|
362
|
+
user: RawUser;
|
|
363
|
+
}
|
|
364
|
+
/**
|
|
365
|
+
* Guild Emojis Update Event Fields
|
|
366
|
+
* @see https://docs.discord.com/developers/events/gateway-events#guild-emojis-update-guild-emojis-update-event-fields
|
|
367
|
+
*/
|
|
368
|
+
export interface RawGuildEmojisUpdateEvent {
|
|
369
|
+
/** ID of the guild */
|
|
370
|
+
guild_id: Snowflake;
|
|
371
|
+
/** Array of emojis */
|
|
372
|
+
emojis: RawEmoji[];
|
|
373
|
+
}
|
|
374
|
+
/**
|
|
375
|
+
* Guild Stickers Update Event Fields
|
|
376
|
+
* @see https://docs.discord.com/developers/events/gateway-events#guild-stickers-update-guild-stickers-update-event-fields
|
|
377
|
+
*/
|
|
378
|
+
export interface RawGuildStickersUpdateEvent {
|
|
379
|
+
/** ID of the guild */
|
|
380
|
+
guild_id: Snowflake;
|
|
381
|
+
/** Array of stickers */
|
|
382
|
+
stickers: RawSticker[];
|
|
383
|
+
}
|
|
384
|
+
/**
|
|
385
|
+
* Guild Integrations Update Event Fields
|
|
386
|
+
* @see https://docs.discord.com/developers/events/gateway-events#guild-integrations-update-guild-integrations-update-event-fields
|
|
387
|
+
*/
|
|
388
|
+
export interface RawGuildIntegrationsUpdateEvent {
|
|
389
|
+
/** ID of the guild whose integrations were updated */
|
|
390
|
+
guild_id: Snowflake;
|
|
391
|
+
}
|
|
392
|
+
/**
|
|
393
|
+
* Guild Member Add Extra Fields
|
|
394
|
+
* @see https://docs.discord.com/developers/events/gateway-events#guild-member-add-guild-member-add-extra-fields
|
|
395
|
+
*/
|
|
396
|
+
export interface RawGuildMemberAddExtra {
|
|
397
|
+
/** ID of the guild */
|
|
398
|
+
guild_id: Snowflake;
|
|
399
|
+
}
|
|
400
|
+
/**
|
|
401
|
+
* Guild Member Remove Event Fields
|
|
402
|
+
* @see https://docs.discord.com/developers/events/gateway-events#guild-member-remove-guild-member-remove-event-fields
|
|
403
|
+
*/
|
|
404
|
+
export interface RawGuildMemberRemoveEvent {
|
|
405
|
+
/** ID of the guild */
|
|
406
|
+
guild_id: Snowflake;
|
|
407
|
+
/** User who was removed */
|
|
408
|
+
user: RawUser;
|
|
409
|
+
}
|
|
410
|
+
/**
|
|
411
|
+
* Guild Member Update Event Fields
|
|
412
|
+
* @see https://docs.discord.com/developers/events/gateway-events#guild-member-update-guild-member-update-event-fields
|
|
413
|
+
*/
|
|
414
|
+
export interface RawGuildMemberUpdateEvent {
|
|
415
|
+
/** ID of the guild */
|
|
416
|
+
guild_id: Snowflake;
|
|
417
|
+
/** User role ids */
|
|
418
|
+
roles: Snowflake[];
|
|
419
|
+
/** User */
|
|
420
|
+
user: RawUser;
|
|
421
|
+
/** Nickname of the user in the guild */
|
|
422
|
+
nick?: string | null;
|
|
423
|
+
/** Member's guild avatar hash */
|
|
424
|
+
avatar: string | null;
|
|
425
|
+
/** Member's guild banner hash */
|
|
426
|
+
banner: string | null;
|
|
427
|
+
/** When the user joined the guild */
|
|
428
|
+
joined_at: ISO8601Timestamp | null;
|
|
429
|
+
/** When the user starting boosting the guild */
|
|
430
|
+
premium_since?: ISO8601Timestamp | null;
|
|
431
|
+
/** Whether the user is deafened in voice channels */
|
|
432
|
+
deaf?: boolean;
|
|
433
|
+
/** Whether the user is muted in voice channels */
|
|
434
|
+
mute?: boolean;
|
|
435
|
+
/** Whether the user has not yet passed the guild's Membership Screening requirements */
|
|
436
|
+
pending?: boolean;
|
|
437
|
+
/** When the user's timeout will expire and the user will be able to communicate in the guild again, null or a time in the past if the user is not timed out */
|
|
438
|
+
communication_disabled_until?: ISO8601Timestamp | null;
|
|
439
|
+
/** Data for the member's guild avatar decoration */
|
|
440
|
+
avatar_decoration_data?: RawAvatarDecorationData | null;
|
|
441
|
+
/** data for the member's collectibles */
|
|
442
|
+
collectibles?: RawCollectibles | null;
|
|
443
|
+
}
|
|
444
|
+
/**
|
|
445
|
+
* Guild Members Chunk Event Fields
|
|
446
|
+
* @see https://docs.discord.com/developers/events/gateway-events#guild-members-chunk-guild-members-chunk-event-fields
|
|
447
|
+
*/
|
|
448
|
+
export interface RawGuildMembersChunkEvent {
|
|
449
|
+
/** ID of the guild */
|
|
450
|
+
guild_id: Snowflake;
|
|
451
|
+
/** Set of guild members */
|
|
452
|
+
members: RawGuildMember[];
|
|
453
|
+
/** Chunk index in the expected chunks for this response (`0 <= chunk_index < chunk_count`) */
|
|
454
|
+
chunk_index: number;
|
|
455
|
+
/** Total number of expected chunks for this response */
|
|
456
|
+
chunk_count: number;
|
|
457
|
+
/** When passing an invalid ID to `REQUEST_GUILD_MEMBERS`, it will be returned here */
|
|
458
|
+
not_found?: Snowflake[];
|
|
459
|
+
/** When passing `true` to `REQUEST_GUILD_MEMBERS`, presences of the returned members will be here */
|
|
460
|
+
presences?: RawPresenceUpdateEvent[];
|
|
461
|
+
/** Nonce used in the Guild Members Request */
|
|
462
|
+
nonce?: string;
|
|
463
|
+
}
|
|
464
|
+
/**
|
|
465
|
+
* Guild Role Create Event Fields
|
|
466
|
+
* @see https://docs.discord.com/developers/events/gateway-events#guild-role-create-guild-role-create-event-fields
|
|
467
|
+
*/
|
|
468
|
+
export interface RawGuildRoleCreateEvent {
|
|
469
|
+
/** ID of the guild */
|
|
470
|
+
guild_id: Snowflake;
|
|
471
|
+
/** Role that was created */
|
|
472
|
+
role: RawRole;
|
|
473
|
+
}
|
|
474
|
+
/**
|
|
475
|
+
* Guild Role Update Event Fields
|
|
476
|
+
* @see https://docs.discord.com/developers/events/gateway-events#guild-role-update-guild-role-update-event-fields
|
|
477
|
+
*/
|
|
478
|
+
export interface RawGuildRoleUpdateEvent {
|
|
479
|
+
/** ID of the guild */
|
|
480
|
+
guild_id: Snowflake;
|
|
481
|
+
/** Role that was updated */
|
|
482
|
+
role: RawRole;
|
|
483
|
+
}
|
|
484
|
+
/**
|
|
485
|
+
* Guild Role Delete Event Fields
|
|
486
|
+
* @see https://docs.discord.com/developers/events/gateway-events#guild-role-delete-guild-role-delete-event-fields
|
|
487
|
+
*/
|
|
488
|
+
export interface RawGuildRoleDeleteEvent {
|
|
489
|
+
/** ID of the guild */
|
|
490
|
+
guild_id: Snowflake;
|
|
491
|
+
/** ID of the role */
|
|
492
|
+
role_id: Snowflake;
|
|
493
|
+
}
|
|
494
|
+
/**
|
|
495
|
+
* Guild Scheduled Event User Add Event Fields
|
|
496
|
+
* @see https://docs.discord.com/developers/events/gateway-events#guild-scheduled-event-user-add-guild-scheduled-event-user-add-event-fields
|
|
497
|
+
*/
|
|
498
|
+
export interface RawGuildScheduledEventUserAddEvent {
|
|
499
|
+
/** ID of the guild scheduled event */
|
|
500
|
+
guild_scheduled_event_id: Snowflake;
|
|
501
|
+
/** ID of the user */
|
|
502
|
+
user_id: Snowflake;
|
|
503
|
+
/** ID of the guild */
|
|
504
|
+
guild_id: Snowflake;
|
|
505
|
+
}
|
|
506
|
+
/**
|
|
507
|
+
* Guild Scheduled Event User Remove Event Fields
|
|
508
|
+
* @see https://docs.discord.com/developers/events/gateway-events#guild-scheduled-event-user-remove-guild-scheduled-event-user-remove-event-fields
|
|
509
|
+
*/
|
|
510
|
+
export interface RawGuildScheduledEventUserRemoveEvent {
|
|
511
|
+
/** ID of the guild scheduled event */
|
|
512
|
+
guild_scheduled_event_id: Snowflake;
|
|
513
|
+
/** ID of the user */
|
|
514
|
+
user_id: Snowflake;
|
|
515
|
+
/** ID of the guild */
|
|
516
|
+
guild_id: Snowflake;
|
|
517
|
+
}
|
|
518
|
+
/**
|
|
519
|
+
* Guild Soundboard Sound Delete Event Fields
|
|
520
|
+
* @see https://docs.discord.com/developers/events/gateway-events#guild-soundboard-sound-delete-guild-soundboard-sound-delete-event-fields
|
|
521
|
+
*/
|
|
522
|
+
export interface RawGuildSoundboardSoundDeleteEvent {
|
|
523
|
+
/** ID of the sound that was deleted */
|
|
524
|
+
sound_id: Snowflake;
|
|
525
|
+
/** ID of the guild the sound was in */
|
|
526
|
+
guild_id: Snowflake;
|
|
527
|
+
}
|
|
528
|
+
/**
|
|
529
|
+
* Guild Soundboard Sounds Update Event Fields
|
|
530
|
+
* @see https://docs.discord.com/developers/events/gateway-events#guild-soundboard-sounds-update-guild-soundboard-sounds-update-event-fields
|
|
531
|
+
*/
|
|
532
|
+
export interface RawGuildSoundboardSoundsUpdateEvent {
|
|
533
|
+
/** The guild's soundboard sounds */
|
|
534
|
+
soundboard_sounds: RawSoundboardSound[];
|
|
535
|
+
/** ID of the guild */
|
|
536
|
+
guild_id: Snowflake;
|
|
537
|
+
}
|
|
538
|
+
/**
|
|
539
|
+
* Soundboard Sounds Event Fields
|
|
540
|
+
* @see https://docs.discord.com/developers/events/gateway-events#soundboard-sounds-soundboard-sounds-event-fields
|
|
541
|
+
*/
|
|
542
|
+
export interface RawSoundboardSoundsEvent {
|
|
543
|
+
/** The guild's soundboard sounds */
|
|
544
|
+
soundboard_sounds: RawSoundboardSound[];
|
|
545
|
+
/** ID of the guild */
|
|
546
|
+
guild_id: Snowflake;
|
|
547
|
+
}
|
|
548
|
+
/**
|
|
549
|
+
* Integration Create Event Additional Fields
|
|
550
|
+
* @see https://docs.discord.com/developers/events/gateway-events#integration-create-integration-create-event-additional-fields
|
|
551
|
+
*/
|
|
552
|
+
export interface RawIntegrationCreateExtra {
|
|
553
|
+
/** ID of the guild */
|
|
554
|
+
guild_id: Snowflake;
|
|
555
|
+
}
|
|
556
|
+
/**
|
|
557
|
+
* Integration Update Event Additional Fields
|
|
558
|
+
* @see https://docs.discord.com/developers/events/gateway-events#integration-update-integration-update-event-additional-fields
|
|
559
|
+
*/
|
|
560
|
+
export interface RawIntegrationUpdateExtra {
|
|
561
|
+
/** ID of the guild */
|
|
562
|
+
guild_id: Snowflake;
|
|
563
|
+
}
|
|
564
|
+
/**
|
|
565
|
+
* Integration Delete Event Fields
|
|
566
|
+
* @see https://docs.discord.com/developers/events/gateway-events#integration-delete-integration-delete-event-fields
|
|
567
|
+
*/
|
|
568
|
+
export interface RawIntegrationDeleteEvent {
|
|
569
|
+
/** Integration ID */
|
|
570
|
+
id: Snowflake;
|
|
571
|
+
/** ID of the guild */
|
|
572
|
+
guild_id: Snowflake;
|
|
573
|
+
/** ID of the bot/OAuth2 application for this discord integration */
|
|
574
|
+
application_id?: Snowflake;
|
|
575
|
+
}
|
|
576
|
+
/**
|
|
577
|
+
* Invite Create Event Fields
|
|
578
|
+
* @see https://docs.discord.com/developers/events/gateway-events#invite-create-invite-create-event-fields
|
|
579
|
+
*/
|
|
580
|
+
export interface RawInviteCreateEvent {
|
|
581
|
+
/** Channel the invite is for */
|
|
582
|
+
channel_id: Snowflake;
|
|
583
|
+
/** Unique invite code */
|
|
584
|
+
code: string;
|
|
585
|
+
/** Time at which the invite was created */
|
|
586
|
+
created_at: ISO8601Timestamp;
|
|
587
|
+
/** Guild of the invite */
|
|
588
|
+
guild_id?: Snowflake;
|
|
589
|
+
/** User that created the invite */
|
|
590
|
+
inviter?: RawUser;
|
|
591
|
+
/** How long the invite is valid for (in seconds) */
|
|
592
|
+
max_age: number;
|
|
593
|
+
/** Maximum number of times the invite can be used */
|
|
594
|
+
max_uses: number;
|
|
595
|
+
/** Type of target for this voice channel invite */
|
|
596
|
+
target_type?: InviteTargetType;
|
|
597
|
+
/** User whose stream to display for this voice channel stream invite */
|
|
598
|
+
target_user?: RawUser;
|
|
599
|
+
/** Embedded application to open for this voice channel embedded application invite */
|
|
600
|
+
target_application?: Partial<RawApplication>;
|
|
601
|
+
/** Whether or not the invite is temporary (invited users will be kicked on disconnect unless they're assigned a role) */
|
|
602
|
+
temporary: boolean;
|
|
603
|
+
/** How many times the invite has been used (always will be 0) */
|
|
604
|
+
uses: number;
|
|
605
|
+
/** the expiration date of this invite */
|
|
606
|
+
expires_at: ISO8601Timestamp | null;
|
|
607
|
+
/** the role ID(s) for roles in the guild given to the users that accept this invite */
|
|
608
|
+
role_ids?: Snowflake[];
|
|
609
|
+
}
|
|
610
|
+
/**
|
|
611
|
+
* Invite Delete Event Fields
|
|
612
|
+
* @see https://docs.discord.com/developers/events/gateway-events#invite-delete-invite-delete-event-fields
|
|
613
|
+
*/
|
|
614
|
+
export interface RawInviteDeleteEvent {
|
|
615
|
+
/** Channel of the invite */
|
|
616
|
+
channel_id: Snowflake;
|
|
617
|
+
/** Guild of the invite */
|
|
618
|
+
guild_id?: Snowflake;
|
|
619
|
+
/** Unique invite code */
|
|
620
|
+
code: string;
|
|
621
|
+
}
|
|
622
|
+
/**
|
|
623
|
+
* Message Create Extra Fields
|
|
624
|
+
* @see https://docs.discord.com/developers/events/gateway-events#message-create-message-create-extra-fields
|
|
625
|
+
*/
|
|
626
|
+
export interface RawMessageCreateExtra {
|
|
627
|
+
/** ID of the guild the message was sent in - unless it is an ephemeral message */
|
|
628
|
+
guild_id?: Snowflake;
|
|
629
|
+
/** Member properties for this message's author. Missing for ephemeral messages and messages from webhooks */
|
|
630
|
+
member?: Partial<RawGuildMember>;
|
|
631
|
+
/** Users specifically mentioned in the message */
|
|
632
|
+
mentions: (RawUser & {
|
|
633
|
+
member?: Partial<RawGuildMember>;
|
|
634
|
+
})[];
|
|
635
|
+
/** The type of channel the message was sent in */
|
|
636
|
+
channel_type?: ChannelType;
|
|
637
|
+
}
|
|
638
|
+
/**
|
|
639
|
+
* Message Delete Event Fields
|
|
640
|
+
* @see https://docs.discord.com/developers/events/gateway-events#message-delete-message-delete-event-fields
|
|
641
|
+
*/
|
|
642
|
+
export interface RawMessageDeleteEvent {
|
|
643
|
+
/** ID of the message */
|
|
644
|
+
id: Snowflake;
|
|
645
|
+
/** ID of the channel */
|
|
646
|
+
channel_id: Snowflake;
|
|
647
|
+
/** ID of the guild */
|
|
648
|
+
guild_id?: Snowflake;
|
|
649
|
+
}
|
|
650
|
+
/**
|
|
651
|
+
* Message Delete Bulk Event Fields
|
|
652
|
+
* @see https://docs.discord.com/developers/events/gateway-events#message-delete-bulk-message-delete-bulk-event-fields
|
|
653
|
+
*/
|
|
654
|
+
export interface RawMessageDeleteBulkEvent {
|
|
655
|
+
/** IDs of the messages */
|
|
656
|
+
ids: Snowflake[];
|
|
657
|
+
/** ID of the channel */
|
|
658
|
+
channel_id: Snowflake;
|
|
659
|
+
/** ID of the guild */
|
|
660
|
+
guild_id?: Snowflake;
|
|
661
|
+
}
|
|
662
|
+
/**
|
|
663
|
+
* Message Reaction Add Event Fields
|
|
664
|
+
* @see https://docs.discord.com/developers/events/gateway-events#message-reaction-add-message-reaction-add-event-fields
|
|
665
|
+
*/
|
|
666
|
+
export interface RawMessageReactionAddEvent {
|
|
667
|
+
/** ID of the user */
|
|
668
|
+
user_id: Snowflake;
|
|
669
|
+
/** ID of the channel */
|
|
670
|
+
channel_id: Snowflake;
|
|
671
|
+
/** ID of the message */
|
|
672
|
+
message_id: Snowflake;
|
|
673
|
+
/** ID of the guild */
|
|
674
|
+
guild_id?: Snowflake;
|
|
675
|
+
/** Member who reacted if this happened in a guild */
|
|
676
|
+
member?: RawGuildMember;
|
|
677
|
+
/** Emoji used to react - example */
|
|
678
|
+
emoji: RawPartialEmoji;
|
|
679
|
+
/** ID of the user who authored the message which was reacted to */
|
|
680
|
+
message_author_id?: Snowflake;
|
|
681
|
+
/** true if this is a super-reaction */
|
|
682
|
+
burst: boolean;
|
|
683
|
+
/** Colors used for super-reaction animation in "#rrggbb" format */
|
|
684
|
+
burst_colors?: string[];
|
|
685
|
+
/** The type of reaction */
|
|
686
|
+
type: ReactionType;
|
|
687
|
+
}
|
|
688
|
+
/**
|
|
689
|
+
* Message Reaction Remove Event Fields
|
|
690
|
+
* @see https://docs.discord.com/developers/events/gateway-events#message-reaction-remove-message-reaction-remove-event-fields
|
|
691
|
+
*/
|
|
692
|
+
export interface RawMessageReactionRemoveEvent {
|
|
693
|
+
/** ID of the user */
|
|
694
|
+
user_id: Snowflake;
|
|
695
|
+
/** ID of the channel */
|
|
696
|
+
channel_id: Snowflake;
|
|
697
|
+
/** ID of the message */
|
|
698
|
+
message_id: Snowflake;
|
|
699
|
+
/** ID of the guild */
|
|
700
|
+
guild_id?: Snowflake;
|
|
701
|
+
/** Emoji used to react - example */
|
|
702
|
+
emoji: RawPartialEmoji;
|
|
703
|
+
/** true if this was a super-reaction */
|
|
704
|
+
burst: boolean;
|
|
705
|
+
/** The type of reaction */
|
|
706
|
+
type: ReactionType;
|
|
707
|
+
}
|
|
708
|
+
/**
|
|
709
|
+
* Message Reaction Remove All Event Fields
|
|
710
|
+
* @see https://docs.discord.com/developers/events/gateway-events#message-reaction-remove-all-message-reaction-remove-all-event-fields
|
|
711
|
+
*/
|
|
712
|
+
export interface RawMessageReactionRemoveAllEvent {
|
|
713
|
+
/** ID of the channel */
|
|
714
|
+
channel_id: Snowflake;
|
|
715
|
+
/** ID of the message */
|
|
716
|
+
message_id: Snowflake;
|
|
717
|
+
/** ID of the guild */
|
|
718
|
+
guild_id?: Snowflake;
|
|
719
|
+
}
|
|
720
|
+
/**
|
|
721
|
+
* Message Reaction Remove Emoji Event Fields
|
|
722
|
+
* @see https://docs.discord.com/developers/events/gateway-events#message-reaction-remove-emoji-message-reaction-remove-emoji-event-fields
|
|
723
|
+
*/
|
|
724
|
+
export interface RawMessageReactionRemoveEmojiEvent {
|
|
725
|
+
/** ID of the channel */
|
|
726
|
+
channel_id: Snowflake;
|
|
727
|
+
/** ID of the guild */
|
|
728
|
+
guild_id?: Snowflake;
|
|
729
|
+
/** ID of the message */
|
|
730
|
+
message_id: Snowflake;
|
|
731
|
+
/** Emoji that was removed */
|
|
732
|
+
emoji: Partial<RawEmoji>;
|
|
733
|
+
}
|
|
734
|
+
/**
|
|
735
|
+
* Presence Update Event Fields
|
|
736
|
+
* @see https://docs.discord.com/developers/events/gateway-events#presence-update-presence-update-event-fields
|
|
737
|
+
*/
|
|
738
|
+
export interface RawPresenceUpdateEvent {
|
|
739
|
+
/** User whose presence is being updated */
|
|
740
|
+
user: RawUser;
|
|
741
|
+
/** ID of the guild */
|
|
742
|
+
guild_id: Snowflake;
|
|
743
|
+
/** Either "idle", "dnd", "online", or "offline" */
|
|
744
|
+
status: PresenceStatus;
|
|
745
|
+
/** User's current activities */
|
|
746
|
+
activities: RawActivity[];
|
|
747
|
+
/** User's platform-dependent status */
|
|
748
|
+
client_status: RawClientStatus;
|
|
749
|
+
}
|
|
750
|
+
/**
|
|
751
|
+
* Client Status Object
|
|
752
|
+
* @see https://docs.discord.com/developers/events/gateway-events#client-status-object
|
|
753
|
+
*/
|
|
754
|
+
export interface RawClientStatus {
|
|
755
|
+
/** User's status set for an active desktop (Windows, Linux, Mac) application session */
|
|
756
|
+
desktop?: PresenceStatus;
|
|
757
|
+
/** User's status set for an active mobile (iOS, Android) application session */
|
|
758
|
+
mobile?: PresenceStatus;
|
|
759
|
+
/** User's status set for an active web (browser, bot user) application session */
|
|
760
|
+
web?: PresenceStatus;
|
|
761
|
+
/** User's status set for an active virtual reality application session */
|
|
762
|
+
vr?: PresenceStatus;
|
|
763
|
+
}
|
|
764
|
+
/**
|
|
765
|
+
* An activity as a bot may send it: "Bot users are only able to set `name`,
|
|
766
|
+
* `state`, `type`, and `url`."
|
|
767
|
+
* @see https://docs.discord.com/developers/events/gateway-events#activity-object
|
|
768
|
+
*/
|
|
769
|
+
export type RawBotActivity = Pick<RawActivity, 'name' | 'type'> & Partial<Pick<RawActivity, 'state' | 'url'>>;
|
|
770
|
+
/**
|
|
771
|
+
* Activity Structure
|
|
772
|
+
* @see https://docs.discord.com/developers/events/gateway-events#activity-object-activity-structure
|
|
773
|
+
*/
|
|
774
|
+
export interface RawActivity {
|
|
775
|
+
/** Activity's name */
|
|
776
|
+
name: string;
|
|
777
|
+
/** Activity type */
|
|
778
|
+
type: ActivityType;
|
|
779
|
+
/** Stream URL, is validated when type is 1 */
|
|
780
|
+
url?: string | null;
|
|
781
|
+
/** Unix timestamp (in milliseconds) of when the activity was added to the user's session */
|
|
782
|
+
created_at: number;
|
|
783
|
+
/** Unix timestamps for start and/or end of the game */
|
|
784
|
+
timestamps?: RawActivityTimestamps;
|
|
785
|
+
/** Application ID for the game */
|
|
786
|
+
application_id?: Snowflake;
|
|
787
|
+
/** Status display type; controls which field is displayed in the user's status text in the member list */
|
|
788
|
+
status_display_type?: StatusDisplayType | null;
|
|
789
|
+
/** What the player is currently doing */
|
|
790
|
+
details?: string | null;
|
|
791
|
+
/** URL that is linked when clicking on the details text */
|
|
792
|
+
details_url?: string | null;
|
|
793
|
+
/** User's current party status, or text used for a custom status */
|
|
794
|
+
state?: string | null;
|
|
795
|
+
/** URL that is linked when clicking on the state text */
|
|
796
|
+
state_url?: string | null;
|
|
797
|
+
/** Emoji used for a custom status */
|
|
798
|
+
emoji?: RawEmoji | null;
|
|
799
|
+
/** Information for the current party of the player */
|
|
800
|
+
party?: RawActivityParty;
|
|
801
|
+
/** Images for the presence and their hover texts */
|
|
802
|
+
assets?: RawActivityAssets;
|
|
803
|
+
/** Secrets for Rich Presence joining and spectating */
|
|
804
|
+
secrets?: RawActivitySecrets;
|
|
805
|
+
/** Whether or not the activity is an instanced game session */
|
|
806
|
+
instance?: boolean;
|
|
807
|
+
/** Activity flags `OR`d together, describes what the payload includes */
|
|
808
|
+
flags?: number;
|
|
809
|
+
/** Custom buttons shown in the Rich Presence (max 2) */
|
|
810
|
+
buttons?: RawActivityButton[];
|
|
811
|
+
}
|
|
812
|
+
/**
|
|
813
|
+
* Activity Types
|
|
814
|
+
* @see https://docs.discord.com/developers/events/gateway-events#activity-object-activity-types
|
|
815
|
+
*/
|
|
816
|
+
export declare const ActivityType: {
|
|
817
|
+
readonly Playing: 0;
|
|
818
|
+
readonly Streaming: 1;
|
|
819
|
+
readonly Listening: 2;
|
|
820
|
+
readonly Watching: 3;
|
|
821
|
+
readonly Custom: 4;
|
|
822
|
+
readonly Competing: 5;
|
|
823
|
+
};
|
|
824
|
+
export type ActivityType = (typeof ActivityType)[keyof typeof ActivityType];
|
|
825
|
+
/**
|
|
826
|
+
* Status Display Types
|
|
827
|
+
* @see https://docs.discord.com/developers/events/gateway-events#activity-object-status-display-types
|
|
828
|
+
*/
|
|
829
|
+
export declare const StatusDisplayType: {
|
|
830
|
+
readonly Name: 0;
|
|
831
|
+
readonly State: 1;
|
|
832
|
+
readonly Details: 2;
|
|
833
|
+
};
|
|
834
|
+
export type StatusDisplayType = (typeof StatusDisplayType)[keyof typeof StatusDisplayType];
|
|
835
|
+
/**
|
|
836
|
+
* Activity Timestamps
|
|
837
|
+
* @see https://docs.discord.com/developers/events/gateway-events#activity-object-activity-timestamps
|
|
838
|
+
*/
|
|
839
|
+
export interface RawActivityTimestamps {
|
|
840
|
+
/** Unix time (in milliseconds) of when the activity started */
|
|
841
|
+
start?: number;
|
|
842
|
+
/** Unix time (in milliseconds) of when the activity ends */
|
|
843
|
+
end?: number;
|
|
844
|
+
}
|
|
845
|
+
/**
|
|
846
|
+
* Activity Emoji
|
|
847
|
+
* @see https://docs.discord.com/developers/events/gateway-events#activity-object-activity-emoji
|
|
848
|
+
*/
|
|
849
|
+
export interface RawActivityEmoji {
|
|
850
|
+
/** Name of the emoji */
|
|
851
|
+
name: string;
|
|
852
|
+
/** ID of the emoji */
|
|
853
|
+
id?: Snowflake;
|
|
854
|
+
/** Whether the emoji is animated */
|
|
855
|
+
animated?: boolean;
|
|
856
|
+
}
|
|
857
|
+
/**
|
|
858
|
+
* Activity Party
|
|
859
|
+
* @see https://docs.discord.com/developers/events/gateway-events#activity-object-activity-party
|
|
860
|
+
*/
|
|
861
|
+
export interface RawActivityParty {
|
|
862
|
+
/** ID of the party */
|
|
863
|
+
id?: string;
|
|
864
|
+
/** Used to show the party's current and maximum size */
|
|
865
|
+
size?: [number, number];
|
|
866
|
+
}
|
|
867
|
+
/**
|
|
868
|
+
* Activity Assets
|
|
869
|
+
* @see https://docs.discord.com/developers/events/gateway-events#activity-object-activity-assets
|
|
870
|
+
*/
|
|
871
|
+
export interface RawActivityAssets {
|
|
872
|
+
/** See Activity Asset Image */
|
|
873
|
+
large_image?: string;
|
|
874
|
+
/** Text displayed when hovering over the large image of the activity */
|
|
875
|
+
large_text?: string;
|
|
876
|
+
/** URL that is opened when clicking on the large image */
|
|
877
|
+
large_url?: string;
|
|
878
|
+
/** See Activity Asset Image */
|
|
879
|
+
small_image?: string;
|
|
880
|
+
/** Text displayed when hovering over the small image of the activity */
|
|
881
|
+
small_text?: string;
|
|
882
|
+
/** URL that is opened when clicking on the small image */
|
|
883
|
+
small_url?: string;
|
|
884
|
+
/** See Activity Asset Image. Displayed as a banner on a Game Invite. */
|
|
885
|
+
invite_cover_image?: string;
|
|
886
|
+
}
|
|
887
|
+
/**
|
|
888
|
+
* Activity Secrets
|
|
889
|
+
* @see https://docs.discord.com/developers/events/gateway-events#activity-object-activity-secrets
|
|
890
|
+
*/
|
|
891
|
+
export interface RawActivitySecrets {
|
|
892
|
+
/** Secret for joining a party */
|
|
893
|
+
join?: string;
|
|
894
|
+
/** Secret for spectating a game */
|
|
895
|
+
spectate?: string;
|
|
896
|
+
/** Secret for a specific instanced match */
|
|
897
|
+
match?: string;
|
|
898
|
+
}
|
|
899
|
+
/**
|
|
900
|
+
* Activity Flags
|
|
901
|
+
* @see https://docs.discord.com/developers/events/gateway-events#activity-object-activity-flags
|
|
902
|
+
*/
|
|
903
|
+
export declare const ActivityFlags: {
|
|
904
|
+
readonly Instance: number;
|
|
905
|
+
readonly Join: number;
|
|
906
|
+
readonly Spectate: number;
|
|
907
|
+
readonly JoinRequest: number;
|
|
908
|
+
readonly Sync: number;
|
|
909
|
+
readonly Play: number;
|
|
910
|
+
readonly PartyPrivacyFriends: number;
|
|
911
|
+
readonly PartyPrivacyVoiceChannel: number;
|
|
912
|
+
readonly Embedded: number;
|
|
913
|
+
};
|
|
914
|
+
export type ActivityFlags = (typeof ActivityFlags)[keyof typeof ActivityFlags];
|
|
915
|
+
/**
|
|
916
|
+
* Activity Buttons
|
|
917
|
+
* @see https://docs.discord.com/developers/events/gateway-events#activity-object-activity-buttons
|
|
918
|
+
*/
|
|
919
|
+
export interface RawActivityButton {
|
|
920
|
+
/** Text shown on the button (1-32 characters) */
|
|
921
|
+
label: string;
|
|
922
|
+
/** URL opened when clicking the button (1-512 characters) */
|
|
923
|
+
url: string;
|
|
924
|
+
}
|
|
925
|
+
/**
|
|
926
|
+
* Typing Start Event Fields
|
|
927
|
+
* @see https://docs.discord.com/developers/events/gateway-events#typing-start-typing-start-event-fields
|
|
928
|
+
*/
|
|
929
|
+
export interface RawTypingStartEvent {
|
|
930
|
+
/** ID of the channel */
|
|
931
|
+
channel_id: Snowflake;
|
|
932
|
+
/** ID of the guild */
|
|
933
|
+
guild_id?: Snowflake;
|
|
934
|
+
/** ID of the user */
|
|
935
|
+
user_id: Snowflake;
|
|
936
|
+
/** Unix time (in seconds) of when the user started typing */
|
|
937
|
+
timestamp: number;
|
|
938
|
+
/** Member who started typing if this happened in a guild */
|
|
939
|
+
member?: RawGuildMember;
|
|
940
|
+
}
|
|
941
|
+
/**
|
|
942
|
+
* Voice Channel Effect Send Event Fields
|
|
943
|
+
* @see https://docs.discord.com/developers/events/gateway-events#voice-channel-effect-send-voice-channel-effect-send-event-fields
|
|
944
|
+
*/
|
|
945
|
+
export interface RawVoiceChannelEffectSendEvent {
|
|
946
|
+
/** ID of the channel the effect was sent in */
|
|
947
|
+
channel_id: Snowflake;
|
|
948
|
+
/** ID of the guild the effect was sent in */
|
|
949
|
+
guild_id: Snowflake;
|
|
950
|
+
/** ID of the user who sent the effect */
|
|
951
|
+
user_id: Snowflake;
|
|
952
|
+
/** The emoji sent, for emoji reaction and soundboard effects */
|
|
953
|
+
emoji?: RawEmoji | null;
|
|
954
|
+
/** The type of emoji animation, for emoji reaction and soundboard effects */
|
|
955
|
+
animation_type?: VoiceEffectAnimationType | null;
|
|
956
|
+
/** The ID of the emoji animation, for emoji reaction and soundboard effects */
|
|
957
|
+
animation_id?: number;
|
|
958
|
+
/** The ID of the soundboard sound, for soundboard effects */
|
|
959
|
+
sound_id?: Snowflake | number;
|
|
960
|
+
/** The volume of the soundboard sound, from 0 to 1, for soundboard effects */
|
|
961
|
+
sound_volume?: number;
|
|
962
|
+
}
|
|
963
|
+
/**
|
|
964
|
+
* Animation Types
|
|
965
|
+
* @see https://docs.discord.com/developers/events/gateway-events#voice-channel-effect-send-animation-types
|
|
966
|
+
*/
|
|
967
|
+
export declare const VoiceEffectAnimationType: {
|
|
968
|
+
/** A fun animation, sent by a Nitro subscriber */
|
|
969
|
+
readonly Premium: 0;
|
|
970
|
+
/** The standard animation */
|
|
971
|
+
readonly Basic: 1;
|
|
972
|
+
};
|
|
973
|
+
export type VoiceEffectAnimationType = (typeof VoiceEffectAnimationType)[keyof typeof VoiceEffectAnimationType];
|
|
974
|
+
/**
|
|
975
|
+
* Voice Server Update Event Fields
|
|
976
|
+
* @see https://docs.discord.com/developers/events/gateway-events#voice-server-update-voice-server-update-event-fields
|
|
977
|
+
*/
|
|
978
|
+
export interface RawVoiceServerUpdateEvent {
|
|
979
|
+
/** Voice connection token */
|
|
980
|
+
token: string;
|
|
981
|
+
/** Guild this voice server update is for */
|
|
982
|
+
guild_id: Snowflake;
|
|
983
|
+
/** Voice server host */
|
|
984
|
+
endpoint: string | null;
|
|
985
|
+
}
|
|
986
|
+
/**
|
|
987
|
+
* Webhooks Update Event Fields
|
|
988
|
+
* @see https://docs.discord.com/developers/events/gateway-events#webhooks-update-webhooks-update-event-fields
|
|
989
|
+
*/
|
|
990
|
+
export interface RawWebhooksUpdateEvent {
|
|
991
|
+
/** ID of the guild */
|
|
992
|
+
guild_id: Snowflake;
|
|
993
|
+
/** ID of the channel */
|
|
994
|
+
channel_id: Snowflake;
|
|
995
|
+
}
|
|
996
|
+
/**
|
|
997
|
+
* Message Poll Vote Add Fields
|
|
998
|
+
* @see https://docs.discord.com/developers/events/gateway-events#message-poll-vote-add-message-poll-vote-add-fields
|
|
999
|
+
*/
|
|
1000
|
+
export interface RawMessagePollVoteAddEvent {
|
|
1001
|
+
/** ID of the user */
|
|
1002
|
+
user_id: Snowflake;
|
|
1003
|
+
/** ID of the channel */
|
|
1004
|
+
channel_id: Snowflake;
|
|
1005
|
+
/** ID of the message */
|
|
1006
|
+
message_id: Snowflake;
|
|
1007
|
+
/** ID of the guild */
|
|
1008
|
+
guild_id?: Snowflake;
|
|
1009
|
+
/** ID of the answer */
|
|
1010
|
+
answer_id: number;
|
|
1011
|
+
}
|
|
1012
|
+
/**
|
|
1013
|
+
* Message Poll Vote Remove Fields
|
|
1014
|
+
* @see https://docs.discord.com/developers/events/gateway-events#message-poll-vote-remove-message-poll-vote-remove-fields
|
|
1015
|
+
*/
|
|
1016
|
+
export interface RawMessagePollVoteRemoveEvent {
|
|
1017
|
+
/** ID of the user */
|
|
1018
|
+
user_id: Snowflake;
|
|
1019
|
+
/** ID of the channel */
|
|
1020
|
+
channel_id: Snowflake;
|
|
1021
|
+
/** ID of the message */
|
|
1022
|
+
message_id: Snowflake;
|
|
1023
|
+
/** ID of the guild */
|
|
1024
|
+
guild_id?: Snowflake;
|
|
1025
|
+
/** ID of the answer */
|
|
1026
|
+
answer_id: number;
|
|
1027
|
+
}
|
|
1028
|
+
/**
|
|
1029
|
+
* Rate Limited Fields
|
|
1030
|
+
* @see https://docs.discord.com/developers/events/gateway-events#rate-limited-fields
|
|
1031
|
+
*/
|
|
1032
|
+
export interface RawRateLimitedEvent {
|
|
1033
|
+
/** Gateway opcode of the event that was rate limited */
|
|
1034
|
+
opcode: number;
|
|
1035
|
+
/** The number of seconds to wait before submitting another request */
|
|
1036
|
+
retry_after: number;
|
|
1037
|
+
/** Metadata for the event that was rate limited */
|
|
1038
|
+
meta: RawRequestGuildMemberRateLimitMetadata;
|
|
1039
|
+
}
|
|
1040
|
+
/**
|
|
1041
|
+
* Request Guild Member Rate Limit Metadata Structure
|
|
1042
|
+
* @see https://docs.discord.com/developers/events/gateway-events#rate-limited-fields
|
|
1043
|
+
*/
|
|
1044
|
+
export interface RawRequestGuildMemberRateLimitMetadata {
|
|
1045
|
+
/** ID of the guild to get members for */
|
|
1046
|
+
guild_id: Snowflake;
|
|
1047
|
+
/** nonce to identify the Guild Members Chunk response */
|
|
1048
|
+
nonce?: string;
|
|
1049
|
+
}
|
|
1050
|
+
/**
|
|
1051
|
+
* Status Types
|
|
1052
|
+
* @see https://docs.discord.com/developers/events/gateway-events#update-presence-status-types
|
|
1053
|
+
*/
|
|
1054
|
+
export type PresenceStatus = 'online' | 'dnd' | 'idle' | 'invisible' | 'offline';
|
|
1055
|
+
/** What Message Create and Message Update carry: a message and extra fields. */
|
|
1056
|
+
export type RawMessageCreateEvent = RawMessage & RawMessageCreateExtra;
|
|
1057
|
+
/** An available guild, as sent by Guild Create. */
|
|
1058
|
+
export type RawGuildCreateEvent = RawGuild & RawGuildCreateExtra;
|
|
1059
|
+
/**
|
|
1060
|
+
* Receive Events: the name of every event Discord dispatches (the `t` field
|
|
1061
|
+
* of a Dispatch payload), with the type of its `d` field.
|
|
1062
|
+
* @see https://docs.discord.com/developers/events/gateway-events#receive-events
|
|
1063
|
+
*/
|
|
1064
|
+
export interface GatewayDispatchEvents {
|
|
1065
|
+
READY: RawReadyEvent;
|
|
1066
|
+
RESUMED: unknown;
|
|
1067
|
+
RATE_LIMITED: RawRateLimitedEvent;
|
|
1068
|
+
APPLICATION_COMMAND_PERMISSIONS_UPDATE: RawGuildApplicationCommandPermissions;
|
|
1069
|
+
AUTO_MODERATION_RULE_CREATE: RawAutoModerationRule;
|
|
1070
|
+
AUTO_MODERATION_RULE_UPDATE: RawAutoModerationRule;
|
|
1071
|
+
AUTO_MODERATION_RULE_DELETE: RawAutoModerationRule;
|
|
1072
|
+
AUTO_MODERATION_ACTION_EXECUTION: RawAutoModerationActionExecutionEvent;
|
|
1073
|
+
CHANNEL_CREATE: RawChannel;
|
|
1074
|
+
CHANNEL_UPDATE: RawChannel;
|
|
1075
|
+
CHANNEL_DELETE: RawChannel;
|
|
1076
|
+
CHANNEL_INFO: RawChannelInfoEvent;
|
|
1077
|
+
CHANNEL_PINS_UPDATE: RawChannelPinsUpdateEvent;
|
|
1078
|
+
THREAD_CREATE: RawChannel & {
|
|
1079
|
+
newly_created?: boolean;
|
|
1080
|
+
};
|
|
1081
|
+
THREAD_UPDATE: RawChannel;
|
|
1082
|
+
THREAD_DELETE: Pick<RawChannel, 'id' | 'guild_id' | 'parent_id' | 'type'>;
|
|
1083
|
+
THREAD_LIST_SYNC: RawThreadListSyncEvent;
|
|
1084
|
+
THREAD_MEMBER_UPDATE: RawThreadMember & RawThreadMemberUpdateExtra;
|
|
1085
|
+
THREAD_MEMBERS_UPDATE: RawThreadMembersUpdateEvent;
|
|
1086
|
+
ENTITLEMENT_CREATE: RawEntitlement;
|
|
1087
|
+
ENTITLEMENT_UPDATE: RawEntitlement;
|
|
1088
|
+
ENTITLEMENT_DELETE: RawEntitlement;
|
|
1089
|
+
GUILD_CREATE: RawGuildCreateEvent | RawUnavailableGuild;
|
|
1090
|
+
GUILD_UPDATE: RawGuild;
|
|
1091
|
+
GUILD_DELETE: RawUnavailableGuild;
|
|
1092
|
+
GUILD_AUDIT_LOG_ENTRY_CREATE: RawAuditLogEntry & RawGuildAuditLogEntryCreateExtra;
|
|
1093
|
+
GUILD_BAN_ADD: RawGuildBanAddEvent;
|
|
1094
|
+
GUILD_BAN_REMOVE: RawGuildBanRemoveEvent;
|
|
1095
|
+
GUILD_EMOJIS_UPDATE: RawGuildEmojisUpdateEvent;
|
|
1096
|
+
GUILD_STICKERS_UPDATE: RawGuildStickersUpdateEvent;
|
|
1097
|
+
GUILD_INTEGRATIONS_UPDATE: RawGuildIntegrationsUpdateEvent;
|
|
1098
|
+
GUILD_MEMBER_ADD: RawGuildMember & RawGuildMemberAddExtra;
|
|
1099
|
+
GUILD_MEMBER_REMOVE: RawGuildMemberRemoveEvent;
|
|
1100
|
+
GUILD_MEMBER_UPDATE: RawGuildMemberUpdateEvent;
|
|
1101
|
+
GUILD_MEMBERS_CHUNK: RawGuildMembersChunkEvent;
|
|
1102
|
+
GUILD_ROLE_CREATE: RawGuildRoleCreateEvent;
|
|
1103
|
+
GUILD_ROLE_UPDATE: RawGuildRoleUpdateEvent;
|
|
1104
|
+
GUILD_ROLE_DELETE: RawGuildRoleDeleteEvent;
|
|
1105
|
+
GUILD_SCHEDULED_EVENT_CREATE: RawGuildScheduledEvent;
|
|
1106
|
+
GUILD_SCHEDULED_EVENT_UPDATE: RawGuildScheduledEvent;
|
|
1107
|
+
GUILD_SCHEDULED_EVENT_DELETE: RawGuildScheduledEvent;
|
|
1108
|
+
GUILD_SCHEDULED_EVENT_USER_ADD: RawGuildScheduledEventUserAddEvent;
|
|
1109
|
+
GUILD_SCHEDULED_EVENT_USER_REMOVE: RawGuildScheduledEventUserRemoveEvent;
|
|
1110
|
+
GUILD_SOUNDBOARD_SOUND_CREATE: RawSoundboardSound;
|
|
1111
|
+
GUILD_SOUNDBOARD_SOUND_UPDATE: RawSoundboardSound;
|
|
1112
|
+
GUILD_SOUNDBOARD_SOUND_DELETE: RawGuildSoundboardSoundDeleteEvent;
|
|
1113
|
+
GUILD_SOUNDBOARD_SOUNDS_UPDATE: RawGuildSoundboardSoundsUpdateEvent;
|
|
1114
|
+
SOUNDBOARD_SOUNDS: RawSoundboardSoundsEvent;
|
|
1115
|
+
INTEGRATION_CREATE: Omit<RawIntegration, 'user'> & RawIntegrationCreateExtra;
|
|
1116
|
+
INTEGRATION_UPDATE: Omit<RawIntegration, 'user'> & RawIntegrationUpdateExtra;
|
|
1117
|
+
INTEGRATION_DELETE: RawIntegrationDeleteEvent;
|
|
1118
|
+
INTERACTION_CREATE: RawInteraction;
|
|
1119
|
+
INVITE_CREATE: RawInviteCreateEvent;
|
|
1120
|
+
INVITE_DELETE: RawInviteDeleteEvent;
|
|
1121
|
+
MESSAGE_CREATE: RawMessageCreateEvent;
|
|
1122
|
+
MESSAGE_UPDATE: RawMessageCreateEvent;
|
|
1123
|
+
MESSAGE_DELETE: RawMessageDeleteEvent;
|
|
1124
|
+
MESSAGE_DELETE_BULK: RawMessageDeleteBulkEvent;
|
|
1125
|
+
MESSAGE_REACTION_ADD: RawMessageReactionAddEvent;
|
|
1126
|
+
MESSAGE_REACTION_REMOVE: RawMessageReactionRemoveEvent;
|
|
1127
|
+
MESSAGE_REACTION_REMOVE_ALL: RawMessageReactionRemoveAllEvent;
|
|
1128
|
+
MESSAGE_REACTION_REMOVE_EMOJI: RawMessageReactionRemoveEmojiEvent;
|
|
1129
|
+
PRESENCE_UPDATE: RawPresenceUpdateEvent;
|
|
1130
|
+
STAGE_INSTANCE_CREATE: RawStageInstance;
|
|
1131
|
+
STAGE_INSTANCE_UPDATE: RawStageInstance;
|
|
1132
|
+
STAGE_INSTANCE_DELETE: RawStageInstance;
|
|
1133
|
+
SUBSCRIPTION_CREATE: RawSubscription;
|
|
1134
|
+
SUBSCRIPTION_UPDATE: RawSubscription;
|
|
1135
|
+
SUBSCRIPTION_DELETE: RawSubscription;
|
|
1136
|
+
TYPING_START: RawTypingStartEvent;
|
|
1137
|
+
USER_UPDATE: RawUser;
|
|
1138
|
+
VOICE_CHANNEL_EFFECT_SEND: RawVoiceChannelEffectSendEvent;
|
|
1139
|
+
VOICE_CHANNEL_START_TIME_UPDATE: RawVoiceChannelStartTimeUpdateEvent;
|
|
1140
|
+
VOICE_CHANNEL_STATUS_UPDATE: RawVoiceChannelStatusUpdateEvent;
|
|
1141
|
+
VOICE_STATE_UPDATE: RawVoiceState;
|
|
1142
|
+
VOICE_SERVER_UPDATE: RawVoiceServerUpdateEvent;
|
|
1143
|
+
WEBHOOKS_UPDATE: RawWebhooksUpdateEvent;
|
|
1144
|
+
MESSAGE_POLL_VOTE_ADD: RawMessagePollVoteAddEvent;
|
|
1145
|
+
MESSAGE_POLL_VOTE_REMOVE: RawMessagePollVoteRemoveEvent;
|
|
1146
|
+
}
|
|
1147
|
+
/** The name of an event Discord dispatches. */
|
|
1148
|
+
export type GatewayDispatchEventName = keyof GatewayDispatchEvents;
|