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,158 @@
|
|
|
1
|
+
import type { RawApplication } from './application.js';
|
|
2
|
+
import type { RawChannel } from './channel.js';
|
|
3
|
+
import type { ISO8601Timestamp, Snowflake } from './common.js';
|
|
4
|
+
import type { RawGuild, RawGuildMember } from './guild.js';
|
|
5
|
+
import type { RawGuildScheduledEvent } from './guild-scheduled-event.js';
|
|
6
|
+
import type { RawRole } from './permissions.js';
|
|
7
|
+
import type { RawUser } from './user.js';
|
|
8
|
+
/**
|
|
9
|
+
* Invite Structure
|
|
10
|
+
* @see https://docs.discord.com/developers/resources/invite#invite-object-invite-structure
|
|
11
|
+
*/
|
|
12
|
+
export interface RawInvite {
|
|
13
|
+
/** the type of invite */
|
|
14
|
+
type: InviteType;
|
|
15
|
+
/** the invite code (unique ID) */
|
|
16
|
+
code: string;
|
|
17
|
+
/** the guild this invite is for */
|
|
18
|
+
guild?: Partial<RawGuild>;
|
|
19
|
+
/** the channel this invite is for */
|
|
20
|
+
channel: Partial<RawChannel> | null;
|
|
21
|
+
/** the user who created the invite */
|
|
22
|
+
inviter?: RawUser;
|
|
23
|
+
/** the type of target for this voice channel invite */
|
|
24
|
+
target_type?: InviteTargetType;
|
|
25
|
+
/** the user whose stream to display for this voice channel stream invite */
|
|
26
|
+
target_user?: RawUser;
|
|
27
|
+
/** the embedded application to open for this voice channel embedded application invite */
|
|
28
|
+
target_application?: Partial<RawApplication>;
|
|
29
|
+
/** approximate count of online members, returned from the `GET /invites/` endpoint when `with_counts` is `true` */
|
|
30
|
+
approximate_presence_count?: number;
|
|
31
|
+
/** approximate count of total members, returned from the `GET /invites/` endpoint when `with_counts` is `true` */
|
|
32
|
+
approximate_member_count?: number;
|
|
33
|
+
/** the expiration date of this invite */
|
|
34
|
+
expires_at: ISO8601Timestamp | null;
|
|
35
|
+
/** guild scheduled event data, only included if `guild_scheduled_event_id` contains a valid guild scheduled event id */
|
|
36
|
+
guild_scheduled_event?: RawGuildScheduledEvent;
|
|
37
|
+
/** guild invite flags for guild invites */
|
|
38
|
+
flags?: number;
|
|
39
|
+
/** the roles assigned to the user upon accepting the invite. */
|
|
40
|
+
roles?: Partial<RawRole>[];
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Invite Types
|
|
44
|
+
* @see https://docs.discord.com/developers/resources/invite#invite-object-invite-types
|
|
45
|
+
*/
|
|
46
|
+
export declare const InviteType: {
|
|
47
|
+
readonly Guild: 0;
|
|
48
|
+
readonly GroupDm: 1;
|
|
49
|
+
readonly Friend: 2;
|
|
50
|
+
};
|
|
51
|
+
export type InviteType = (typeof InviteType)[keyof typeof InviteType];
|
|
52
|
+
/**
|
|
53
|
+
* Invite Target Types
|
|
54
|
+
* @see https://docs.discord.com/developers/resources/invite#invite-object-invite-target-types
|
|
55
|
+
*/
|
|
56
|
+
export declare const InviteTargetType: {
|
|
57
|
+
readonly Stream: 1;
|
|
58
|
+
readonly EmbeddedApplication: 2;
|
|
59
|
+
};
|
|
60
|
+
export type InviteTargetType = (typeof InviteTargetType)[keyof typeof InviteTargetType];
|
|
61
|
+
/**
|
|
62
|
+
* Guild Invite Flags
|
|
63
|
+
* @see https://docs.discord.com/developers/resources/invite#invite-object-guild-invite-flags
|
|
64
|
+
*/
|
|
65
|
+
export declare const GuildInviteFlags: {
|
|
66
|
+
/** this invite is a guest invite for a voice channel */
|
|
67
|
+
readonly IsGuestInvite: number;
|
|
68
|
+
};
|
|
69
|
+
export type GuildInviteFlags = (typeof GuildInviteFlags)[keyof typeof GuildInviteFlags];
|
|
70
|
+
/**
|
|
71
|
+
* Invite Metadata Structure
|
|
72
|
+
* @see https://docs.discord.com/developers/resources/invite#invite-metadata-object-invite-metadata-structure
|
|
73
|
+
*/
|
|
74
|
+
export interface RawInviteMetadata {
|
|
75
|
+
/** number of times this invite has been used */
|
|
76
|
+
uses: number;
|
|
77
|
+
/** max number of times this invite can be used */
|
|
78
|
+
max_uses: number;
|
|
79
|
+
/** duration (in seconds) after which the invite expires */
|
|
80
|
+
max_age: number;
|
|
81
|
+
/** whether this invite only grants temporary membership */
|
|
82
|
+
temporary: boolean;
|
|
83
|
+
/** when this invite was created */
|
|
84
|
+
created_at: ISO8601Timestamp;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Invite Stage Instance Structure
|
|
88
|
+
* @see https://docs.discord.com/developers/resources/invite#invite-stage-instance-object-invite-stage-instance-structure
|
|
89
|
+
*/
|
|
90
|
+
export interface RawInviteStageInstance {
|
|
91
|
+
/** the members speaking in the Stage */
|
|
92
|
+
members: Partial<RawGuildMember>[];
|
|
93
|
+
/** the number of users in the Stage */
|
|
94
|
+
participant_count: number;
|
|
95
|
+
/** the number of users speaking in the Stage */
|
|
96
|
+
speaker_count: number;
|
|
97
|
+
/** the topic of the Stage instance (1-120 characters) */
|
|
98
|
+
topic: string;
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Query String Params
|
|
102
|
+
* @see https://docs.discord.com/developers/resources/invite#get-invite-query-string-params
|
|
103
|
+
*/
|
|
104
|
+
export interface GetInviteQuery {
|
|
105
|
+
/** whether the invite should contain approximate member counts */
|
|
106
|
+
with_counts?: boolean;
|
|
107
|
+
/** the guild scheduled event to include with the invite */
|
|
108
|
+
guild_scheduled_event_id?: Snowflake;
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Form Params
|
|
112
|
+
* @see https://docs.discord.com/developers/resources/invite#update-target-users-form-params
|
|
113
|
+
*/
|
|
114
|
+
export interface UpdateTargetUsersJSONParams {
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* JSON Params
|
|
118
|
+
* @see https://docs.discord.com/developers/resources/invite#bulk-add-target-users-json-params
|
|
119
|
+
*/
|
|
120
|
+
export interface BulkAddTargetUsersJSONParams {
|
|
121
|
+
/** the IDs of users to add, max of 1000 users */
|
|
122
|
+
user_ids: Snowflake[];
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* JSON Params
|
|
126
|
+
* @see https://docs.discord.com/developers/resources/invite#bulk-delete-target-users-json-params
|
|
127
|
+
*/
|
|
128
|
+
export interface BulkDeleteTargetUsersJSONParams {
|
|
129
|
+
/** the IDs of users to remove, max of 1000 users */
|
|
130
|
+
user_ids: Snowflake[];
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* Status Codes
|
|
134
|
+
* @see https://docs.discord.com/developers/resources/invite#get-target-users-job-status-status-codes
|
|
135
|
+
*/
|
|
136
|
+
export declare const InviteTargetUsersJobStatus: {
|
|
137
|
+
/** The default value. */
|
|
138
|
+
readonly Unspecified: 0;
|
|
139
|
+
/** The job is still being processed. */
|
|
140
|
+
readonly Processing: 1;
|
|
141
|
+
/** The job has been completed successfully. */
|
|
142
|
+
readonly Completed: 2;
|
|
143
|
+
/** The job has failed, see `error_message` field for more details. */
|
|
144
|
+
readonly Failed: 3;
|
|
145
|
+
};
|
|
146
|
+
export type InviteTargetUsersJobStatus = (typeof InviteTargetUsersJobStatus)[keyof typeof InviteTargetUsersJobStatus];
|
|
147
|
+
/**
|
|
148
|
+
* The state of the job that processes the target users of an invite.
|
|
149
|
+
* @see https://docs.discord.com/developers/resources/invite#get-target-users-job-status
|
|
150
|
+
*/
|
|
151
|
+
export interface RawInviteTargetUsersJob {
|
|
152
|
+
status: InviteTargetUsersJobStatus;
|
|
153
|
+
total_users: number;
|
|
154
|
+
processed_users: number;
|
|
155
|
+
created_at: ISO8601Timestamp;
|
|
156
|
+
completed_at: ISO8601Timestamp | null;
|
|
157
|
+
error_message?: string;
|
|
158
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Invite Types
|
|
3
|
+
* @see https://docs.discord.com/developers/resources/invite#invite-object-invite-types
|
|
4
|
+
*/
|
|
5
|
+
export const InviteType = {
|
|
6
|
+
Guild: 0,
|
|
7
|
+
GroupDm: 1,
|
|
8
|
+
Friend: 2,
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Invite Target Types
|
|
12
|
+
* @see https://docs.discord.com/developers/resources/invite#invite-object-invite-target-types
|
|
13
|
+
*/
|
|
14
|
+
export const InviteTargetType = {
|
|
15
|
+
Stream: 1,
|
|
16
|
+
EmbeddedApplication: 2,
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Guild Invite Flags
|
|
20
|
+
* @see https://docs.discord.com/developers/resources/invite#invite-object-guild-invite-flags
|
|
21
|
+
*/
|
|
22
|
+
export const GuildInviteFlags = {
|
|
23
|
+
/** this invite is a guest invite for a voice channel */
|
|
24
|
+
IsGuestInvite: 1 << 0,
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* Status Codes
|
|
28
|
+
* @see https://docs.discord.com/developers/resources/invite#get-target-users-job-status-status-codes
|
|
29
|
+
*/
|
|
30
|
+
export const InviteTargetUsersJobStatus = {
|
|
31
|
+
/** The default value. */
|
|
32
|
+
Unspecified: 0,
|
|
33
|
+
/** The job is still being processed. */
|
|
34
|
+
Processing: 1,
|
|
35
|
+
/** The job has been completed successfully. */
|
|
36
|
+
Completed: 2,
|
|
37
|
+
/** The job has failed, see `error_message` field for more details. */
|
|
38
|
+
Failed: 3,
|
|
39
|
+
};
|