@koishijs/plugin-adapter-discord 2.0.0-alpha.7 → 2.0.0-beta.3

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.
@@ -0,0 +1,318 @@
1
+ import { Application, Channel, ChannelType, Component, GuildMember, integer, MessageInteraction, Reaction, snowflake, Sticker, StickerItem, timestamp, User } from '.';
2
+ /** https://discord.com/developers/docs/resources/channel#message-object-message-structure */
3
+ export interface Message {
4
+ /** id of the message */
5
+ id: snowflake;
6
+ /** id of the channel the message was sent in */
7
+ channel_id: snowflake;
8
+ /** id of the guild the message was sent in */
9
+ guild_id?: snowflake;
10
+ /** the author of this message (not guaranteed to be a valid user, see below) */
11
+ author: User;
12
+ /** member properties for this message's author */
13
+ member?: Partial<GuildMember>;
14
+ /** contents of the message */
15
+ content: string;
16
+ /** when this message was sent */
17
+ timestamp: timestamp;
18
+ /** when this message was edited (or null if never) */
19
+ edited_timestamp?: timestamp;
20
+ /** whether this was a TTS message */
21
+ tts: boolean;
22
+ /** whether this message mentions everyone */
23
+ mention_everyone: boolean;
24
+ /** users specifically mentioned in the message */
25
+ mentions: User[];
26
+ /** roles specifically mentioned in this message */
27
+ mention_roles: snowflake[];
28
+ /** channels specifically mentioned in this message */
29
+ mention_channels?: ChannelMention[];
30
+ /** any attached files */
31
+ attachments: Attachment[];
32
+ /** any embedded content */
33
+ embeds: Embed[];
34
+ /** reactions to the message */
35
+ reactions?: Reaction[];
36
+ /** used for validating a message was sent */
37
+ nonce?: integer | string;
38
+ /** whether this message is pinned */
39
+ pinned: boolean;
40
+ /** if the message is generated by a webhook, this is the webhook's id */
41
+ webhook_id?: snowflake;
42
+ /** type of message */
43
+ type: integer;
44
+ /** sent with Rich Presence-related chat embeds */
45
+ activity?: MessageActivity;
46
+ /** sent with Rich Presence-related chat embeds */
47
+ application?: Partial<Application>;
48
+ /** if the message is a response to an Interaction, this is the id of the interaction's application */
49
+ application_id?: snowflake;
50
+ /** data showing the source of a crosspost, channel follow add, pin, or reply message */
51
+ message_reference?: MessageReference;
52
+ /** message flags combined as a bitfield */
53
+ flags?: integer;
54
+ /** the message associated with the message_reference */
55
+ referenced_message?: Message;
56
+ /** sent if the message is a response to an Interaction */
57
+ interaction?: MessageInteraction;
58
+ /** the thread that was started from this message, includes thread member object */
59
+ thread?: Channel;
60
+ /** sent if the message contains components like buttons, action rows, or other interactive components */
61
+ components?: Component[];
62
+ /** sent if the message contains stickers */
63
+ sticker_items?: StickerItem[];
64
+ /** Deprecated the stickers sent with the message */
65
+ stickers?: Sticker[];
66
+ }
67
+ /** https://discord.com/developers/docs/resources/channel#message-object-message-types */
68
+ export declare enum MessageType {
69
+ DEFAULT = 0,
70
+ RECIPIENT_ADD = 1,
71
+ RECIPIENT_REMOVE = 2,
72
+ CALL = 3,
73
+ CHANNEL_NAME_CHANGE = 4,
74
+ CHANNEL_ICON_CHANGE = 5,
75
+ CHANNEL_PINNED_MESSAGE = 6,
76
+ GUILD_MEMBER_JOIN = 7,
77
+ USER_PREMIUM_GUILD_SUBSCRIPTION = 8,
78
+ USER_PREMIUM_GUILD_SUBSCRIPTION_TIER_1 = 9,
79
+ USER_PREMIUM_GUILD_SUBSCRIPTION_TIER_2 = 10,
80
+ USER_PREMIUM_GUILD_SUBSCRIPTION_TIER_3 = 11,
81
+ CHANNEL_FOLLOW_ADD = 12,
82
+ GUILD_DISCOVERY_DISQUALIFIED = 14,
83
+ GUILD_DISCOVERY_REQUALIFIED = 15,
84
+ GUILD_DISCOVERY_GRACE_PERIOD_INITIAL_WARNING = 16,
85
+ GUILD_DISCOVERY_GRACE_PERIOD_FINAL_WARNING = 17,
86
+ THREAD_CREATED = 18,
87
+ REPLY = 19,
88
+ CHAT_INPUT_COMMAND = 20,
89
+ THREAD_STARTER_MESSAGE = 21,
90
+ GUILD_INVITE_REMINDER = 22,
91
+ CONTEXT_MENU_COMMAND = 23
92
+ }
93
+ /** https://discord.com/developers/docs/resources/channel#message-object-message-activity-structure */
94
+ export interface MessageActivity {
95
+ /** type of message activity */
96
+ type: integer;
97
+ /** party_id from a Rich Presence event */
98
+ party_id?: string;
99
+ }
100
+ /** https://discord.com/developers/docs/resources/channel#message-object-message-activity-types */
101
+ export declare enum MessageActivityType {
102
+ JOIN = 1,
103
+ SPECTATE = 2,
104
+ LISTEN = 3,
105
+ JOIN_REQUEST = 5
106
+ }
107
+ /** https://discord.com/developers/docs/resources/channel#message-object-message-flags */
108
+ export declare enum MessageFlag {
109
+ /** this message has been published to subscribed channels (via Channel Following) */
110
+ CROSSPOSTED = 1,
111
+ /** this message originated from a message in another channel (via Channel Following) */
112
+ IS_CROSSPOST = 2,
113
+ /** do not include any embeds when serializing this message */
114
+ SUPPRESS_EMBEDS = 4,
115
+ /** the source message for this crosspost has been deleted (via Channel Following) */
116
+ SOURCE_MESSAGE_DELETED = 8,
117
+ /** this message came from the urgent message system */
118
+ URGENT = 16,
119
+ /** this message has an associated thread, with the same id as the message */
120
+ HAS_THREAD = 32,
121
+ /** this message is only visible to the user who invoked the Interaction */
122
+ EPHEMERAL = 64,
123
+ /** this message is an Interaction Response and the bot is "thinking" */
124
+ LOADING = 128
125
+ }
126
+ /** https://discord.com/developers/docs/resources/channel#message-reference-object-message-reference-structure */
127
+ export interface MessageReference {
128
+ /** id of the originating message */
129
+ message_id?: snowflake;
130
+ /** id of the originating message's channel */
131
+ channel_id?: snowflake;
132
+ /** id of the originating message's guild */
133
+ guild_id?: snowflake;
134
+ /** when sending, whether to error if the referenced message doesn't exist instead of sending as a normal (non-reply) message, default true */
135
+ fail_if_not_exists?: boolean;
136
+ }
137
+ /** https://discord.com/developers/docs/resources/channel#embed-object-embed-structure */
138
+ export interface Embed {
139
+ /** title of embed */
140
+ title?: string;
141
+ /** type of embed (always "rich" for webhook embeds) */
142
+ type?: string;
143
+ /** description of embed */
144
+ description?: string;
145
+ /** url of embed */
146
+ url?: string;
147
+ /** timestamp of embed content */
148
+ timestamp?: timestamp;
149
+ /** color code of the embed */
150
+ color?: integer;
151
+ /** footer information */
152
+ footer?: EmbedFooter;
153
+ /** image information */
154
+ image?: EmbedImage;
155
+ /** thumbnail information */
156
+ thumbnail?: EmbedThumbnail;
157
+ /** video information */
158
+ video?: EmbedVideo;
159
+ /** provider information */
160
+ provider?: EmbedProvider;
161
+ /** author information */
162
+ author?: EmbedAuthor;
163
+ /** fields information */
164
+ fields?: EmbedField[];
165
+ }
166
+ /** https://discord.com/developers/docs/resources/channel#embed-object-embed-thumbnail-structure */
167
+ export interface EmbedThumbnail {
168
+ /** source url of thumbnail (only supports http(s) and attachments) */
169
+ url: string;
170
+ /** a proxied url of the thumbnail */
171
+ proxy_url?: string;
172
+ /** height of thumbnail */
173
+ height?: integer;
174
+ /** width of thumbnail */
175
+ width?: integer;
176
+ }
177
+ /** https://discord.com/developers/docs/resources/channel#embed-object-embed-video-structure */
178
+ export interface EmbedVideo {
179
+ /** source url of video */
180
+ url?: string;
181
+ /** a proxied url of the video */
182
+ proxy_url?: string;
183
+ /** height of video */
184
+ height?: integer;
185
+ /** width of video */
186
+ width?: integer;
187
+ }
188
+ /** https://discord.com/developers/docs/resources/channel#embed-object-embed-image-structure */
189
+ export interface EmbedImage {
190
+ /** source url of image (only supports http(s) and attachments) */
191
+ url: string;
192
+ /** a proxied url of the image */
193
+ proxy_url?: string;
194
+ /** height of image */
195
+ height?: integer;
196
+ /** width of image */
197
+ width?: integer;
198
+ }
199
+ /** https://discord.com/developers/docs/resources/channel#embed-object-embed-provider-structure */
200
+ export interface EmbedProvider {
201
+ /** name of provider */
202
+ name?: string;
203
+ /** url of provider */
204
+ url?: string;
205
+ }
206
+ /** https://discord.com/developers/docs/resources/channel#embed-object-embed-author-structure */
207
+ export interface EmbedAuthor {
208
+ /** name of author */
209
+ name: string;
210
+ /** url of author */
211
+ url?: string;
212
+ /** url of author icon (only supports http(s) and attachments) */
213
+ icon_url?: string;
214
+ /** a proxied url of author icon */
215
+ proxy_icon_url?: string;
216
+ }
217
+ /** https://discord.com/developers/docs/resources/channel#embed-object-embed-footer-structure */
218
+ export interface EmbedFooter {
219
+ /** footer text */
220
+ text: string;
221
+ /** url of footer icon (only supports http(s) and attachments) */
222
+ icon_url?: string;
223
+ /** a proxied url of footer icon */
224
+ proxy_icon_url?: string;
225
+ }
226
+ /** https://discord.com/developers/docs/resources/channel#embed-object-embed-field-structure */
227
+ export interface EmbedField {
228
+ /** name of the field */
229
+ name: string;
230
+ /** value of the field */
231
+ value: string;
232
+ /** whether or not this field should display inline */
233
+ inline?: boolean;
234
+ }
235
+ /** https://discord.com/developers/docs/resources/channel#attachment-object-attachment-structure */
236
+ export interface Attachment {
237
+ /** attachment id */
238
+ id: snowflake;
239
+ /** name of file attached */
240
+ filename: string;
241
+ /** the attachment's media type */
242
+ content_type?: string;
243
+ /** size of file in bytes */
244
+ size: integer;
245
+ /** source url of file */
246
+ url: string;
247
+ /** a proxied url of file */
248
+ proxy_url: string;
249
+ /** height of file (if image) */
250
+ height?: integer;
251
+ /** width of file (if image) */
252
+ width?: integer;
253
+ /** whether this attachment is ephemeral */
254
+ ephemeral?: boolean;
255
+ }
256
+ /** https://discord.com/developers/docs/resources/channel#channel-mention-object-channel-mention-structure */
257
+ export interface ChannelMention {
258
+ /** id of the channel */
259
+ id: snowflake;
260
+ /** id of the guild containing the channel */
261
+ guild_id: snowflake;
262
+ /** the type of channel */
263
+ type: ChannelType;
264
+ /** the name of the channel */
265
+ name: string;
266
+ }
267
+ export interface MessageCreateEvent extends Message {
268
+ }
269
+ export interface MessageUpdateEvent extends Message {
270
+ }
271
+ /** https://discord.com/developers/docs/topics/gateway#message-delete-message-delete-event-fields */
272
+ export interface MessageDeleteEvent {
273
+ /** the id of the message */
274
+ id: snowflake;
275
+ /** the id of the channel */
276
+ channel_id: snowflake;
277
+ /** the id of the guild */
278
+ guild_id?: snowflake;
279
+ }
280
+ /** https://discord.com/developers/docs/topics/gateway#message-delete-bulk-message-delete-bulk-event-fields */
281
+ export interface MessageDeleteBulkEvent {
282
+ /** the ids of the messages */
283
+ ids: snowflake[];
284
+ /** the id of the channel */
285
+ channel_id: snowflake;
286
+ /** the id of the guild */
287
+ guild_id?: snowflake;
288
+ }
289
+ declare module './gateway' {
290
+ interface GatewayEvents {
291
+ /** message was created */
292
+ MESSAGE_CREATE: MessageCreateEvent;
293
+ /** message was edited */
294
+ MESSAGE_UPDATE: MessageUpdateEvent;
295
+ /** message was deleted */
296
+ MESSAGE_DELETE: MessageDeleteEvent;
297
+ /** multiple messages were deleted at once */
298
+ MESSAGE_DELETE_BULK: MessageDeleteBulkEvent;
299
+ }
300
+ }
301
+ declare module './internal' {
302
+ interface Internal {
303
+ /** https://discord.com/developers/docs/resources/channel#get-channel-messages */
304
+ getChannelMessages(channel_id: snowflake): Promise<Message[]>;
305
+ /** https://discord.com/developers/docs/resources/channel#get-channel-message */
306
+ getChannelMessage(channel_id: snowflake, message_id: snowflake): Promise<Message>;
307
+ /** https://discord.com/developers/docs/resources/channel#create-message */
308
+ createMessage(channel_id: snowflake, data: Partial<Message>): Promise<Message>;
309
+ /** https://discord.com/developers/docs/resources/channel#crosspost-message */
310
+ crosspostMessage(channel_id: snowflake, message_id: snowflake): Promise<Message>;
311
+ /** https://discord.com/developers/docs/resources/channel#edit-message */
312
+ editMessage(channel_id: snowflake, message_id: snowflake, data: Partial<Message>): Promise<Message>;
313
+ /** https://discord.com/developers/docs/resources/channel#delete-message */
314
+ deleteMessage(channel_id: snowflake, message_id: snowflake): Promise<void>;
315
+ /** https://discord.com/developers/docs/resources/channel#bulk-delete-messages */
316
+ bulkDeleteMessages(channel_id: snowflake, message_ids: snowflake[]): Promise<void>;
317
+ }
318
+ }
@@ -0,0 +1,151 @@
1
+ import { Emoji, integer, snowflake, User } from '.';
2
+ /** https://discord.com/developers/docs/topics/gateway#presence-update-presence-update-event-fields */
3
+ export interface PresenceUpdateEvent {
4
+ /** the user presence is being updated for */
5
+ user: User;
6
+ /** id of the guild */
7
+ guild_id: snowflake;
8
+ /** either "idle", "dnd", "online", or "offline" */
9
+ status: StatusType;
10
+ /** user's current activities */
11
+ activities: Activity[];
12
+ /** user's platform-dependent status */
13
+ client_status: ClientStatus;
14
+ }
15
+ /** https://discord.com/developers/docs/topics/gateway#update-presence-status-types */
16
+ export declare enum StatusType {
17
+ /** Online */
18
+ ONLINE = "ONLINE",
19
+ /** Do Not Disturb */
20
+ DND = "DND",
21
+ /** AFK */
22
+ IDLE = "IDLE",
23
+ /** Invisible and shown as offline */
24
+ INVISIBLE = "INVISIBLE",
25
+ /** Offline */
26
+ OFFLINE = "OFFLINE"
27
+ }
28
+ /** https://discord.com/developers/docs/topics/gateway#client-status-object */
29
+ export interface ClientStatus {
30
+ /** the user's status set for an active desktop (Windows, Linux, Mac) application session */
31
+ desktop?: string;
32
+ /** the user's status set for an active mobile (iOS, Android) application session */
33
+ mobile?: string;
34
+ /** the user's status set for an active web (browser, bot account) application session */
35
+ web?: string;
36
+ }
37
+ /** https://discord.com/developers/docs/topics/gateway#activity-object-activity-structure */
38
+ export interface Activity {
39
+ /** the activity's name */
40
+ name: string;
41
+ /** activity type */
42
+ type: integer;
43
+ /** stream url, is validated when type is 1 */
44
+ url?: string;
45
+ /** unix timestamp (in milliseconds) of when the activity was added to the user's session */
46
+ created_at: integer;
47
+ /** unix timestamps for start and/or end of the game */
48
+ timestamps?: ActivityTimestamps;
49
+ /** application id for the game */
50
+ application_id?: snowflake;
51
+ /** what the player is currently doing */
52
+ details?: string;
53
+ /** the user's current party status */
54
+ state?: string;
55
+ /** the emoji used for a custom status */
56
+ emoji?: Emoji;
57
+ /** information for the current party of the player */
58
+ party?: ActivityParty;
59
+ /** images for the presence and their hover texts */
60
+ assets?: ActivityAssets;
61
+ /** secrets for Rich Presence joining and spectating */
62
+ secrets?: ActivitySecrets;
63
+ /** whether or not the activity is an instanced game session */
64
+ instance?: boolean;
65
+ /** activity flags ORd together, describes what the payload includes */
66
+ flags?: integer;
67
+ /** the custom buttons shown in the Rich Presence (max 2) */
68
+ buttons?: ActivityButton[];
69
+ }
70
+ /** https://discord.com/developers/docs/topics/gateway#activity-object-activity-timestamps */
71
+ export interface ActivityTimestamps {
72
+ /** unix time (in milliseconds) of when the activity started */
73
+ start?: integer;
74
+ /** unix time (in milliseconds) of when the activity ends */
75
+ end?: integer;
76
+ }
77
+ /** https://discord.com/developers/docs/topics/gateway#activity-object-activity-emoji */
78
+ export interface ActivityEmoji {
79
+ /** the name of the emoji */
80
+ name: string;
81
+ /** the id of the emoji */
82
+ id?: snowflake;
83
+ /** whether this emoji is animated */
84
+ animated?: boolean;
85
+ }
86
+ /** https://discord.com/developers/docs/topics/gateway#activity-object-activity-party */
87
+ export interface ActivityParty {
88
+ /** the id of the party */
89
+ id?: string;
90
+ /** used to show the party's current and maximum size */
91
+ size?: [current_size: integer, max_size: integer];
92
+ }
93
+ /** https://discord.com/developers/docs/topics/gateway#activity-object-activity-assets */
94
+ export interface ActivityAssets {
95
+ /** the id for a large asset of the activity, usually a snowflake */
96
+ large_image?: string;
97
+ /** text displayed when hovering over the large image of the activity */
98
+ large_text?: string;
99
+ /** the id for a small asset of the activity, usually a snowflake */
100
+ small_image?: string;
101
+ /** text displayed when hovering over the small image of the activity */
102
+ small_text?: string;
103
+ }
104
+ /** https://discord.com/developers/docs/topics/gateway#activity-object-activity-secrets */
105
+ export interface ActivitySecrets {
106
+ /** the id for a large asset of the activity, usually a snowflake */
107
+ large_image?: string;
108
+ /** text displayed when hovering over the large image of the activity */
109
+ large_text?: string;
110
+ /** the id for a small asset of the activity, usually a snowflake */
111
+ small_image?: string;
112
+ /** text displayed when hovering over the small image of the activity */
113
+ small_text?: string;
114
+ }
115
+ /** https://discord.com/developers/docs/topics/gateway#activity-object-activity-button */
116
+ export interface ActivityButton {
117
+ /** the text shown on the button (1-32 characters) */
118
+ label: string;
119
+ /** the url opened when clicking the button (1-512 characters) */
120
+ url: string;
121
+ }
122
+ /** https://discord.com/developers/docs/topics/gateway#activity-object-activity-types */
123
+ export declare enum ActivityType {
124
+ /** Playing {name} */
125
+ GAME = 0,
126
+ /** Streaming {details} */
127
+ STREAMING = 1,
128
+ /** Listening to {name} */
129
+ LISTENING = 2,
130
+ /** Watching {name} */
131
+ WATCHING = 3,
132
+ /** {emoji} {name} */
133
+ CUSTOM = 4,
134
+ /** Competing in {name} */
135
+ COMPETING = 5
136
+ }
137
+ /** https://discord.com/developers/docs/topics/gateway#activity-object-activity-flags */
138
+ export declare enum ActivityFlag {
139
+ INSTANCE = 1,
140
+ JOIN = 2,
141
+ SPECTATE = 4,
142
+ JOIN_REQUEST = 8,
143
+ SYNC = 16,
144
+ PLAY = 32
145
+ }
146
+ declare module './gateway' {
147
+ interface GatewayEvents {
148
+ /** user was updated */
149
+ PRESENCE_UPDATE: PresenceUpdateEvent;
150
+ }
151
+ }
@@ -0,0 +1,147 @@
1
+ import { integer, snowflake } from '.';
2
+ /** https://discord.com/developers/docs/topics/permissions#permissions-bitwise-permission-flags */
3
+ export declare enum Permission {
4
+ /** Allows creation of instant invites */
5
+ CREATE_INSTANT_INVITE = 1,
6
+ /** Allows kicking members */
7
+ KICK_MEMBERS = 2,
8
+ /** Allows banning members */
9
+ BAN_MEMBERS = 4,
10
+ /** Allows all permissions and bypasses channel permission overwrites */
11
+ ADMINISTRATOR = 8,
12
+ /** Allows management and editing of channels */
13
+ MANAGE_CHANNELS = 16,
14
+ /** Allows management and editing of the guild */
15
+ MANAGE_GUILD = 32,
16
+ /** Allows for the addition of reactions to messages */
17
+ ADD_REACTIONS = 64,
18
+ /** Allows for viewing of audit logs */
19
+ VIEW_AUDIT_LOG = 128,
20
+ /** Allows for using priority speaker in a voice channel */
21
+ PRIORITY_SPEAKER = 256,
22
+ /** Allows the user to go live */
23
+ STREAM = 512,
24
+ /** Allows guild members to view a channel, which includes reading messages in text channels */
25
+ VIEW_CHANNEL = 1024,
26
+ /** Allows for sending messages in a channel (does not allow sending messages in threads) */
27
+ SEND_MESSAGES = 2048,
28
+ /** Allows for sending of /tts messages */
29
+ SEND_TTS_MESSAGES = 4096,
30
+ /** Allows for deletion of other users messages */
31
+ MANAGE_MESSAGES = 8192,
32
+ /** Links sent by users with this permission will be auto-embedded */
33
+ EMBED_LINKS = 16384,
34
+ /** Allows for uploading images and files */
35
+ ATTACH_FILES = 32768,
36
+ /** Allows for reading of message history */
37
+ READ_MESSAGE_HISTORY = 65536,
38
+ /** Allows for using the @everyone tag to notify all users in a channel, and the @here tag to notify all online users in a channel */
39
+ MENTION_EVERYONE = 131072,
40
+ /** Allows the usage of custom emojis from other servers */
41
+ USE_EXTERNAL_EMOJIS = 262144,
42
+ /** Allows for viewing guild insights */
43
+ VIEW_GUILD_INSIGHTS = 524288,
44
+ /** Allows for joining of a voice channel */
45
+ CONNECT = 1048576,
46
+ /** Allows for speaking in a voice channel */
47
+ SPEAK = 2097152,
48
+ /** Allows for muting members in a voice channel */
49
+ MUTE_MEMBERS = 4194304,
50
+ /** Allows for deafening of members in a voice channel */
51
+ DEAFEN_MEMBERS = 8388608,
52
+ /** Allows for moving of members between voice channels */
53
+ MOVE_MEMBERS = 16777216,
54
+ /** Allows for using voice-activity-detection in a voice channel */
55
+ USE_VAD = 33554432,
56
+ /** Allows for modification of own nickname */
57
+ CHANGE_NICKNAME = 67108864,
58
+ /** Allows for modification of other users nicknames */
59
+ MANAGE_NICKNAMES = 134217728,
60
+ /** Allows management and editing of roles */
61
+ MANAGE_ROLES = 268435456,
62
+ /** Allows management and editing of webhooks */
63
+ MANAGE_WEBHOOKS = 536870912,
64
+ /** Allows management and editing of emojis and stickers */
65
+ MANAGE_EMOJIS_AND_STICKERS = 1073741824,
66
+ /** Allows members to use application commands, including slash commands and context menu commands. */
67
+ USE_APPLICATION_COMMANDS = -2147483648,
68
+ /** Allows for requesting to speak in stage channels. (This permission is under active development and may be changed or removed.) */
69
+ REQUEST_TO_SPEAK = 1,
70
+ /** Allows for deleting and archiving threads, and viewing all private threads */
71
+ MANAGE_THREADS = 4,
72
+ /** Allows for creating threads */
73
+ CREATE_PUBLIC_THREADS = 8,
74
+ /** Allows for creating private threads */
75
+ CREATE_PRIVATE_THREADS = 16,
76
+ /** Allows the usage of custom stickers from other servers */
77
+ USE_EXTERNAL_STICKERS = 32,
78
+ /** Allows for sending messages in threads */
79
+ SEND_MESSAGES_IN_THREADS = 64,
80
+ /** Allows for launching activities (applications with the EMBEDDED flag) in a voice channel */
81
+ START_EMBEDDED_ACTIVITIES = 128
82
+ }
83
+ /** https://discord.com/developers/docs/topics/permissions#role-object-role-structure */
84
+ export interface Role {
85
+ /** role id */
86
+ id: snowflake;
87
+ /** role name */
88
+ name: string;
89
+ /** integer representation of hexadecimal color code */
90
+ color: integer;
91
+ /** if this role is pinned in the user listing */
92
+ hoist: boolean;
93
+ /** role icon hash */
94
+ icon?: string;
95
+ /** role unicode emoji */
96
+ unicode_emoji?: string;
97
+ /** position of this role */
98
+ position: integer;
99
+ /** permission bit set */
100
+ permissions: string;
101
+ /** whether this role is managed by an integration */
102
+ managed: boolean;
103
+ /** whether this role is mentionable */
104
+ mentionable: boolean;
105
+ /** the tags this role has */
106
+ tags?: RoleTags;
107
+ }
108
+ /** https://discord.com/developers/docs/topics/permissions#role-object-role-tags-structure */
109
+ export interface RoleTags {
110
+ /** the id of the bot this role belongs to */
111
+ bot_id?: snowflake;
112
+ /** the id of the integration this role belongs to */
113
+ integration_id?: snowflake;
114
+ /** whether this is the guild's premium subscriber role */
115
+ premium_subscriber?: null;
116
+ }
117
+ /** https://discord.com/developers/docs/topics/gateway#guild-role-create-guild-role-create-event-fields */
118
+ export interface GuildRoleCreateEvent {
119
+ /** the id of the guild */
120
+ guild_id: snowflake;
121
+ /** the role created */
122
+ role: Role;
123
+ }
124
+ /** https://discord.com/developers/docs/topics/gateway#guild-role-update-guild-role-update-event-fields */
125
+ export interface GuildRoleUpdateEvent {
126
+ /** the id of the guild */
127
+ guild_id: snowflake;
128
+ /** the role updated */
129
+ role: Role;
130
+ }
131
+ /** https://discord.com/developers/docs/topics/gateway#guild-role-delete-guild-role-delete-event-fields */
132
+ export interface GuildRoleDeleteEvent {
133
+ /** id of the guild */
134
+ guild_id: snowflake;
135
+ /** id of the role */
136
+ role_id: snowflake;
137
+ }
138
+ declare module './gateway' {
139
+ interface GatewayEvents {
140
+ /** guild role was created */
141
+ GUILD_ROLE_CREATE: GuildRoleCreateEvent;
142
+ /** guild role was updated */
143
+ GUILD_ROLE_UPDATE: GuildRoleUpdateEvent;
144
+ /** guild role was deleted */
145
+ GUILD_ROLE_DELETE: GuildRoleDeleteEvent;
146
+ }
147
+ }
@@ -0,0 +1,32 @@
1
+ import { integer, snowflake } from '.';
2
+ /** https://discord.com/developers/docs/resources/stage-instance#stage-instance-object-stage-instance-structure */
3
+ export interface StageInstance {
4
+ /** The id of this Stage instance */
5
+ id: snowflake;
6
+ /** The guild id of the associated Stage channel */
7
+ guild_id: snowflake;
8
+ /** The id of the associated Stage channel */
9
+ channel_id: snowflake;
10
+ /** The topic of the Stage instance (1-120 characters) */
11
+ topic: string;
12
+ /** The privacy level of the Stage instance */
13
+ privacy_level: integer;
14
+ /** Whether or not Stage Discovery is disabled */
15
+ discoverable_disabled: boolean;
16
+ }
17
+ export interface StageInstanceCreateEvent extends StageInstance {
18
+ }
19
+ export interface StageInstanceDeleteEvent extends StageInstance {
20
+ }
21
+ export interface StageInstanceUpdateEvent extends StageInstance {
22
+ }
23
+ declare module './gateway' {
24
+ interface GatewayEvents {
25
+ /** stage instance was created */
26
+ STAGE_INSTANCE_CREATE: StageInstanceCreateEvent;
27
+ /** stage instance was deleted or closed */
28
+ STAGE_INSTANCE_DELETE: StageInstanceDeleteEvent;
29
+ /** stage instance was updated */
30
+ STAGE_INSTANCE_UPDATE: StageInstanceUpdateEvent;
31
+ }
32
+ }