@satorijs/adapter-discord 3.4.2 → 3.4.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/lib/index.js +145 -68
- package/lib/index.js.map +4 -4
- package/lib/types/application-role-connection.d.ts +51 -0
- package/lib/types/application.d.ts +22 -3
- package/lib/types/audit-log.d.ts +19 -5
- package/lib/types/auto-moderation.d.ts +2 -0
- package/lib/types/ban.d.ts +5 -5
- package/lib/types/channel.d.ts +66 -4
- package/lib/types/command.d.ts +43 -7
- package/lib/types/component.d.ts +33 -31
- package/lib/types/emoji.d.ts +1 -1
- package/lib/types/gateway.d.ts +22 -13
- package/lib/types/guild-member.d.ts +8 -4
- package/lib/types/guild.d.ts +24 -26
- package/lib/types/index.d.ts +1 -0
- package/lib/types/integration.d.ts +6 -6
- package/lib/types/interaction.d.ts +78 -45
- package/lib/types/invite.d.ts +5 -3
- package/lib/types/message.d.ts +15 -5
- package/lib/types/presence.d.ts +23 -24
- package/lib/types/reaction.d.ts +4 -4
- package/lib/types/role.d.ts +12 -4
- package/lib/types/scheduled-event.d.ts +6 -0
- package/lib/types/stage-instance.d.ts +4 -0
- package/lib/types/sticker.d.ts +4 -3
- package/lib/types/thread.d.ts +50 -7
- package/lib/types/user.d.ts +13 -2
- package/lib/types/voice.d.ts +1 -1
- package/lib/types/webhook.d.ts +6 -2
- package/lib/ws.d.ts +1 -2
- package/package.json +2 -2
|
@@ -21,6 +21,8 @@ export interface GuildMember {
|
|
|
21
21
|
pending?: boolean;
|
|
22
22
|
/** total permissions of the member in the channel, including overwrites, returned when in the interaction object */
|
|
23
23
|
permissions?: string;
|
|
24
|
+
/** 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 */
|
|
25
|
+
communication_disabled_until?: timestamp;
|
|
24
26
|
}
|
|
25
27
|
export declare namespace GuildMember {
|
|
26
28
|
namespace Params {
|
|
@@ -89,19 +91,19 @@ export declare namespace GuildMember {
|
|
|
89
91
|
}
|
|
90
92
|
}
|
|
91
93
|
namespace Event {
|
|
92
|
-
/** https://discord.com/developers/docs/topics/gateway#guild-member-add-guild-member-add-extra-fields */
|
|
94
|
+
/** https://discord.com/developers/docs/topics/gateway-events#guild-member-add-guild-member-add-extra-fields */
|
|
93
95
|
interface Add extends GuildMember {
|
|
94
96
|
/** id of the guild */
|
|
95
97
|
guild_id: snowflake;
|
|
96
98
|
}
|
|
97
|
-
/** https://discord.com/developers/docs/topics/gateway#guild-member-remove-guild-member-remove-event-fields */
|
|
99
|
+
/** https://discord.com/developers/docs/topics/gateway-events#guild-member-remove-guild-member-remove-event-fields */
|
|
98
100
|
interface Remove {
|
|
99
101
|
/** the id of the guild */
|
|
100
102
|
guild_id: snowflake;
|
|
101
103
|
/** the user who was removed */
|
|
102
104
|
user: User;
|
|
103
105
|
}
|
|
104
|
-
/** https://discord.com/developers/docs/topics/gateway#guild-member-update-guild-member-update-event-fields */
|
|
106
|
+
/** https://discord.com/developers/docs/topics/gateway-events#guild-member-update-guild-member-update-event-fields */
|
|
105
107
|
interface Update {
|
|
106
108
|
/** the id of the guild */
|
|
107
109
|
guild_id: snowflake;
|
|
@@ -123,8 +125,10 @@ export declare namespace GuildMember {
|
|
|
123
125
|
mute?: boolean;
|
|
124
126
|
/** whether the user has not yet passed the guild's Membership Screening requirements */
|
|
125
127
|
pending?: boolean;
|
|
128
|
+
/** 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 */
|
|
129
|
+
communication_disabled_until?: timestamp;
|
|
126
130
|
}
|
|
127
|
-
/** https://discord.com/developers/docs/topics/gateway#guild-members-chunk-guild-members-chunk-event-fields */
|
|
131
|
+
/** https://discord.com/developers/docs/topics/gateway-events#guild-members-chunk-guild-members-chunk-event-fields */
|
|
128
132
|
interface Chunk {
|
|
129
133
|
/** the id of the guild */
|
|
130
134
|
guild_id: snowflake;
|
package/lib/types/guild.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Channel, Emoji, GuildMember, integer,
|
|
1
|
+
import { Channel, Emoji, GuildMember, integer, Role, snowflake, Sticker, User } from '.';
|
|
2
2
|
/** https://discord.com/developers/docs/resources/guild#guild-object-guild-structure */
|
|
3
3
|
export interface Guild {
|
|
4
4
|
/** guild id */
|
|
@@ -51,24 +51,6 @@ export interface Guild {
|
|
|
51
51
|
system_channel_flags: integer;
|
|
52
52
|
/** the id of the channel where Community guilds can display rules and/or guidelines */
|
|
53
53
|
rules_channel_id?: snowflake;
|
|
54
|
-
/** when this guild was joined at */
|
|
55
|
-
joined_at?: timestamp;
|
|
56
|
-
/** true if this is considered a large guild */
|
|
57
|
-
large?: boolean;
|
|
58
|
-
/** true if this guild is unavailable due to an outage */
|
|
59
|
-
unavailable?: boolean;
|
|
60
|
-
/** total number of members in this guild */
|
|
61
|
-
member_count?: integer;
|
|
62
|
-
/** states of members currently in voice channels; lacks the guild_id key */
|
|
63
|
-
voice_states?: Partial<VoiceState>[];
|
|
64
|
-
/** users in the guild */
|
|
65
|
-
members?: GuildMember[];
|
|
66
|
-
/** channels in the guild */
|
|
67
|
-
channels?: Channel[];
|
|
68
|
-
/** all active threads in the guild that current user has permission to view */
|
|
69
|
-
threads?: Channel[];
|
|
70
|
-
/** presences of the members in the guild, will only include non-offline members if the size is greater than large threshold */
|
|
71
|
-
presences?: Partial<PresenceUpdateEvent>[];
|
|
72
54
|
/** the maximum number of presences for the guild (null is always returned, apart from the largest of guilds) */
|
|
73
55
|
max_presences?: integer;
|
|
74
56
|
/** the maximum number of members for the guild */
|
|
@@ -97,10 +79,10 @@ export interface Guild {
|
|
|
97
79
|
welcome_screen?: WelcomeScreen;
|
|
98
80
|
/** guild NSFW level */
|
|
99
81
|
nsfw_level: integer;
|
|
100
|
-
/** Stage instances in the guild */
|
|
101
|
-
stage_instances?: StageInstance[];
|
|
102
82
|
/** custom guild stickers */
|
|
103
83
|
stickers?: Sticker[];
|
|
84
|
+
/** whether the guild has the boost progress bar enabled */
|
|
85
|
+
premium_progress_bar_enabled: boolean;
|
|
104
86
|
}
|
|
105
87
|
export declare namespace Guild {
|
|
106
88
|
namespace Event {
|
|
@@ -232,7 +214,13 @@ export declare enum SystemChannelFlag {
|
|
|
232
214
|
/** Suppress server boost notifications */
|
|
233
215
|
SUPPRESS_PREMIUM_SUBSCRIPTIONS = 2,
|
|
234
216
|
/** Suppress server setup tips */
|
|
235
|
-
SUPPRESS_GUILD_REMINDER_NOTIFICATIONS = 4
|
|
217
|
+
SUPPRESS_GUILD_REMINDER_NOTIFICATIONS = 4,
|
|
218
|
+
/** Hide member join sticker reply buttons */
|
|
219
|
+
SUPPRESS_JOIN_NOTIFICATION_REPLIES = 8,
|
|
220
|
+
/** Suppress role subscription purchase and renewal notifications */
|
|
221
|
+
SUPPRESS_ROLE_SUBSCRIPTION_PURCHASE_NOTIFICATIONS = 16,
|
|
222
|
+
/** Hide role subscription sticker reply buttons */
|
|
223
|
+
SUPPRESS_ROLE_SUBSCRIPTION_PURCHASE_NOTIFICATION_REPLIES = 32
|
|
236
224
|
}
|
|
237
225
|
/** https://discord.com/developers/docs/resources/guild#guild-object-guild-features */
|
|
238
226
|
export declare enum GuildFeature {
|
|
@@ -303,13 +291,23 @@ export interface GuildPreview {
|
|
|
303
291
|
approximate_presence_count: integer;
|
|
304
292
|
/** the description for the guild, if the guild is discoverable */
|
|
305
293
|
description?: string;
|
|
294
|
+
/** custom guild stickers */
|
|
295
|
+
stickers: Sticker[];
|
|
306
296
|
}
|
|
307
297
|
/** https://discord.com/developers/docs/resources/guild#guild-widget-object-guild-widget-structure */
|
|
308
298
|
export interface GuildWidget {
|
|
309
|
-
/**
|
|
310
|
-
|
|
311
|
-
/**
|
|
312
|
-
|
|
299
|
+
/** guild id */
|
|
300
|
+
id: snowflake;
|
|
301
|
+
/** guild name (2-100 characters) */
|
|
302
|
+
name: string;
|
|
303
|
+
/** instant invite for the guilds specified widget invite channel */
|
|
304
|
+
instant_invite?: string;
|
|
305
|
+
/** voice and stage channels which are accessible by everyone */
|
|
306
|
+
channels: Partial<Channel>[];
|
|
307
|
+
/** special widget user objects that includes users presence (Limit 100) */
|
|
308
|
+
members: Partial<User>[];
|
|
309
|
+
/** number of online members in this guild */
|
|
310
|
+
presence_count: integer;
|
|
313
311
|
}
|
|
314
312
|
/** https://discord.com/developers/docs/resources/guild#welcome-screen-object-welcome-screen-structure */
|
|
315
313
|
export interface WelcomeScreen {
|
package/lib/types/index.d.ts
CHANGED
|
@@ -31,6 +31,8 @@ export interface Integration {
|
|
|
31
31
|
revoked?: boolean;
|
|
32
32
|
/** The bot/OAuth2 application for discord integrations */
|
|
33
33
|
application?: IntegrationApplication;
|
|
34
|
+
/** the scopes the application has been authorized for */
|
|
35
|
+
scopes?: string[];
|
|
34
36
|
}
|
|
35
37
|
/** https://discord.com/developers/docs/resources/guild#integration-object-integration-expire-behaviors */
|
|
36
38
|
export declare enum IntegrationExpireBehavior {
|
|
@@ -54,27 +56,25 @@ export interface IntegrationApplication {
|
|
|
54
56
|
icon?: string;
|
|
55
57
|
/** the description of the app */
|
|
56
58
|
description: string;
|
|
57
|
-
/** the summary of the app */
|
|
58
|
-
summary: string;
|
|
59
59
|
/** the bot associated with this application */
|
|
60
60
|
bot?: User;
|
|
61
61
|
}
|
|
62
|
-
/** https://discord.com/developers/docs/topics/gateway#guild-integrations-update-guild-integrations-update-event-fields */
|
|
62
|
+
/** https://discord.com/developers/docs/topics/gateway-events#guild-integrations-update-guild-integrations-update-event-fields */
|
|
63
63
|
export interface GuildIntegrationsUpdateEvent {
|
|
64
64
|
/** id of the guild whose integrations were updated */
|
|
65
65
|
guild_id: snowflake;
|
|
66
66
|
}
|
|
67
|
-
/** https://discord.com/developers/docs/topics/gateway#integration-create-integration-create-event-additional-fields */
|
|
67
|
+
/** https://discord.com/developers/docs/topics/gateway-events#integration-create-integration-create-event-additional-fields */
|
|
68
68
|
export interface IntegrationCreateEvent extends Integration {
|
|
69
69
|
/** id of the guild */
|
|
70
70
|
guild_id: snowflake;
|
|
71
71
|
}
|
|
72
|
-
/** https://discord.com/developers/docs/topics/gateway#integration-update-integration-update-event-additional-fields */
|
|
72
|
+
/** https://discord.com/developers/docs/topics/gateway-events#integration-update-integration-update-event-additional-fields */
|
|
73
73
|
export interface IntegrationUpdateEvent extends Integration {
|
|
74
74
|
/** id of the guild */
|
|
75
75
|
guild_id: snowflake;
|
|
76
76
|
}
|
|
77
|
-
/** https://discord.com/developers/docs/topics/gateway#integration-delete-integration-delete-event-fields */
|
|
77
|
+
/** https://discord.com/developers/docs/topics/gateway-events#integration-delete-integration-delete-event-fields */
|
|
78
78
|
export interface IntegrationDeleteEvent {
|
|
79
79
|
/** integration id */
|
|
80
80
|
id: snowflake;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AllowedMentions, ApplicationCommand, Channel, Component, Embed, GuildMember, integer, Message, Role,
|
|
1
|
+
import { AllowedMentions, ApplicationCommand, Attachment, Channel, Component, ComponentType, Embed, GuildMember, integer, Message, Role, snowflake, User } from '.';
|
|
2
2
|
/** https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-structure */
|
|
3
3
|
export interface Interaction {
|
|
4
4
|
/** id of the interaction */
|
|
@@ -30,14 +30,50 @@ export interface Interaction {
|
|
|
30
30
|
/** guild's preferred locale, if invoked in a guild */
|
|
31
31
|
guild_locale?: string;
|
|
32
32
|
}
|
|
33
|
+
export type InteractionData = InteractionData.ApplicationCommand | InteractionData.MessageComponent | InteractionData.ModalSubmit;
|
|
34
|
+
export declare namespace InteractionData {
|
|
35
|
+
/** https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-application-command-data-structure */
|
|
36
|
+
interface ApplicationCommand {
|
|
37
|
+
/** the ID of the invoked command */
|
|
38
|
+
id: snowflake;
|
|
39
|
+
/** the name of the invoked command */
|
|
40
|
+
name: string;
|
|
41
|
+
/** the type of the invoked command */
|
|
42
|
+
type: integer;
|
|
43
|
+
/** converted users + roles + channels */
|
|
44
|
+
resolved?: ResolvedData;
|
|
45
|
+
/** the params + values from the user */
|
|
46
|
+
options?: ApplicationCommandInteractionDataOption[];
|
|
47
|
+
/** the id of the guild the command is registered to */
|
|
48
|
+
guild_id?: snowflake;
|
|
49
|
+
/** id of the user or message targeted by a user or message command */
|
|
50
|
+
target_id?: snowflake;
|
|
51
|
+
}
|
|
52
|
+
/** https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-message-component-data-structure */
|
|
53
|
+
interface MessageComponent {
|
|
54
|
+
/** the custom_id of the component */
|
|
55
|
+
custom_id: string;
|
|
56
|
+
/** the type of the component */
|
|
57
|
+
component_type: ComponentType;
|
|
58
|
+
/** values the user selected in a select menu component */
|
|
59
|
+
values?: string[];
|
|
60
|
+
}
|
|
61
|
+
/** https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-modal-submit-data-structure */
|
|
62
|
+
interface ModalSubmit {
|
|
63
|
+
custom_id: string;
|
|
64
|
+
components: Component[];
|
|
65
|
+
}
|
|
66
|
+
}
|
|
33
67
|
/** https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-type */
|
|
34
68
|
export declare enum InteractionType {
|
|
35
69
|
PING = 1,
|
|
36
70
|
APPLICATION_COMMAND = 2,
|
|
37
|
-
MESSAGE_COMPONENT = 3
|
|
71
|
+
MESSAGE_COMPONENT = 3,
|
|
72
|
+
APPLICATION_COMMAND_AUTOCOMPLETE = 4,
|
|
73
|
+
MODAL_SUBMIT = 5
|
|
38
74
|
}
|
|
39
|
-
/** https://discord.com/developers/docs/interactions/
|
|
40
|
-
export interface
|
|
75
|
+
/** https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-application-command-interaction-data-option-structure */
|
|
76
|
+
export interface ApplicationCommandInteractionDataOption {
|
|
41
77
|
/** the name of the parameter */
|
|
42
78
|
name: string;
|
|
43
79
|
/** value of application command option type */
|
|
@@ -45,31 +81,10 @@ export interface InteractionDataOption {
|
|
|
45
81
|
/** the value of the pair */
|
|
46
82
|
value?: any;
|
|
47
83
|
/** present if this option is a group or subcommand */
|
|
48
|
-
options?:
|
|
84
|
+
options?: ApplicationCommandInteractionDataOption[];
|
|
49
85
|
/** true if this option is the currently focused option for autocomplete */
|
|
50
86
|
focused?: boolean;
|
|
51
87
|
}
|
|
52
|
-
/** https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data-structure */
|
|
53
|
-
export interface InteractionData {
|
|
54
|
-
/** the ID of the invoked command */
|
|
55
|
-
id: snowflake;
|
|
56
|
-
/** the name of the invoked command */
|
|
57
|
-
name: string;
|
|
58
|
-
/** the type of the invoked command */
|
|
59
|
-
type: integer;
|
|
60
|
-
/** converted users + roles + channels */
|
|
61
|
-
resolved?: ResolvedData;
|
|
62
|
-
/** the params + values from the user */
|
|
63
|
-
options?: InteractionDataOption[];
|
|
64
|
-
/** the custom_id of the component */
|
|
65
|
-
custom_id?: string;
|
|
66
|
-
/** the type of the component */
|
|
67
|
-
component_type?: integer;
|
|
68
|
-
/** the values the user selected */
|
|
69
|
-
values?: SelectOption[];
|
|
70
|
-
/** id the of user or message targetted by a user or message command */
|
|
71
|
-
target_id?: snowflake;
|
|
72
|
-
}
|
|
73
88
|
/** https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-resolved-data-structure */
|
|
74
89
|
export interface ResolvedData {
|
|
75
90
|
/** the ids and User objects */
|
|
@@ -82,6 +97,8 @@ export interface ResolvedData {
|
|
|
82
97
|
channels?: Record<snowflake, Partial<Channel>>;
|
|
83
98
|
/** the ids and partial Message objects */
|
|
84
99
|
messages?: Record<snowflake, Partial<Message>>;
|
|
100
|
+
/** the ids and attachment objects */
|
|
101
|
+
attachments?: Record<snowflake, Attachment>;
|
|
85
102
|
}
|
|
86
103
|
/** https://discord.com/developers/docs/interactions/receiving-and-responding#message-interaction-object-message-interaction-structure */
|
|
87
104
|
export interface MessageInteraction {
|
|
@@ -93,6 +110,8 @@ export interface MessageInteraction {
|
|
|
93
110
|
name: string;
|
|
94
111
|
/** the user who invoked the interaction */
|
|
95
112
|
user: User;
|
|
113
|
+
/** member who invoked the interaction in the guild */
|
|
114
|
+
member?: Partial<GuildMember>;
|
|
96
115
|
}
|
|
97
116
|
/** https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-response-object-interaction-response-structure */
|
|
98
117
|
export interface InteractionResponse {
|
|
@@ -127,25 +146,39 @@ export declare enum InteractionCallbackType {
|
|
|
127
146
|
*/
|
|
128
147
|
MODAL = 9
|
|
129
148
|
}
|
|
130
|
-
|
|
131
|
-
export
|
|
132
|
-
/**
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
+
export type InteractionCallbackData = InteractionCallbackData.Messages | InteractionCallbackData.Autocomplete | InteractionCallbackData.Modal;
|
|
150
|
+
export declare namespace InteractionCallbackData {
|
|
151
|
+
/** https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-response-object-messages */
|
|
152
|
+
interface Messages {
|
|
153
|
+
/** is the response TTS */
|
|
154
|
+
tts?: boolean;
|
|
155
|
+
/** message content */
|
|
156
|
+
content?: string;
|
|
157
|
+
/** supports up to 10 embeds */
|
|
158
|
+
embeds?: Embed[];
|
|
159
|
+
/** allowed mentions object */
|
|
160
|
+
allowed_mentions?: AllowedMentions;
|
|
161
|
+
/** interaction callback data flags */
|
|
162
|
+
flags?: integer;
|
|
163
|
+
/** message components */
|
|
164
|
+
components?: Component[];
|
|
165
|
+
/** attachment objects with filename and description */
|
|
166
|
+
attachments?: Partial<Attachment>[];
|
|
167
|
+
}
|
|
168
|
+
/** https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-response-object-autocomplete */
|
|
169
|
+
interface Autocomplete {
|
|
170
|
+
/** autocomplete choices (max of 25 choices) */
|
|
171
|
+
choices: ApplicationCommand.OptionChoice[];
|
|
172
|
+
}
|
|
173
|
+
/** https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-response-object-modal */
|
|
174
|
+
interface Modal {
|
|
175
|
+
/** a developer-defined identifier for the modal, max 100 characters */
|
|
176
|
+
custom_id: string;
|
|
177
|
+
/** the title of the popup modal, max 45 characters */
|
|
178
|
+
title: string;
|
|
179
|
+
/** between 1 and 5 (inclusive) components that make up the modal */
|
|
180
|
+
components: Component[];
|
|
181
|
+
}
|
|
149
182
|
}
|
|
150
183
|
export interface InteractionCreateEvent extends Interaction {
|
|
151
184
|
}
|
package/lib/types/invite.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Application, Channel, Guild, GuildMember, integer, snowflake, timestamp, User } from '.';
|
|
1
|
+
import { Application, Channel, Guild, GuildMember, GuildScheduledEvent, integer, snowflake, timestamp, User } from '.';
|
|
2
2
|
/** https://discord.com/developers/docs/resources/invite#invite-object-invite-structure */
|
|
3
3
|
export interface Invite {
|
|
4
4
|
/** the invite code (unique ID) */
|
|
@@ -23,6 +23,8 @@ export interface Invite {
|
|
|
23
23
|
expires_at?: timestamp;
|
|
24
24
|
/** stage instance data if there is a public Stage instance in the Stage channel this invite is for */
|
|
25
25
|
stage_instance?: Invite.StageInstance;
|
|
26
|
+
/** guild scheduled event data, only included if guild_scheduled_event_id contains a valid guild scheduled event id */
|
|
27
|
+
guild_scheduled_event?: GuildScheduledEvent;
|
|
26
28
|
}
|
|
27
29
|
export declare namespace Invite {
|
|
28
30
|
/** https://discord.com/developers/docs/resources/invite#invite-object-invite-target-types */
|
|
@@ -55,7 +57,7 @@ export declare namespace Invite {
|
|
|
55
57
|
topic: string;
|
|
56
58
|
}
|
|
57
59
|
namespace Event {
|
|
58
|
-
/** https://discord.com/developers/docs/topics/gateway#invite-create-invite-create-event-fields */
|
|
60
|
+
/** https://discord.com/developers/docs/topics/gateway-events#invite-create-invite-create-event-fields */
|
|
59
61
|
interface Create {
|
|
60
62
|
/** the channel the invite is for */
|
|
61
63
|
channel_id: snowflake;
|
|
@@ -82,7 +84,7 @@ export declare namespace Invite {
|
|
|
82
84
|
/** how many times the invite has been used (always will be 0) */
|
|
83
85
|
uses: integer;
|
|
84
86
|
}
|
|
85
|
-
/** https://discord.com/developers/docs/topics/gateway#invite-delete-invite-delete-event-fields */
|
|
87
|
+
/** https://discord.com/developers/docs/topics/gateway-events#invite-delete-invite-delete-event-fields */
|
|
86
88
|
interface Delete {
|
|
87
89
|
/** the channel of the invite */
|
|
88
90
|
channel_id: snowflake;
|
package/lib/types/message.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AllowedMentions, Application, Channel, Component, GuildMember, integer, MessageInteraction, Reaction, snowflake, Sticker, timestamp, User } from '.';
|
|
1
|
+
import { AllowedMentions, Application, Channel, Component, GuildMember, integer, MessageInteraction, Reaction, RoleSubscriptionData, snowflake, Sticker, timestamp, User } from '.';
|
|
2
2
|
/** https://discord.com/developers/docs/resources/channel#message-object-message-structure */
|
|
3
3
|
export interface Message {
|
|
4
4
|
/** id of the message */
|
|
@@ -61,6 +61,10 @@ export interface Message {
|
|
|
61
61
|
components?: Component[];
|
|
62
62
|
/** sent if the message contains stickers */
|
|
63
63
|
sticker_items?: Sticker.Item[];
|
|
64
|
+
/** a generally increasing integer (there may be gaps or duplicates) that represents the approximate position of the message in a thread, it can be used to estimate the relative position of the message in a thread in company with total_message_sent on parent thread */
|
|
65
|
+
position?: integer;
|
|
66
|
+
/** data of the role subscription purchase or renewal that prompted this ROLE_SUBSCRIPTION_PURCHASE message */
|
|
67
|
+
role_subscription_data?: RoleSubscriptionData;
|
|
64
68
|
}
|
|
65
69
|
export declare namespace Message {
|
|
66
70
|
/** https://discord.com/developers/docs/resources/channel#message-object-message-types */
|
|
@@ -87,7 +91,11 @@ export declare namespace Message {
|
|
|
87
91
|
CHAT_INPUT_COMMAND = 20,
|
|
88
92
|
THREAD_STARTER_MESSAGE = 21,
|
|
89
93
|
GUILD_INVITE_REMINDER = 22,
|
|
90
|
-
CONTEXT_MENU_COMMAND = 23
|
|
94
|
+
CONTEXT_MENU_COMMAND = 23,
|
|
95
|
+
AUTO_MODERATION_ACTION = 24,
|
|
96
|
+
ROLE_SUBSCRIPTION_PURCHASE = 25,
|
|
97
|
+
INTERACTION_PREMIUM_UPSELL = 26,
|
|
98
|
+
GUILD_APPLICATION_PREMIUM_SUBSCRIPTION = 32
|
|
91
99
|
}
|
|
92
100
|
/** https://discord.com/developers/docs/resources/channel#message-object-message-activity-structure */
|
|
93
101
|
interface Activity {
|
|
@@ -120,7 +128,9 @@ export declare namespace Message {
|
|
|
120
128
|
/** this message is only visible to the user who invoked the Interaction */
|
|
121
129
|
EPHEMERAL = 64,
|
|
122
130
|
/** this message is an Interaction Response and the bot is "thinking" */
|
|
123
|
-
LOADING = 128
|
|
131
|
+
LOADING = 128,
|
|
132
|
+
/** this message failed to mention some roles and add their members to the thread */
|
|
133
|
+
FAILED_TO_MENTION_SOME_ROLES_IN_THREAD = 256
|
|
124
134
|
}
|
|
125
135
|
/** https://discord.com/developers/docs/resources/channel#message-reference-object-message-reference-structure */
|
|
126
136
|
interface Reference {
|
|
@@ -316,7 +326,7 @@ export declare namespace Message {
|
|
|
316
326
|
}
|
|
317
327
|
interface Update extends Message {
|
|
318
328
|
}
|
|
319
|
-
/** https://discord.com/developers/docs/topics/gateway#message-delete-message-delete-event-fields */
|
|
329
|
+
/** https://discord.com/developers/docs/topics/gateway-events#message-delete-message-delete-event-fields */
|
|
320
330
|
interface Delete {
|
|
321
331
|
/** the id of the message */
|
|
322
332
|
id: snowflake;
|
|
@@ -325,7 +335,7 @@ export declare namespace Message {
|
|
|
325
335
|
/** the id of the guild */
|
|
326
336
|
guild_id?: snowflake;
|
|
327
337
|
}
|
|
328
|
-
/** https://discord.com/developers/docs/topics/gateway#message-delete-bulk-message-delete-bulk-event-fields */
|
|
338
|
+
/** https://discord.com/developers/docs/topics/gateway-events#message-delete-bulk-message-delete-bulk-event-fields */
|
|
329
339
|
interface DeleteBulk {
|
|
330
340
|
/** the ids of the messages */
|
|
331
341
|
ids: snowflake[];
|
package/lib/types/presence.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Emoji, integer, snowflake, User } from '.';
|
|
2
|
-
/** https://discord.com/developers/docs/topics/gateway#presence-update-presence-update-event-fields */
|
|
2
|
+
/** https://discord.com/developers/docs/topics/gateway-events#presence-update-presence-update-event-fields */
|
|
3
3
|
export interface PresenceUpdateEvent {
|
|
4
4
|
/** the user presence is being updated for */
|
|
5
5
|
user: User;
|
|
@@ -12,7 +12,7 @@ export interface PresenceUpdateEvent {
|
|
|
12
12
|
/** user's platform-dependent status */
|
|
13
13
|
client_status: ClientStatus;
|
|
14
14
|
}
|
|
15
|
-
/** https://discord.com/developers/docs/topics/gateway#update-presence-status-types */
|
|
15
|
+
/** https://discord.com/developers/docs/topics/gateway-events#update-presence-status-types */
|
|
16
16
|
export declare enum StatusType {
|
|
17
17
|
/** Online */
|
|
18
18
|
ONLINE = "ONLINE",
|
|
@@ -20,12 +20,10 @@ export declare enum StatusType {
|
|
|
20
20
|
DND = "DND",
|
|
21
21
|
/** AFK */
|
|
22
22
|
IDLE = "IDLE",
|
|
23
|
-
/** Invisible and shown as offline */
|
|
24
|
-
INVISIBLE = "INVISIBLE",
|
|
25
23
|
/** Offline */
|
|
26
24
|
OFFLINE = "OFFLINE"
|
|
27
25
|
}
|
|
28
|
-
/** https://discord.com/developers/docs/topics/gateway#client-status-object */
|
|
26
|
+
/** https://discord.com/developers/docs/topics/gateway-events#client-status-object */
|
|
29
27
|
export interface ClientStatus {
|
|
30
28
|
/** the user's status set for an active desktop (Windows, Linux, Mac) application session */
|
|
31
29
|
desktop?: string;
|
|
@@ -34,12 +32,12 @@ export interface ClientStatus {
|
|
|
34
32
|
/** the user's status set for an active web (browser, bot account) application session */
|
|
35
33
|
web?: string;
|
|
36
34
|
}
|
|
37
|
-
/** https://discord.com/developers/docs/topics/gateway#activity-object-activity-structure */
|
|
35
|
+
/** https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-structure */
|
|
38
36
|
export interface Activity {
|
|
39
37
|
/** the activity's name */
|
|
40
38
|
name: string;
|
|
41
39
|
/** activity type */
|
|
42
|
-
type:
|
|
40
|
+
type: ActivityType;
|
|
43
41
|
/** stream url, is validated when type is 1 */
|
|
44
42
|
url?: string;
|
|
45
43
|
/** unix timestamp (in milliseconds) of when the activity was added to the user's session */
|
|
@@ -67,14 +65,14 @@ export interface Activity {
|
|
|
67
65
|
/** the custom buttons shown in the Rich Presence (max 2) */
|
|
68
66
|
buttons?: ActivityButton[];
|
|
69
67
|
}
|
|
70
|
-
/** https://discord.com/developers/docs/topics/gateway#activity-object-activity-timestamps */
|
|
68
|
+
/** https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-timestamps */
|
|
71
69
|
export interface ActivityTimestamps {
|
|
72
70
|
/** unix time (in milliseconds) of when the activity started */
|
|
73
71
|
start?: integer;
|
|
74
72
|
/** unix time (in milliseconds) of when the activity ends */
|
|
75
73
|
end?: integer;
|
|
76
74
|
}
|
|
77
|
-
/** https://discord.com/developers/docs/topics/gateway#activity-object-activity-emoji */
|
|
75
|
+
/** https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-emoji */
|
|
78
76
|
export interface ActivityEmoji {
|
|
79
77
|
/** the name of the emoji */
|
|
80
78
|
name: string;
|
|
@@ -83,14 +81,14 @@ export interface ActivityEmoji {
|
|
|
83
81
|
/** whether this emoji is animated */
|
|
84
82
|
animated?: boolean;
|
|
85
83
|
}
|
|
86
|
-
/** https://discord.com/developers/docs/topics/gateway#activity-object-activity-party */
|
|
84
|
+
/** https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-party */
|
|
87
85
|
export interface ActivityParty {
|
|
88
86
|
/** the id of the party */
|
|
89
87
|
id?: string;
|
|
90
88
|
/** used to show the party's current and maximum size */
|
|
91
89
|
size?: [current_size: integer, max_size: integer];
|
|
92
90
|
}
|
|
93
|
-
/** https://discord.com/developers/docs/topics/gateway#activity-object-activity-assets */
|
|
91
|
+
/** https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-assets */
|
|
94
92
|
export interface ActivityAssets {
|
|
95
93
|
/** the id for a large asset of the activity, usually a snowflake */
|
|
96
94
|
large_image?: string;
|
|
@@ -101,25 +99,23 @@ export interface ActivityAssets {
|
|
|
101
99
|
/** text displayed when hovering over the small image of the activity */
|
|
102
100
|
small_text?: string;
|
|
103
101
|
}
|
|
104
|
-
/** https://discord.com/developers/docs/topics/gateway#activity-object-activity-secrets */
|
|
102
|
+
/** https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-secrets */
|
|
105
103
|
export interface ActivitySecrets {
|
|
106
|
-
/**
|
|
107
|
-
|
|
108
|
-
/**
|
|
109
|
-
|
|
110
|
-
/**
|
|
111
|
-
|
|
112
|
-
/** text displayed when hovering over the small image of the activity */
|
|
113
|
-
small_text?: string;
|
|
104
|
+
/** Secret for joining a party */
|
|
105
|
+
join?: string;
|
|
106
|
+
/** Secret for spectating a game */
|
|
107
|
+
spectate?: string;
|
|
108
|
+
/** Secret for a specific instanced match */
|
|
109
|
+
match?: string;
|
|
114
110
|
}
|
|
115
|
-
/** https://discord.com/developers/docs/topics/gateway#activity-object-activity-button */
|
|
111
|
+
/** https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-button */
|
|
116
112
|
export interface ActivityButton {
|
|
117
113
|
/** the text shown on the button (1-32 characters) */
|
|
118
114
|
label: string;
|
|
119
115
|
/** the url opened when clicking the button (1-512 characters) */
|
|
120
116
|
url: string;
|
|
121
117
|
}
|
|
122
|
-
/** https://discord.com/developers/docs/topics/gateway#activity-object-activity-types */
|
|
118
|
+
/** https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-types */
|
|
123
119
|
export declare enum ActivityType {
|
|
124
120
|
/** Playing {name} */
|
|
125
121
|
GAME = 0,
|
|
@@ -134,14 +130,17 @@ export declare enum ActivityType {
|
|
|
134
130
|
/** Competing in {name} */
|
|
135
131
|
COMPETING = 5
|
|
136
132
|
}
|
|
137
|
-
/** https://discord.com/developers/docs/topics/gateway#activity-object-activity-flags */
|
|
133
|
+
/** https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-flags */
|
|
138
134
|
export declare enum ActivityFlag {
|
|
139
135
|
INSTANCE = 1,
|
|
140
136
|
JOIN = 2,
|
|
141
137
|
SPECTATE = 4,
|
|
142
138
|
JOIN_REQUEST = 8,
|
|
143
139
|
SYNC = 16,
|
|
144
|
-
PLAY = 32
|
|
140
|
+
PLAY = 32,
|
|
141
|
+
PARTY_PRIVACY_FRIENDS = 64,
|
|
142
|
+
PARTY_PRIVACY_VOICE_CHANNEL = 128,
|
|
143
|
+
EMBEDDED = 256
|
|
145
144
|
}
|
|
146
145
|
declare module './gateway' {
|
|
147
146
|
interface GatewayEvents {
|
package/lib/types/reaction.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ export interface Reaction {
|
|
|
10
10
|
}
|
|
11
11
|
export declare namespace Reaction {
|
|
12
12
|
namespace Event {
|
|
13
|
-
/** https://discord.com/developers/docs/topics/gateway#message-reaction-add-message-reaction-add-event-fields */
|
|
13
|
+
/** https://discord.com/developers/docs/topics/gateway-events#message-reaction-add-message-reaction-add-event-fields */
|
|
14
14
|
interface Add {
|
|
15
15
|
/** the id of the user */
|
|
16
16
|
user_id: snowflake;
|
|
@@ -25,7 +25,7 @@ export declare namespace Reaction {
|
|
|
25
25
|
/** the emoji used to react - example */
|
|
26
26
|
emoji: Partial<Emoji>;
|
|
27
27
|
}
|
|
28
|
-
/** https://discord.com/developers/docs/topics/gateway#message-reaction-remove-message-reaction-remove-event-fields */
|
|
28
|
+
/** https://discord.com/developers/docs/topics/gateway-events#message-reaction-remove-message-reaction-remove-event-fields */
|
|
29
29
|
interface Remove {
|
|
30
30
|
/** the id of the user */
|
|
31
31
|
user_id: snowflake;
|
|
@@ -38,7 +38,7 @@ export declare namespace Reaction {
|
|
|
38
38
|
/** the emoji used to react - example */
|
|
39
39
|
emoji: Partial<Emoji>;
|
|
40
40
|
}
|
|
41
|
-
/** https://discord.com/developers/docs/topics/gateway#message-reaction-remove-all-message-reaction-remove-all-event-fields */
|
|
41
|
+
/** https://discord.com/developers/docs/topics/gateway-events#message-reaction-remove-all-message-reaction-remove-all-event-fields */
|
|
42
42
|
interface RemoveAll {
|
|
43
43
|
/** the id of the channel */
|
|
44
44
|
channel_id: snowflake;
|
|
@@ -47,7 +47,7 @@ export declare namespace Reaction {
|
|
|
47
47
|
/** the id of the guild */
|
|
48
48
|
guild_id?: snowflake;
|
|
49
49
|
}
|
|
50
|
-
/** https://discord.com/developers/docs/topics/gateway#message-reaction-remove-emoji-message-reaction-remove-emoji */
|
|
50
|
+
/** https://discord.com/developers/docs/topics/gateway-events#message-reaction-remove-emoji-message-reaction-remove-emoji */
|
|
51
51
|
interface RemoveEmoji {
|
|
52
52
|
/** the id of the channel */
|
|
53
53
|
channel_id: snowflake;
|
package/lib/types/role.d.ts
CHANGED
|
@@ -78,7 +78,9 @@ export declare enum Permission {
|
|
|
78
78
|
/** Allows for sending messages in threads */
|
|
79
79
|
SEND_MESSAGES_IN_THREADS = 64,
|
|
80
80
|
/** Allows for launching activities (applications with the EMBEDDED flag) in a voice channel */
|
|
81
|
-
START_EMBEDDED_ACTIVITIES = 128
|
|
81
|
+
START_EMBEDDED_ACTIVITIES = 128,
|
|
82
|
+
/** Allows for timing out users to prevent them from sending or reacting to messages in chat and threads, and from speaking in voice and stage channels */
|
|
83
|
+
MODERATE_MEMBERS = 256
|
|
82
84
|
}
|
|
83
85
|
/** https://discord.com/developers/docs/topics/permissions#role-object-role-structure */
|
|
84
86
|
export interface Role {
|
|
@@ -158,22 +160,28 @@ export interface RoleTags {
|
|
|
158
160
|
integration_id?: snowflake;
|
|
159
161
|
/** whether this is the guild's premium subscriber role */
|
|
160
162
|
premium_subscriber?: null;
|
|
163
|
+
/** the id of this role's subscription sku and listing */
|
|
164
|
+
subscription_listing_id?: snowflake;
|
|
165
|
+
/** whether this role is available for purchase */
|
|
166
|
+
available_for_purchase?: null;
|
|
167
|
+
/** whether this role is a guild's linked role */
|
|
168
|
+
guild_connections?: null;
|
|
161
169
|
}
|
|
162
|
-
/** https://discord.com/developers/docs/topics/gateway#guild-role-create-guild-role-create-event-fields */
|
|
170
|
+
/** https://discord.com/developers/docs/topics/gateway-events#guild-role-create-guild-role-create-event-fields */
|
|
163
171
|
export interface GuildRoleCreateEvent {
|
|
164
172
|
/** the id of the guild */
|
|
165
173
|
guild_id: snowflake;
|
|
166
174
|
/** the role created */
|
|
167
175
|
role: Role;
|
|
168
176
|
}
|
|
169
|
-
/** https://discord.com/developers/docs/topics/gateway#guild-role-update-guild-role-update-event-fields */
|
|
177
|
+
/** https://discord.com/developers/docs/topics/gateway-events#guild-role-update-guild-role-update-event-fields */
|
|
170
178
|
export interface GuildRoleUpdateEvent {
|
|
171
179
|
/** the id of the guild */
|
|
172
180
|
guild_id: snowflake;
|
|
173
181
|
/** the role updated */
|
|
174
182
|
role: Role;
|
|
175
183
|
}
|
|
176
|
-
/** https://discord.com/developers/docs/topics/gateway#guild-role-delete-guild-role-delete-event-fields */
|
|
184
|
+
/** https://discord.com/developers/docs/topics/gateway-events#guild-role-delete-guild-role-delete-event-fields */
|
|
177
185
|
export interface GuildRoleDeleteEvent {
|
|
178
186
|
/** id of the guild */
|
|
179
187
|
guild_id: snowflake;
|