@satorijs/adapter-discord 4.1.3 → 4.1.5

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.
Files changed (42) hide show
  1. package/lib/index.js +15 -21
  2. package/lib/index.js.map +2 -3
  3. package/lib/types/internal.d.ts +3 -2
  4. package/lib/utils.d.ts +1 -1
  5. package/package.json +5 -4
  6. package/src/bot.ts +218 -0
  7. package/src/index.ts +27 -0
  8. package/src/message.ts +444 -0
  9. package/src/types/.eslintrc.yml +2 -0
  10. package/src/types/application-role-connection.ts +61 -0
  11. package/src/types/application.ts +120 -0
  12. package/src/types/audit-log.ts +219 -0
  13. package/src/types/auto-moderation.ts +189 -0
  14. package/src/types/ban.ts +92 -0
  15. package/src/types/channel.ts +501 -0
  16. package/src/types/command.ts +320 -0
  17. package/src/types/component.ts +125 -0
  18. package/src/types/device.ts +44 -0
  19. package/src/types/emoji.ts +96 -0
  20. package/src/types/gateway.ts +334 -0
  21. package/src/types/guild-member.ts +260 -0
  22. package/src/types/guild-template.ts +109 -0
  23. package/src/types/guild.ts +476 -0
  24. package/src/types/index.ts +49 -0
  25. package/src/types/integration.ts +130 -0
  26. package/src/types/interaction.ts +283 -0
  27. package/src/types/internal.ts +43 -0
  28. package/src/types/invite.ts +192 -0
  29. package/src/types/message.ts +470 -0
  30. package/src/types/presence.ts +163 -0
  31. package/src/types/reaction.ts +139 -0
  32. package/src/types/role.ts +252 -0
  33. package/src/types/scheduled-event.ts +200 -0
  34. package/src/types/stage-instance.ts +98 -0
  35. package/src/types/sticker.ts +179 -0
  36. package/src/types/team.ts +33 -0
  37. package/src/types/thread.ts +298 -0
  38. package/src/types/user.ts +154 -0
  39. package/src/types/voice.ts +124 -0
  40. package/src/types/webhook.ts +246 -0
  41. package/src/utils.ts +391 -0
  42. package/src/ws.ts +122 -0
@@ -0,0 +1,501 @@
1
+ import { GuildMember, integer, Internal, snowflake, ThreadMember, ThreadMetadata, timestamp, User } from '.'
2
+
3
+ /** https://discord.com/developers/docs/resources/channel#channel-object-channel-structure */
4
+ export interface Channel {
5
+ /** the id of this channel */
6
+ id: snowflake
7
+ /** the type of channel */
8
+ type: Channel.Type
9
+ /** the id of the guild (may be missing for some channel objects received over gateway guild dispatches) */
10
+ guild_id?: snowflake
11
+ /** sorting position of the channel */
12
+ position?: integer
13
+ /** explicit permission overwrites for members and roles */
14
+ permission_overwrites?: Overwrite[]
15
+ /** the name of the channel (1-100 characters) */
16
+ name?: string
17
+ /** the channel topic (0-1024 characters) */
18
+ topic?: string
19
+ /** whether the channel is nsfw */
20
+ nsfw?: boolean
21
+ /** the id of the last message sent in this channel (may not point to an existing or valid message) */
22
+ last_message_id?: snowflake
23
+ /** the bitrate (in bits) of the voice channel */
24
+ bitrate?: integer
25
+ /** the user limit of the voice channel */
26
+ user_limit?: integer
27
+ /** amount of seconds a user has to wait before sending another message (0-21600); bots, as well as users with the permission manage_messages or manage_channel, are unaffected */
28
+ rate_limit_per_user?: integer
29
+ /** the recipients of the DM */
30
+ recipients?: User[]
31
+ /** icon hash */
32
+ icon?: string
33
+ /** id of the creator of the group DM or thread */
34
+ owner_id?: snowflake
35
+ /** application id of the group DM creator if it is bot-created */
36
+ application_id?: snowflake
37
+ /** for guild channels: id of the parent category for a channel (each parent category can contain up to 50 channels), for threads: id of the text channel this thread was created */
38
+ parent_id?: snowflake
39
+ /** when the last pinned message was pinned. This may be null in events such as GUILD_CREATE when a message is not pinned. */
40
+ last_pin_timestamp?: timestamp
41
+ /** voice region id for the voice channel, automatic when set to null */
42
+ rtc_region?: string
43
+ /** the camera video quality mode of the voice channel, 1 when not present */
44
+ video_quality_mode?: integer
45
+ /** number of messages (not including the initial message or deleted messages) in a thread. */
46
+ message_count?: integer
47
+ /** an approximate count of users in a thread, stops counting at 50 */
48
+ member_count?: integer
49
+ /** thread-specific fields not needed by other channels */
50
+ thread_metadata?: ThreadMetadata
51
+ /** thread member object for the current user, if they have joined the thread, only included on certain API endpoints */
52
+ member?: ThreadMember
53
+ /** default duration, copied onto newly created threads, in minutes, threads will stop showing in the channel list after the specified period of inactivity, can be set to: 60, 1440, 4320, 10080 */
54
+ default_auto_archive_duration?: integer
55
+ /** computed permissions for the invoking user in the channel, including overwrites, only included when part of the resolved data received on a slash command interaction */
56
+ permissions?: string
57
+ /** channel flags combined as a bitfield */
58
+ flags?: integer
59
+ /** number of messages ever sent in a thread, it's similar to message_count on message creation, but will not decrement the number when a message is deleted */
60
+ total_message_sent?: integer
61
+ /** the set of tags that can be used in a GUILD_FORUM channel */
62
+ available_tags?: ForumTag[]
63
+ /** the IDs of the set of tags that have been applied to a thread in a GUILD_FORUM channel */
64
+ applied_tags?: snowflake[]
65
+ /** the emoji to show in the add reaction button on a thread in a GUILD_FORUM channel */
66
+ default_reaction_emoji?: DefaultReaction
67
+ /** the initial rate_limit_per_user to set on newly created threads in a channel. this field is copied to the thread at creation time and does not live update. */
68
+ default_thread_rate_limit_per_user?: integer
69
+ /** the default sort order type used to order posts in GUILD_FORUM channels. Defaults to null, which indicates a preferred sort order hasn't been set by a channel admin */
70
+ default_sort_order?: integer
71
+ /** the default forum layout view used to display posts in GUILD_FORUM channels. Defaults to 0, which indicates a layout view has not been set by a channel admin */
72
+ default_forum_layout?: integer
73
+ }
74
+
75
+ /** https://discord.com/developers/docs/resources/channel#role-subscription-data-object */
76
+ export interface RoleSubscriptionData {
77
+ /** the id of the sku and listing that the user is subscribed to */
78
+ role_subscription_listing_id: snowflake
79
+ /** the name of the tier that the user is subscribed to */
80
+ tier_name: string
81
+ /** the cumulative number of months that the user has been subscribed for */
82
+ total_months_subscribed: integer
83
+ /** whether this notification is for a renewal rather than a new purchase */
84
+ is_renewal: boolean
85
+ }
86
+
87
+ export namespace Channel {
88
+ /** https://discord.com/developers/docs/resources/channel#channel-object-channel-types */
89
+ export enum Type {
90
+ /** a text channel within a server */
91
+ GUILD_TEXT = 0,
92
+ /** a direct message between users */
93
+ DM = 1,
94
+ /** a voice channel within a server */
95
+ GUILD_VOICE = 2,
96
+ /** a direct message between multiple users */
97
+ GROUP_DM = 3,
98
+ /** an organizational category that contains up to 50 channels */
99
+ GUILD_CATEGORY = 4,
100
+ /** a channel that users can follow and crosspost into their own server */
101
+ GUILD_NEWS = 5,
102
+ /** a channel in which game developers can sell their game on Discord */
103
+ GUILD_STORE = 6,
104
+ /** a temporary sub-channel within a GUILD_NEWS channel */
105
+ GUILD_NEWS_THREAD = 10,
106
+ /** a temporary sub-channel within a GUILD_TEXT channel */
107
+ GUILD_PUBLIC_THREAD = 11,
108
+ /** a temporary sub-channel within a GUILD_TEXT channel that is only viewable by those invited and those with the MANAGE_THREADS permission */
109
+ GUILD_PRIVATE_THREAD = 12,
110
+ /** a voice channel for hosting events with an audience */
111
+ GUILD_STAGE_VOICE = 13,
112
+ /** the channel in a hub containing the listed servers */
113
+ GUILD_DIRECTORY = 14,
114
+ /** Channel that can only contain threads */
115
+ GUILD_FORUM = 15,
116
+ }
117
+
118
+ export namespace Params {
119
+ /** https://discord.com/developers/docs/resources/user#create-dm-json-params */
120
+ export interface CreateDM {
121
+ /** the recipient to open a DM channel with */
122
+ recipient_id: snowflake
123
+ }
124
+
125
+ /** https://discord.com/developers/docs/resources/user#create-group-dm-json-params */
126
+ export interface CreateGroupDM {
127
+ /** access tokens of users that have granted your app the gdm.join scope */
128
+ access_tokens: string[]
129
+ /** a dictionary of user ids to their respective nicknames */
130
+ nicks: Record<string, string>
131
+ }
132
+
133
+ /** https://discord.com/developers/docs/resources/guild#create-guild-channel-json-params */
134
+ export interface Create {
135
+ /** channel name (1-100 characters) */
136
+ name: string
137
+ /** the type of channel */
138
+ type: integer
139
+ /** channel topic (0-1024 characters) */
140
+ topic: string
141
+ /** the bitrate (in bits) of the voice channel (voice only) */
142
+ bitrate: integer
143
+ /** the user limit of the voice channel (voice only) */
144
+ user_limit: integer
145
+ /** amount of seconds a user has to wait before sending another message (0-21600); bots, as well as users with the permission manage_messages or manage_channel, are unaffected */
146
+ rate_limit_per_user: integer
147
+ /** sorting position of the channel */
148
+ position: integer
149
+ /** the channel's permission overwrites */
150
+ permission_overwrites: Overwrite[]
151
+ /** id of the parent category for a channel */
152
+ parent_id: snowflake
153
+ /** whether the channel is nsfw */
154
+ nsfw: boolean
155
+ }
156
+
157
+ /** https://discord.com/developers/docs/resources/guild#modify-guild-channel-positions-json-params */
158
+ export interface ModifyPositions {
159
+ /** channel id */
160
+ id: snowflake
161
+ /** sorting position of the channel */
162
+ position?: integer
163
+ /** syncs the permission overwrites with the new parent, if moving to a new category */
164
+ lock_permissions?: boolean
165
+ /** the new parent ID for the channel that is moved */
166
+ parent_id?: snowflake
167
+ }
168
+
169
+ export type Modify =
170
+ | Partial<Modify.GroupDM>
171
+ | Partial<Modify.GuildChannel>
172
+ | Partial<Modify.Thread>
173
+
174
+ export namespace Modify {
175
+ /** https://discord.com/developers/docs/resources/channel#modify-channel-json-params-group-dm */
176
+ export interface GroupDM {
177
+ /** 1-100 character channel name */
178
+ name: string
179
+ /** base64 encoded icon */
180
+ icon: string
181
+ }
182
+
183
+ /** https://discord.com/developers/docs/resources/channel#modify-channel-json-params-guild-channel */
184
+ export interface GuildChannel {
185
+ /** 1-100 character channel name */
186
+ name: string
187
+ /** the type of channel; only conversion between text and news is supported and only in guilds with the "NEWS" feature */
188
+ type: integer
189
+ /** the position of the channel in the left-hand listing */
190
+ position?: integer
191
+ /** 0-1024 character channel topic */
192
+ topic?: string
193
+ /** whether the channel is nsfw */
194
+ nsfw?: boolean
195
+ /** amount of seconds a user has to wait before sending another message (0-21600); bots, as well as users with the permission manage_messages or manage_channel, are unaffected */
196
+ rate_limit_per_user?: integer
197
+ /** the bitrate (in bits) of the voice channel; 8000 to 96000 (128000 for VIP servers) */
198
+ bitrate?: integer
199
+ /** the user limit of the voice channel; 0 refers to no limit, 1 to 99 refers to a user limit */
200
+ user_limit?: integer
201
+ /** channel or category-specific permissions */
202
+ permission_overwrites?: Overwrite[]
203
+ /** id of the new parent category for a channel */
204
+ parent_id?: snowflake
205
+ /** channel voice region id, automatic when set to null */
206
+ rtc_region?: string
207
+ /** the camera video quality mode of the voice channel */
208
+ video_quality_mode?: integer
209
+ /** the default duration that the clients use (not the API) for newly created threads in the channel, in minutes, to automatically archive the thread after recent activity */
210
+ default_auto_archive_duration?: integer
211
+ }
212
+
213
+ /** https://discord.com/developers/docs/resources/channel#modify-channel-json-params-thread */
214
+ export interface Thread {
215
+ /** 1-100 character channel name */
216
+ name: string
217
+ /** whether the thread is archived */
218
+ archived: boolean
219
+ /** duration in minutes to automatically archive the thread after recent activity, can be set to: 60, 1440, 4320, 10080 */
220
+ auto_archive_duration: integer
221
+ /** whether the thread is locked; when a thread is locked, only users with MANAGE_THREADS can unarchive it */
222
+ locked: boolean
223
+ /** whether non-moderators can add other non-moderators to a thread; only available on private threads */
224
+ invitable: boolean
225
+ /** amount of seconds a user has to wait before sending another message (0-21600); bots, as well as users with the permission manage_messages, manage_thread, or manage_channel, are unaffected */
226
+ rate_limit_per_user?: integer
227
+ }
228
+ }
229
+
230
+ /** https://discord.com/developers/docs/resources/channel#edit-channel-permissions-json-params */
231
+ export interface EditPermissions {
232
+ /** the bitwise value of all allowed permissions */
233
+ allow: string
234
+ /** the bitwise value of all disallowed permissions */
235
+ deny: string
236
+ /** 0 for a role or 1 for a member */
237
+ type: integer
238
+ }
239
+
240
+ /** https://discord.com/developers/docs/resources/channel#follow-news-channel-json-params */
241
+ export interface Follow {
242
+ /** id of target channel */
243
+ webhook_channel_id: snowflake
244
+ }
245
+
246
+ /** https://discord.com/developers/docs/resources/channel#group-dm-add-recipient-json-params */
247
+ export interface AddRecipient {
248
+ /** access token of a user that has granted your app the gdm.join scope */
249
+ access_token: string
250
+ /** nickname of the user being added */
251
+ nick: string
252
+ }
253
+ }
254
+ }
255
+
256
+ /** https://discord.com/developers/docs/resources/channel#followed-channel-object-followed-channel-structure */
257
+ export interface FollowedChannel {
258
+ /** source channel id */
259
+ channel_id: snowflake
260
+ /** created target webhook id */
261
+ webhook_id: snowflake
262
+ }
263
+
264
+ /** https://discord.com/developers/docs/resources/channel#overwrite-object-overwrite-structure */
265
+ export enum OverwriteType {
266
+ ROLE = 0,
267
+ MEMBER = 1,
268
+ }
269
+
270
+ /** https://discord.com/developers/docs/resources/channel#overwrite-object-overwrite-structure */
271
+ export interface Overwrite {
272
+ /** role or user id */
273
+ id: snowflake
274
+ /** either 0 (role) or 1 (member) */
275
+ type: OverwriteType
276
+ /** permission bit set */
277
+ allow: string
278
+ /** permission bit set */
279
+ deny: string
280
+ }
281
+
282
+ /** https://discord.com/developers/docs/resources/channel#allowed-mentions-object-allowed-mention-types */
283
+ export enum AllowedMentionType {
284
+ /** Controls role mentions */
285
+ ROLE_MENTIONS = 'roles',
286
+ /** Controls user mentions */
287
+ USER_MENTIONS = 'users',
288
+ /** Controls @everyone and @here mentions */
289
+ EVERYONE_MENTIONS = 'everyone',
290
+ }
291
+
292
+ /** https://discord.com/developers/docs/resources/channel#allowed-mentions-object-allowed-mentions-structure */
293
+ export interface AllowedMentions {
294
+ /** An array of allowed mention types to parse from the content. */
295
+ parse: AllowedMentionType[]
296
+ /** Array of role_ids to mention (Max size of 100) */
297
+ roles: snowflake[]
298
+ /** Array of user_ids to mention (Max size of 100) */
299
+ users: snowflake[]
300
+ /** For replies, whether to mention the author of the message being replied to (default false) */
301
+ replied_user: boolean
302
+ }
303
+
304
+ export interface ChannelCreateEvent extends Channel {}
305
+
306
+ export interface ChannelUpdateEvent extends Channel {}
307
+
308
+ export interface ChannelDeleteEvent extends Channel {}
309
+
310
+ /** https://discord.com/developers/docs/topics/gateway-events#channel-pins-update-channel-pins-update-event-fields */
311
+ export interface ChannelPinsUpdateEvent {
312
+ /** the id of the guild */
313
+ guild_id?: snowflake
314
+ /** the id of the channel */
315
+ channel_id: snowflake
316
+ /** the time at which the most recent pinned message was pinned */
317
+ last_pin_timestamp?: timestamp
318
+ }
319
+
320
+ /** https://discord.com/developers/docs/topics/gateway-events#typing-start-typing-start-event-fields */
321
+ export interface TypingStartEvent {
322
+ /** id of the channel */
323
+ channel_id: snowflake
324
+ /** id of the guild */
325
+ guild_id?: snowflake
326
+ /** id of the user */
327
+ user_id: snowflake
328
+ /** unix time (in seconds) of when the user started typing */
329
+ timestamp: integer
330
+ /** the member who started typing if this happened in a guild */
331
+ member?: GuildMember
332
+ }
333
+
334
+ /** https://discord.com/developers/docs/resources/channel#forum-tag-object */
335
+ export interface ForumTag {
336
+ /** the id of the tag */
337
+ id: snowflake
338
+ /** the name of the tag (0-20 characters) */
339
+ name: string
340
+ /** whether this tag can only be added to or removed from threads by a member with the MANAGE_THREADS permission */
341
+ moderated: boolean
342
+ /** the id of a guild's custom emoji */
343
+ emoji_id?: snowflake
344
+ /** the unicode character of the emoji */
345
+ emoji_name?: string
346
+ }
347
+
348
+ /** https://discord.com/developers/docs/resources/channel#default-reaction-object */
349
+ export interface DefaultReaction {
350
+ /** the id of a guild's custom emoji */
351
+ emoji_id?: snowflake
352
+ /** the unicode character of the emoji */
353
+ emoji_name?: string
354
+ }
355
+
356
+ declare module './gateway' {
357
+ interface GatewayEvents {
358
+ /** new guild channel created */
359
+ CHANNEL_CREATE: ChannelCreateEvent
360
+ /** channel was updated */
361
+ CHANNEL_UPDATE: ChannelUpdateEvent
362
+ /** channel was deleted */
363
+ CHANNEL_DELETE: ChannelDeleteEvent
364
+ /** message was pinned or unpinned */
365
+ CHANNEL_PINS_UPDATE: ChannelPinsUpdateEvent
366
+ /** user started typing in a channel */
367
+ TYPING_START: TypingStartEvent
368
+ }
369
+ }
370
+
371
+ export interface ChannelPosition {
372
+ /** channel id */
373
+ channel_id: snowflake
374
+ /** sorting position of the channel */
375
+ position?: integer
376
+ /** syncs the permission overwrites with the new parent, if moving to a new category */
377
+ lock_permissions?: boolean
378
+ /** the new parent ID for the channel that is moved */
379
+ parent_id?: snowflake
380
+ }
381
+
382
+ declare module './internal' {
383
+ interface Internal {
384
+ /**
385
+ * Create a new DM channel with a user. Returns a DM channel object.
386
+ * @see https://discord.com/developers/docs/resources/user#create-dm
387
+ */
388
+ createDM(params: Channel.Params.CreateDM): Promise<Channel>
389
+ /**
390
+ * Create a new group DM channel with multiple users. Returns a DM channel object. This endpoint was intended to be used with the now-deprecated GameBridge SDK. DMs created with this endpoint will not be shown in the Discord client
391
+ * @see https://discord.com/developers/docs/resources/user#create-group-dm
392
+ */
393
+ createGroupDM(params: Channel.Params.CreateGroupDM): Promise<Channel>
394
+ }
395
+ }
396
+
397
+ Internal.define({
398
+ '/users/@me/channels': {
399
+ POST: ['createDM', 'createGroupDM'],
400
+ },
401
+ })
402
+
403
+ declare module './internal' {
404
+ interface Internal {
405
+ /**
406
+ * Returns a list of guild channel objects. Does not include threads.
407
+ * @see https://discord.com/developers/docs/resources/guild#get-guild-channels
408
+ */
409
+ getGuildChannels(guild_id: snowflake): Promise<Channel[]>
410
+ /**
411
+ * Create a new channel object for the guild. Requires the MANAGE_CHANNELS permission. If setting permission overwrites, only permissions your bot has in the guild can be allowed/denied. Setting MANAGE_ROLES permission in channels is only possible for guild administrators. Returns the new channel object on success. Fires a Channel Create Gateway event.
412
+ * @see https://discord.com/developers/docs/resources/guild#create-guild-channel
413
+ */
414
+ createGuildChannel(guild_id: snowflake, params: Channel.Params.Create): Promise<Channel>
415
+ /**
416
+ * Modify the positions of a set of channel objects for the guild. Requires MANAGE_CHANNELS permission. Returns a 204 empty response on success. Fires multiple Channel Update Gateway events.
417
+ * @see https://discord.com/developers/docs/resources/guild#modify-guild-channel-positions
418
+ */
419
+ modifyGuildChannelPositions(guild_id: snowflake, params: Channel.Params.ModifyPositions): Promise<void>
420
+ }
421
+ }
422
+
423
+ Internal.define({
424
+ '/guilds/{guild.id}/channels': {
425
+ GET: 'getGuildChannels',
426
+ POST: 'createGuildChannel',
427
+ PATCH: 'modifyGuildChannelPositions',
428
+ },
429
+ })
430
+
431
+ declare module './internal' {
432
+ interface Internal {
433
+ /**
434
+ * Get a channel by ID. Returns a channel object. If the channel is a thread, a thread member object is included in the returned result.
435
+ * @see https://discord.com/developers/docs/resources/channel#get-channel
436
+ */
437
+ getChannel(channel_id: snowflake): Promise<Channel>
438
+ /**
439
+ * Update a channel's settings. Returns a channel on success, and a 400 BAD REQUEST on invalid parameters. All JSON parameters are optional.
440
+ * @see https://discord.com/developers/docs/resources/channel#modify-channel
441
+ */
442
+ modifyChannel(channel_id: snowflake, params: Channel.Params.Modify): Promise<Channel>
443
+ /**
444
+ * Delete a channel, or close a private message. Requires the MANAGE_CHANNELS permission for the guild, or MANAGE_THREADS if the channel is a thread. Deleting a category does not delete its child channels; they will have their parent_id removed and a Channel Update Gateway event will fire for each of them. Returns a channel object on success. Fires a Channel Delete Gateway event (or Thread Delete if the channel was a thread).
445
+ * @see https://discord.com/developers/docs/resources/channel#deleteclose-channel
446
+ */
447
+ deleteChannel(channel_id: snowflake): Promise<Channel>
448
+ /**
449
+ * Edit the channel permission overwrites for a user or role in a channel. Only usable for guild channels. Requires the MANAGE_ROLES permission. Only permissions your bot has in the guild or channel can be allowed/denied (unless your bot has a MANAGE_ROLES overwrite in the channel). Returns a 204 empty response on success. For more information about permissions, see permissions.
450
+ * @see https://discord.com/developers/docs/resources/channel#edit-channel-permissions
451
+ */
452
+ editChannelPermissions(channel_id: snowflake, overwrite_id: string, params: Channel.Params.EditPermissions): Promise<void>
453
+ /**
454
+ * Delete a channel permission overwrite for a user or role in a channel. Only usable for guild channels. Requires the MANAGE_ROLES permission. Returns a 204 empty response on success. For more information about permissions, see permissions
455
+ * @see https://discord.com/developers/docs/resources/channel#delete-channel-permission
456
+ */
457
+ deleteChannelPermission(channel_id: snowflake, overwrite_id: string): Promise<void>
458
+ /**
459
+ * Follow a News Channel to send messages to a target channel. Requires the MANAGE_WEBHOOKS permission in the target channel. Returns a followed channel object.
460
+ * @see https://discord.com/developers/docs/resources/channel#follow-news-channel
461
+ */
462
+ followNewsChannel(channel_id: snowflake, params: Channel.Params.Follow): Promise<void>
463
+ /**
464
+ * Post a typing indicator for the specified channel. Generally bots should not implement this route. However, if a bot is responding to a command and expects the computation to take a few seconds, this endpoint may be called to let the user know that the bot is processing their message. Returns a 204 empty response on success. Fires a Typing Start Gateway event.
465
+ * @see https://discord.com/developers/docs/resources/channel#trigger-typing-indicator
466
+ */
467
+ triggerTypingIndicator(channel_id: snowflake): Promise<void>
468
+ /**
469
+ * Adds a recipient to a Group DM using their access token.
470
+ * @see https://discord.com/developers/docs/resources/channel#group-dm-add-recipient
471
+ */
472
+ groupDMAddRecipient(channel_id: snowflake, user_id: snowflake, params: Channel.Params.AddRecipient): Promise<void>
473
+ /**
474
+ * Removes a recipient from a Group DM.
475
+ * @see https://discord.com/developers/docs/resources/channel#group-dm-remove-recipient
476
+ */
477
+ groupDMRemoveRecipient(channel_id: snowflake, user_id: snowflake): Promise<void>
478
+ }
479
+ }
480
+
481
+ Internal.define({
482
+ '/channels/{channel.id}': {
483
+ GET: 'getChannel',
484
+ PATCH: 'modifyChannel',
485
+ DELETE: 'deleteChannel',
486
+ },
487
+ '/channels/{channel.id}/permissions/{overwrite.id}': {
488
+ PUT: 'editChannelPermissions',
489
+ DELETE: 'deleteChannelPermission',
490
+ },
491
+ '/channels/{channel.id}/followers': {
492
+ POST: 'followNewsChannel',
493
+ },
494
+ '/channels/{channel.id}/typing': {
495
+ POST: 'triggerTypingIndicator',
496
+ },
497
+ '/channels/{channel.id}/recipients/{user.id}': {
498
+ PUT: 'groupDMAddRecipient',
499
+ DELETE: 'groupDMRemoveRecipient',
500
+ },
501
+ })