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.
Files changed (320) hide show
  1. package/dist/assets/asset.d.ts +46 -0
  2. package/dist/assets/asset.js +86 -0
  3. package/dist/assets/public.d.ts +19 -0
  4. package/dist/assets/public.js +120 -0
  5. package/dist/cache/cache.d.ts +62 -0
  6. package/dist/cache/cache.js +80 -0
  7. package/dist/cache/store.d.ts +45 -0
  8. package/dist/cache/store.js +53 -0
  9. package/dist/cli/build.d.ts +41 -0
  10. package/dist/cli/build.js +206 -0
  11. package/dist/cli/cli.js +108 -25
  12. package/dist/cli/cluster.d.ts +70 -0
  13. package/dist/cli/cluster.js +213 -0
  14. package/dist/cli/dev.d.ts +18 -1
  15. package/dist/cli/dev.js +252 -198
  16. package/dist/cli/env.d.ts +31 -0
  17. package/dist/cli/env.js +93 -0
  18. package/dist/cli/log.d.ts +13 -0
  19. package/dist/cli/log.js +17 -0
  20. package/dist/cli/node-version.d.ts +8 -0
  21. package/dist/cli/node-version.js +13 -0
  22. package/dist/cli/preflight.d.ts +36 -0
  23. package/dist/cli/preflight.js +122 -0
  24. package/dist/cli/project.d.ts +122 -0
  25. package/dist/cli/project.js +452 -0
  26. package/dist/cli/start.d.ts +25 -0
  27. package/dist/cli/start.js +225 -0
  28. package/dist/commands/autocomplete.d.ts +13 -0
  29. package/dist/commands/autocomplete.js +159 -0
  30. package/dist/commands/command.d.ts +346 -0
  31. package/dist/commands/command.js +28 -0
  32. package/dist/commands/convention.d.ts +64 -0
  33. package/dist/commands/convention.js +464 -0
  34. package/dist/commands/register.d.ts +18 -0
  35. package/dist/commands/register.js +42 -0
  36. package/dist/commands/router.d.ts +20 -0
  37. package/dist/commands/router.js +228 -0
  38. package/dist/commands/tree.d.ts +43 -0
  39. package/dist/commands/tree.js +206 -0
  40. package/dist/commands/twins.d.ts +15 -0
  41. package/dist/commands/twins.js +78 -0
  42. package/dist/components/button.d.ts +79 -0
  43. package/dist/components/button.js +108 -0
  44. package/dist/components/component.d.ts +140 -0
  45. package/dist/components/component.js +39 -0
  46. package/dist/components/convention.d.ts +35 -0
  47. package/dist/components/convention.js +339 -0
  48. package/dist/components/custom-id.d.ts +72 -0
  49. package/dist/components/custom-id.js +128 -0
  50. package/dist/components/embed.d.ts +28 -0
  51. package/dist/components/embed.js +11 -0
  52. package/dist/components/file.d.ts +30 -0
  53. package/dist/components/file.js +52 -0
  54. package/dist/components/instance.d.ts +100 -0
  55. package/dist/components/instance.js +86 -0
  56. package/dist/components/layout.d.ts +103 -0
  57. package/dist/components/layout.js +279 -0
  58. package/dist/components/modal.d.ts +244 -0
  59. package/dist/components/modal.js +399 -0
  60. package/dist/components/options.d.ts +41 -0
  61. package/dist/components/options.js +101 -0
  62. package/dist/components/render.d.ts +12 -0
  63. package/dist/components/render.js +58 -0
  64. package/dist/components/router.d.ts +18 -0
  65. package/dist/components/router.js +256 -0
  66. package/dist/components/select.d.ts +144 -0
  67. package/dist/components/select.js +179 -0
  68. package/dist/core/bot.d.ts +99 -0
  69. package/dist/core/bot.js +174 -0
  70. package/dist/core/memory.d.ts +66 -0
  71. package/dist/core/memory.js +115 -0
  72. package/dist/discord/api.d.ts +112 -0
  73. package/dist/discord/api.js +115 -0
  74. package/dist/discord/cdn.d.ts +67 -0
  75. package/dist/discord/cdn.js +100 -0
  76. package/dist/discord/codes.d.ts +171 -0
  77. package/dist/discord/codes.js +421 -0
  78. package/dist/discord/endpoint.d.ts +56 -0
  79. package/dist/discord/endpoint.js +53 -0
  80. package/dist/discord/endpoints.d.ts +1529 -0
  81. package/dist/discord/endpoints.js +1139 -0
  82. package/dist/discord/formatting.d.ts +67 -0
  83. package/dist/discord/formatting.js +87 -0
  84. package/dist/discord/index.d.ts +10 -0
  85. package/dist/discord/index.js +13 -0
  86. package/dist/discord/intents.d.ts +48 -0
  87. package/dist/discord/intents.js +128 -0
  88. package/dist/discord/permissions.d.ts +94 -0
  89. package/dist/discord/permissions.js +185 -0
  90. package/dist/discord/snowflake.d.ts +21 -0
  91. package/dist/discord/snowflake.js +36 -0
  92. package/dist/discord/types/application-command.d.ts +332 -0
  93. package/dist/discord/types/application-command.js +48 -0
  94. package/dist/discord/types/application-role-connection-metadata.d.ts +42 -0
  95. package/dist/discord/types/application-role-connection-metadata.js +22 -0
  96. package/dist/discord/types/application.d.ts +208 -0
  97. package/dist/discord/types/application.js +48 -0
  98. package/dist/discord/types/audit-log.d.ts +255 -0
  99. package/dist/discord/types/audit-log.js +144 -0
  100. package/dist/discord/types/auto-moderation.d.ts +167 -0
  101. package/dist/discord/types/auto-moderation.js +52 -0
  102. package/dist/discord/types/channel.d.ts +557 -0
  103. package/dist/discord/types/channel.js +88 -0
  104. package/dist/discord/types/common.d.ts +54 -0
  105. package/dist/discord/types/common.js +38 -0
  106. package/dist/discord/types/component.d.ts +775 -0
  107. package/dist/discord/types/component.js +76 -0
  108. package/dist/discord/types/emoji.d.ts +74 -0
  109. package/dist/discord/types/emoji.js +1 -0
  110. package/dist/discord/types/entitlement.d.ts +84 -0
  111. package/dist/discord/types/entitlement.js +22 -0
  112. package/dist/discord/types/gateway-events.d.ts +1148 -0
  113. package/dist/discord/types/gateway-events.js +54 -0
  114. package/dist/discord/types/gateway.d.ts +38 -0
  115. package/dist/discord/types/gateway.js +1 -0
  116. package/dist/discord/types/guild-scheduled-event.d.ts +257 -0
  117. package/dist/discord/types/guild-scheduled-event.js +68 -0
  118. package/dist/discord/types/guild-template.d.ts +51 -0
  119. package/dist/discord/types/guild-template.js +1 -0
  120. package/dist/discord/types/guild.d.ts +910 -0
  121. package/dist/discord/types/guild.js +153 -0
  122. package/dist/discord/types/index.d.ts +31 -0
  123. package/dist/discord/types/index.js +31 -0
  124. package/dist/discord/types/interaction.d.ts +321 -0
  125. package/dist/discord/types/interaction.js +47 -0
  126. package/dist/discord/types/invite.d.ts +158 -0
  127. package/dist/discord/types/invite.js +39 -0
  128. package/dist/discord/types/message.d.ts +834 -0
  129. package/dist/discord/types/message.js +159 -0
  130. package/dist/discord/types/oauth2.d.ts +22 -0
  131. package/dist/discord/types/oauth2.js +1 -0
  132. package/dist/discord/types/permissions.d.ts +183 -0
  133. package/dist/discord/types/permissions.js +118 -0
  134. package/dist/discord/types/poll.d.ts +106 -0
  135. package/dist/discord/types/poll.js +8 -0
  136. package/dist/discord/types/sku.d.ts +47 -0
  137. package/dist/discord/types/sku.js +26 -0
  138. package/dist/discord/types/soundboard.d.ts +71 -0
  139. package/dist/discord/types/soundboard.js +1 -0
  140. package/dist/discord/types/stage-instance.d.ts +58 -0
  141. package/dist/discord/types/stage-instance.js +10 -0
  142. package/dist/discord/types/sticker.d.ts +115 -0
  143. package/dist/discord/types/sticker.js +20 -0
  144. package/dist/discord/types/subscription.d.ts +54 -0
  145. package/dist/discord/types/subscription.js +12 -0
  146. package/dist/discord/types/team.d.ts +55 -0
  147. package/dist/discord/types/team.js +21 -0
  148. package/dist/discord/types/user.d.ts +273 -0
  149. package/dist/discord/types/user.js +83 -0
  150. package/dist/discord/types/voice.d.ts +72 -0
  151. package/dist/discord/types/voice.js +1 -0
  152. package/dist/discord/types/webhook.d.ts +184 -0
  153. package/dist/discord/types/webhook.js +12 -0
  154. package/dist/events/convention.d.ts +25 -0
  155. package/dist/events/convention.js +97 -0
  156. package/dist/events/event.d.ts +8 -0
  157. package/dist/events/event.js +20 -0
  158. package/dist/events/registry.d.ts +706 -0
  159. package/dist/events/registry.js +839 -0
  160. package/dist/events/router.d.ts +45 -0
  161. package/dist/events/router.js +133 -0
  162. package/dist/events/types.d.ts +7 -0
  163. package/dist/events/types.js +48 -0
  164. package/dist/gateway/errors.d.ts +18 -0
  165. package/dist/gateway/errors.js +47 -0
  166. package/dist/gateway/gateway.d.ts +64 -0
  167. package/dist/gateway/gateway.js +117 -0
  168. package/dist/gateway/identify-queue.d.ts +25 -0
  169. package/dist/gateway/identify-queue.js +29 -0
  170. package/dist/gateway/shard.d.ts +94 -0
  171. package/dist/gateway/shard.js +414 -0
  172. package/dist/gateway/state.d.ts +11 -0
  173. package/dist/gateway/state.js +184 -0
  174. package/dist/index.d.ts +55 -18
  175. package/dist/index.js +38 -12
  176. package/dist/interactions/cooldown.d.ts +33 -0
  177. package/dist/interactions/cooldown.js +74 -0
  178. package/dist/interactions/dispatch.d.ts +91 -0
  179. package/dist/interactions/dispatch.js +110 -0
  180. package/dist/loader/generated.d.ts +37 -0
  181. package/dist/loader/generated.js +114 -0
  182. package/dist/loader/hot.d.ts +13 -0
  183. package/dist/loader/hot.js +85 -0
  184. package/dist/loader/loader.d.ts +72 -0
  185. package/dist/loader/loader.js +135 -0
  186. package/dist/loader/locate.d.ts +10 -0
  187. package/dist/loader/locate.js +36 -0
  188. package/dist/loader/watch.d.ts +17 -0
  189. package/dist/loader/watch.js +66 -0
  190. package/dist/main.d.ts +3 -0
  191. package/dist/main.js +6 -0
  192. package/dist/messages/commands.d.ts +23 -0
  193. package/dist/messages/commands.js +123 -0
  194. package/dist/messages/convention.d.ts +89 -0
  195. package/dist/messages/convention.js +347 -0
  196. package/dist/messages/messages.d.ts +219 -0
  197. package/dist/messages/messages.js +30 -0
  198. package/dist/messages/phrases.d.ts +23 -0
  199. package/dist/messages/phrases.js +44 -0
  200. package/dist/messages/translate.d.ts +100 -0
  201. package/dist/messages/translate.js +249 -0
  202. package/dist/presence/convention.d.ts +26 -0
  203. package/dist/presence/convention.js +133 -0
  204. package/dist/presence/presence.d.ts +57 -0
  205. package/dist/presence/presence.js +27 -0
  206. package/dist/rest/errors.d.ts +55 -0
  207. package/dist/rest/errors.js +92 -0
  208. package/dist/rest/rate-limiter.d.ts +46 -0
  209. package/dist/rest/rate-limiter.js +153 -0
  210. package/dist/rest/rest.d.ts +63 -0
  211. package/dist/rest/rest.js +194 -0
  212. package/dist/structures/base.d.ts +48 -0
  213. package/dist/structures/base.js +84 -0
  214. package/dist/structures/channel.d.ts +380 -0
  215. package/dist/structures/channel.js +627 -0
  216. package/dist/structures/context.d.ts +30 -0
  217. package/dist/structures/context.js +7 -0
  218. package/dist/structures/emoji.d.ts +46 -0
  219. package/dist/structures/emoji.js +65 -0
  220. package/dist/structures/entities.d.ts +62 -0
  221. package/dist/structures/entities.js +226 -0
  222. package/dist/structures/guild.d.ts +348 -0
  223. package/dist/structures/guild.js +466 -0
  224. package/dist/structures/interaction.d.ts +197 -0
  225. package/dist/structures/interaction.js +396 -0
  226. package/dist/structures/invite.d.ts +38 -0
  227. package/dist/structures/invite.js +57 -0
  228. package/dist/structures/known.d.ts +28 -0
  229. package/dist/structures/known.js +58 -0
  230. package/dist/structures/member.d.ts +140 -0
  231. package/dist/structures/member.js +260 -0
  232. package/dist/structures/message.d.ts +197 -0
  233. package/dist/structures/message.js +268 -0
  234. package/dist/structures/payload.d.ts +91 -0
  235. package/dist/structures/payload.js +184 -0
  236. package/dist/structures/role.d.ts +69 -0
  237. package/dist/structures/role.js +112 -0
  238. package/dist/structures/user.d.ts +59 -0
  239. package/dist/structures/user.js +94 -0
  240. package/dist/structures/webhook.d.ts +46 -0
  241. package/dist/structures/webhook.js +79 -0
  242. package/dist/tasks/convention.d.ts +26 -0
  243. package/dist/tasks/convention.js +78 -0
  244. package/dist/tasks/schedule.d.ts +54 -0
  245. package/dist/tasks/schedule.js +236 -0
  246. package/dist/tasks/scheduler.d.ts +33 -0
  247. package/dist/tasks/scheduler.js +107 -0
  248. package/dist/tasks/task.d.ts +76 -0
  249. package/dist/tasks/task.js +28 -0
  250. package/dist/util/case.d.ts +13 -0
  251. package/dist/util/case.js +54 -0
  252. package/dist/util/duration.d.ts +8 -0
  253. package/dist/util/duration.js +29 -0
  254. package/dist/util/websocket.d.ts +9 -0
  255. package/dist/util/websocket.js +31 -0
  256. package/dist/voice/connection.d.ts +90 -0
  257. package/dist/voice/connection.js +494 -0
  258. package/dist/voice/dave.d.ts +109 -0
  259. package/dist/voice/dave.js +245 -0
  260. package/dist/voice/opus.d.ts +19 -0
  261. package/dist/voice/opus.js +273 -0
  262. package/dist/voice/session.d.ts +55 -0
  263. package/dist/voice/session.js +405 -0
  264. package/dist/voice/source.d.ts +22 -0
  265. package/dist/voice/source.js +195 -0
  266. package/dist/voice/transport.d.ts +43 -0
  267. package/dist/voice/transport.js +140 -0
  268. package/dist/voice/usage.d.ts +4 -0
  269. package/dist/voice/usage.js +33 -0
  270. package/package.json +26 -7
  271. package/vendor/dave/LICENSE +231 -0
  272. package/vendor/dave/libdave.d.mts +99 -0
  273. package/vendor/dave/libdave.mjs +2 -0
  274. package/vendor/dave/libdave.wasm +0 -0
  275. package/dist/components.d.ts +0 -97
  276. package/dist/components.js +0 -260
  277. package/dist/context.d.ts +0 -72
  278. package/dist/context.js +0 -273
  279. package/dist/discord/client.d.ts +0 -35
  280. package/dist/discord/client.js +0 -66
  281. package/dist/discord/constants.d.ts +0 -49
  282. package/dist/discord/constants.js +0 -61
  283. package/dist/discord/events.d.ts +0 -129
  284. package/dist/discord/events.js +0 -102
  285. package/dist/discord/gateway.d.ts +0 -61
  286. package/dist/discord/gateway.js +0 -320
  287. package/dist/discord/payloads.d.ts +0 -275
  288. package/dist/discord/payloads.js +0 -3
  289. package/dist/discord/presence.d.ts +0 -42
  290. package/dist/discord/presence.js +0 -51
  291. package/dist/discord/rest.d.ts +0 -49
  292. package/dist/discord/rest.js +0 -271
  293. package/dist/discord/types.d.ts +0 -334
  294. package/dist/discord/types.js +0 -4
  295. package/dist/events.d.ts +0 -94
  296. package/dist/events.js +0 -255
  297. package/dist/presence.d.ts +0 -92
  298. package/dist/presence.js +0 -250
  299. package/dist/structures/Channel.d.ts +0 -110
  300. package/dist/structures/Channel.js +0 -171
  301. package/dist/structures/Guild.d.ts +0 -70
  302. package/dist/structures/Guild.js +0 -105
  303. package/dist/structures/Interaction.d.ts +0 -113
  304. package/dist/structures/Interaction.js +0 -274
  305. package/dist/structures/Member.d.ts +0 -70
  306. package/dist/structures/Member.js +0 -124
  307. package/dist/structures/Message.d.ts +0 -87
  308. package/dist/structures/Message.js +0 -182
  309. package/dist/structures/Reaction.d.ts +0 -38
  310. package/dist/structures/Reaction.js +0 -64
  311. package/dist/structures/Role.d.ts +0 -43
  312. package/dist/structures/Role.js +0 -77
  313. package/dist/structures/User.d.ts +0 -41
  314. package/dist/structures/User.js +0 -79
  315. package/dist/structures/utils.d.ts +0 -72
  316. package/dist/structures/utils.js +0 -59
  317. package/dist/utils/errors.d.ts +0 -5
  318. package/dist/utils/errors.js +0 -28
  319. package/dist/utils/modules.d.ts +0 -39
  320. package/dist/utils/modules.js +0 -156
@@ -0,0 +1,557 @@
1
+ import type { ISO8601Timestamp, Snowflake } from './common.js';
2
+ import type { RawComponent } from './component.js';
3
+ import type { RawGuildMember } from './guild.js';
4
+ import type { InviteTargetType } from './invite.js';
5
+ import type { RawAllowedMentions, RawAttachmentRequest, RawEmbed } from './message.js';
6
+ import type { RawUser } from './user.js';
7
+ /**
8
+ * Channel Structure
9
+ * @see https://docs.discord.com/developers/resources/channel#channel-object-channel-structure
10
+ */
11
+ export interface RawChannel {
12
+ /** the id of this channel */
13
+ id: Snowflake;
14
+ /** the type of channel */
15
+ type: ChannelType;
16
+ /** the id of the guild (may be missing for some channel objects received over gateway guild dispatches) */
17
+ guild_id?: Snowflake;
18
+ /** sorting position of the channel (channels with the same position are sorted by id) */
19
+ position?: number;
20
+ /** explicit permission overwrites for members and roles */
21
+ permission_overwrites?: RawPermissionOverwrite[];
22
+ /** the name of the channel (1-100 characters) */
23
+ name?: string | null;
24
+ /** the channel topic (0-4096 characters for `GUILD_FORUM` and `GUILD_MEDIA` channels, 0-1024 characters for all others) */
25
+ topic?: string | null;
26
+ /** whether the channel is age-restricted */
27
+ nsfw?: boolean;
28
+ /** the id of the last message sent in this channel (or thread for `GUILD_FORUM` or `GUILD_MEDIA` channels) (may not point to an existing or valid message or thread) */
29
+ last_message_id?: Snowflake | null;
30
+ /** the bitrate (in bits per second) of the voice channel */
31
+ bitrate?: number;
32
+ /** the user limit of the voice channel */
33
+ user_limit?: number;
34
+ /** amount of seconds a user has to wait before sending another message (0-21600); bots, as well as users with the permission `BYPASS_SLOWMODE`, are unaffected */
35
+ rate_limit_per_user?: number;
36
+ /** the recipients of the DM */
37
+ recipients?: RawUser[];
38
+ /** icon hash of the group DM */
39
+ icon?: string | null;
40
+ /** id of the creator of the group DM or thread */
41
+ owner_id?: Snowflake;
42
+ /** application id associated with the channel. for group DMs, this is the application that created the group */
43
+ application_id?: Snowflake | null;
44
+ /** for group DM channels: whether the channel is managed by an application via the `gdm.join` OAuth2 scope */
45
+ managed?: boolean;
46
+ /** 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 */
47
+ parent_id?: Snowflake | null;
48
+ /** when the last pinned message was pinned. This may be `null` in events such as `GUILD_CREATE` when a message is not pinned. */
49
+ last_pin_timestamp?: ISO8601Timestamp | null;
50
+ /** voice region id for the voice channel, automatic when set to null */
51
+ rtc_region?: string | null;
52
+ /** the camera video quality mode of the voice channel, 1 when not present */
53
+ video_quality_mode?: VideoQualityMode;
54
+ /** number of messages (not including the initial message or deleted messages) in a thread. */
55
+ message_count?: number;
56
+ /** an approximate count of users in a thread, stops counting at 50 */
57
+ member_count?: number;
58
+ /** thread-specific fields not needed by other channels */
59
+ thread_metadata?: RawThreadMetadata;
60
+ /** thread member object for the current user, if they have joined the thread, only included on certain API endpoints */
61
+ member?: RawThreadMember;
62
+ /** 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 */
63
+ default_auto_archive_duration?: number;
64
+ /** computed permissions for the invoking user in the channel, including overwrites, only included when part of the `resolved` data received on an interaction. This does not include implicit permissions, which may need to be checked separately */
65
+ permissions?: string;
66
+ /** computed permissions for the bot user in the channel, including overwrites, only included when part of the `resolved` data received on an interaction. This does not include implicit permissions, which may need to be checked separately */
67
+ app_permissions?: string;
68
+ /** channel flags combined as a bitfield */
69
+ flags?: number;
70
+ /** 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 */
71
+ total_message_sent?: number;
72
+ /** the set of tags that can be used in a `GUILD_FORUM` or a `GUILD_MEDIA` channel */
73
+ available_tags?: RawForumTag[];
74
+ /** the IDs of the set of tags that have been applied to a thread in a `GUILD_FORUM` or a `GUILD_MEDIA` channel */
75
+ applied_tags?: Snowflake[];
76
+ /** the emoji to show in the add reaction button on a thread in a `GUILD_FORUM` or a `GUILD_MEDIA` channel */
77
+ default_reaction_emoji?: RawDefaultReaction | null;
78
+ /** 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. */
79
+ default_thread_rate_limit_per_user?: number;
80
+ /** the default sort order type used to order posts in `GUILD_FORUM` and `GUILD_MEDIA` channels. Defaults to `null`, which indicates a preferred sort order hasn't been set by a channel admin */
81
+ default_sort_order?: ForumSortOrderType | null;
82
+ /** 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 */
83
+ default_forum_layout?: ForumLayoutType;
84
+ }
85
+ /**
86
+ * Channel Types
87
+ * @see https://docs.discord.com/developers/resources/channel#channel-object-channel-types
88
+ */
89
+ export declare const ChannelType: {
90
+ /** a text channel within a server */
91
+ readonly GuildText: 0;
92
+ /** a direct message between users */
93
+ readonly Dm: 1;
94
+ /** a voice channel within a server */
95
+ readonly GuildVoice: 2;
96
+ /** a direct message between multiple users */
97
+ readonly GroupDm: 3;
98
+ /** an organizational category that contains up to 50 channels */
99
+ readonly GuildCategory: 4;
100
+ /** a channel that users can follow and crosspost into their own server (formerly news channels) */
101
+ readonly GuildAnnouncement: 5;
102
+ /** a temporary sub-channel within a GUILD_ANNOUNCEMENT channel */
103
+ readonly AnnouncementThread: 10;
104
+ /** a temporary sub-channel within a GUILD_TEXT or GUILD_FORUM channel */
105
+ readonly PublicThread: 11;
106
+ /** a temporary sub-channel within a GUILD_TEXT channel that is only viewable by those invited and those with the MANAGE_THREADS permission */
107
+ readonly PrivateThread: 12;
108
+ /** a voice channel for hosting events with an audience */
109
+ readonly GuildStageVoice: 13;
110
+ /** the channel in a hub containing the listed servers */
111
+ readonly GuildDirectory: 14;
112
+ /** Channel that can only contain threads */
113
+ readonly GuildForum: 15;
114
+ /** Channel that can only contain threads, similar to `GUILD_FORUM` channels */
115
+ readonly GuildMedia: 16;
116
+ };
117
+ export type ChannelType = (typeof ChannelType)[keyof typeof ChannelType];
118
+ /**
119
+ * Video Quality Modes
120
+ * @see https://docs.discord.com/developers/resources/channel#channel-object-video-quality-modes
121
+ */
122
+ export declare const VideoQualityMode: {
123
+ /** Discord chooses the quality for optimal performance */
124
+ readonly Auto: 1;
125
+ /** 720p */
126
+ readonly Full: 2;
127
+ };
128
+ export type VideoQualityMode = (typeof VideoQualityMode)[keyof typeof VideoQualityMode];
129
+ /**
130
+ * Channel Flags
131
+ * @see https://docs.discord.com/developers/resources/channel#channel-object-channel-flags
132
+ */
133
+ export declare const ChannelFlags: {
134
+ /** this thread is pinned to the top of its parent `GUILD_FORUM` or `GUILD_MEDIA` channel */
135
+ readonly Pinned: number;
136
+ /** whether a tag is required to be specified when creating a thread in a `GUILD_FORUM` or a `GUILD_MEDIA` channel. Tags are specified in the `applied_tags` field. */
137
+ readonly RequireTag: number;
138
+ /** when set hides the embedded media download options. Available only for media channels */
139
+ readonly HideMediaDownloadOptions: number;
140
+ /** this channel's metadata has been obfuscated because the current user cannot view it. Only ever set on channels received over the Gateway; the HTTP API never sets this flag. See Obfuscated Channels. */
141
+ readonly ChannelObfuscated: number;
142
+ /** this channel is a Spoiler Channel i.e. users must opt in to view its contents. Can be set on all textual guild channels and voice channels (not `GUILD_STAGE`). Can only be set if channel's `nsfw` is false */
143
+ readonly IsSpoilerChannel: number;
144
+ };
145
+ export type ChannelFlags = (typeof ChannelFlags)[keyof typeof ChannelFlags];
146
+ /**
147
+ * Sort Order Types
148
+ * @see https://docs.discord.com/developers/resources/channel#channel-object-sort-order-types
149
+ */
150
+ export declare const ForumSortOrderType: {
151
+ /** Sort forum posts by activity */
152
+ readonly LatestActivity: 0;
153
+ /** Sort forum posts by creation time (from most recent to oldest) */
154
+ readonly CreationDate: 1;
155
+ };
156
+ export type ForumSortOrderType = (typeof ForumSortOrderType)[keyof typeof ForumSortOrderType];
157
+ /**
158
+ * Forum Layout Types
159
+ * @see https://docs.discord.com/developers/resources/channel#channel-object-forum-layout-types
160
+ */
161
+ export declare const ForumLayoutType: {
162
+ /** No default has been set for forum channel */
163
+ readonly NotSet: 0;
164
+ /** Display posts as a list */
165
+ readonly ListView: 1;
166
+ /** Display posts as a collection of tiles */
167
+ readonly GalleryView: 2;
168
+ };
169
+ export type ForumLayoutType = (typeof ForumLayoutType)[keyof typeof ForumLayoutType];
170
+ /**
171
+ * Followed Channel Structure
172
+ * @see https://docs.discord.com/developers/resources/channel#followed-channel-object-followed-channel-structure
173
+ */
174
+ export interface RawFollowedChannel {
175
+ /** source channel id */
176
+ channel_id: Snowflake;
177
+ /** created target webhook id */
178
+ webhook_id: Snowflake;
179
+ }
180
+ /**
181
+ * Overwrite Structure
182
+ * @see https://docs.discord.com/developers/resources/channel#overwrite-object-overwrite-structure
183
+ */
184
+ export interface RawPermissionOverwrite {
185
+ /** role or user id */
186
+ id: Snowflake;
187
+ /** either 0 (role) or 1 (member) */
188
+ type: PermissionOverwriteType;
189
+ /** permission bit set */
190
+ allow: string;
191
+ /** permission bit set */
192
+ deny: string;
193
+ }
194
+ /**
195
+ * Thread Metadata Structure
196
+ * @see https://docs.discord.com/developers/resources/channel#thread-metadata-object-thread-metadata-structure
197
+ */
198
+ export interface RawThreadMetadata {
199
+ /** whether the thread is archived */
200
+ archived: boolean;
201
+ /** the thread will stop showing in the channel list after `auto_archive_duration` minutes of inactivity, can be set to: 60, 1440, 4320, 10080 */
202
+ auto_archive_duration: number;
203
+ /** timestamp when the thread's archive status was last changed, used for calculating recent activity */
204
+ archive_timestamp: ISO8601Timestamp;
205
+ /** whether the thread is locked; when a thread is locked, only users with MANAGE_THREADS can unarchive it */
206
+ locked: boolean;
207
+ /** whether non-moderators can add other non-moderators to a thread; only available on private threads */
208
+ invitable?: boolean;
209
+ /** timestamp when the thread was created; only populated for threads created after 2022-01-09 */
210
+ create_timestamp?: ISO8601Timestamp | null;
211
+ }
212
+ /**
213
+ * Thread Member Structure
214
+ * @see https://docs.discord.com/developers/resources/channel#thread-member-object-thread-member-structure
215
+ */
216
+ export interface RawThreadMember {
217
+ /** ID of the thread */
218
+ id?: Snowflake;
219
+ /** ID of the user */
220
+ user_id?: Snowflake;
221
+ /** Time the user last joined the thread */
222
+ join_timestamp: ISO8601Timestamp;
223
+ /** Any user-thread settings, currently only used for notifications */
224
+ flags: number;
225
+ /** Additional information about the user */
226
+ member?: RawGuildMember;
227
+ }
228
+ /**
229
+ * Default Reaction Structure
230
+ * @see https://docs.discord.com/developers/resources/channel#default-reaction-object-default-reaction-structure
231
+ */
232
+ export interface RawDefaultReaction {
233
+ /** the id of a guild's custom emoji */
234
+ emoji_id: Snowflake | null;
235
+ /** the unicode character of the emoji */
236
+ emoji_name: string | null;
237
+ }
238
+ /**
239
+ * Forum Tag Structure
240
+ * @see https://docs.discord.com/developers/resources/channel#forum-tag-object-forum-tag-structure
241
+ */
242
+ export interface RawForumTag {
243
+ /** the id of the tag */
244
+ id: Snowflake;
245
+ /** the name of the tag (0-20 characters) */
246
+ name: string;
247
+ /** whether this tag can only be added to or removed from threads by a member with the `MANAGE_THREADS` permission */
248
+ moderated: boolean;
249
+ /** the id of a guild's custom emoji * */
250
+ emoji_id: Snowflake | null;
251
+ /** the unicode character of the emoji * */
252
+ emoji_name: string | null;
253
+ }
254
+ /**
255
+ * JSON Params (Group DM)
256
+ * @see https://docs.discord.com/developers/resources/channel#modify-channel-json-params-group-dm
257
+ */
258
+ export interface ModifyGroupDmJSONParams {
259
+ /** 1-100 character channel name */
260
+ name?: string;
261
+ }
262
+ /**
263
+ * JSON Params (Guild channel)
264
+ * @see https://docs.discord.com/developers/resources/channel#modify-channel-json-params-guild-channel
265
+ */
266
+ export interface ModifyGuildChannelJSONParams {
267
+ /** 1-100 character channel name */
268
+ name?: string;
269
+ /** the type of channel; only conversion between text and announcement is supported and only in guilds with the "NEWS" feature */
270
+ type?: ChannelType;
271
+ /** the position of the channel in the left-hand listing (channels with the same position are sorted by id) */
272
+ position?: number | null;
273
+ /** 0-1024 character channel topic (0-4096 characters for `GUILD_FORUM` and `GUILD_MEDIA` channels) */
274
+ topic?: string | null;
275
+ /** whether the channel is age-restricted */
276
+ nsfw?: boolean | null;
277
+ /** amount of seconds a user has to wait before sending another message (0-21600); bots, as well as users with the permission `BYPASS_SLOWMODE`, are unaffected */
278
+ rate_limit_per_user?: number | null;
279
+ /** the bitrate (in bits per second) of the voice or stage channel; min 8000 */
280
+ bitrate?: number | null;
281
+ /** the user limit of the voice or stage channel, max 99 for voice channels and 10,000 for stage channels (0 refers to no limit) */
282
+ user_limit?: number | null;
283
+ /** channel or category-specific permissions */
284
+ permission_overwrites?: Partial<RawPermissionOverwrite>[] | null;
285
+ /** id of the new parent category for a channel */
286
+ parent_id?: Snowflake | null;
287
+ /** channel voice region id, automatic when set to null */
288
+ rtc_region?: string | null;
289
+ /** the camera video quality mode of the voice channel */
290
+ video_quality_mode?: VideoQualityMode | null;
291
+ /** 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 */
292
+ default_auto_archive_duration?: number | null;
293
+ /** channel flags combined as a bitfield. */
294
+ flags?: number;
295
+ /** the set of tags that can be used in a `GUILD_FORUM` or a `GUILD_MEDIA` channel; limited to 20 */
296
+ available_tags?: RawForumTag[];
297
+ /** the emoji to show in the add reaction button on a thread in a `GUILD_FORUM` or a `GUILD_MEDIA` channel */
298
+ default_reaction_emoji?: RawDefaultReaction | null;
299
+ /** 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. */
300
+ default_thread_rate_limit_per_user?: number;
301
+ /** the default sort order type used to order posts in `GUILD_FORUM` and `GUILD_MEDIA` channels */
302
+ default_sort_order?: ForumSortOrderType | null;
303
+ /** the default forum layout type used to display posts in `GUILD_FORUM` channels */
304
+ default_forum_layout?: ForumLayoutType;
305
+ }
306
+ /**
307
+ * JSON Params (Thread)
308
+ * @see https://docs.discord.com/developers/resources/channel#modify-channel-json-params-thread
309
+ */
310
+ export interface ModifyThreadJSONParams {
311
+ /** 1-100 character channel name */
312
+ name?: string;
313
+ /** whether the thread is archived */
314
+ archived?: boolean;
315
+ /** the thread will stop showing in the channel list after `auto_archive_duration` minutes of inactivity, can be set to: 60, 1440, 4320, 10080 */
316
+ auto_archive_duration?: number;
317
+ /** whether the thread is locked; when a thread is locked, only users with MANAGE_THREADS can unarchive it */
318
+ locked?: boolean;
319
+ /** whether non-moderators can add other non-moderators to a thread; only available on private threads */
320
+ invitable?: boolean;
321
+ /** amount of seconds a user has to wait before sending another message (0-21600); bots, as well as users with the permission `BYPASS_SLOWMODE`, are unaffected */
322
+ rate_limit_per_user?: number | null;
323
+ /** channel flags combined as a bitfield; `PINNED` can only be set for threads in forum and media channels */
324
+ flags?: number;
325
+ /** the IDs of the set of tags that have been applied to a thread in a `GUILD_FORUM` or a `GUILD_MEDIA` channel; limited to 5 */
326
+ applied_tags?: Snowflake[];
327
+ }
328
+ /**
329
+ * JSON Params
330
+ * @see https://docs.discord.com/developers/resources/channel#json-params
331
+ */
332
+ export interface SetVoiceChannelStatusJSONParams {
333
+ /** new voice channel status (up to 500 characters) */
334
+ status: string | null;
335
+ }
336
+ /**
337
+ * JSON Params
338
+ * @see https://docs.discord.com/developers/resources/channel#edit-channel-permissions-json-params
339
+ */
340
+ export interface EditChannelPermissionsJSONParams {
341
+ /** the bitwise value of all allowed permissions (default `"0"`) */
342
+ allow?: string | null;
343
+ /** the bitwise value of all disallowed permissions (default `"0"`) */
344
+ deny?: string | null;
345
+ /** 0 for a role or 1 for a member */
346
+ type: PermissionOverwriteType;
347
+ }
348
+ /**
349
+ * JSON/Form Params
350
+ * @see https://docs.discord.com/developers/resources/channel#create-channel-invite-jsonform-params
351
+ */
352
+ export interface CreateChannelInviteJSONParams {
353
+ /** duration of invite in seconds before expiry, or 0 for never. between 0 and 604800 (7 days) */
354
+ max_age?: number;
355
+ /** max number of uses or 0 for unlimited. between 0 and 100 */
356
+ max_uses?: number;
357
+ /** whether this invite only grants temporary membership */
358
+ temporary?: boolean;
359
+ /** if true, don't try to reuse a similar invite (useful for creating many unique one time use invites) */
360
+ unique?: boolean;
361
+ /** the type of target for this voice channel invite */
362
+ target_type?: InviteTargetType;
363
+ /** the id of the user whose stream to display for this invite, required if `target_type` is 1, the user must be streaming in the channel */
364
+ target_user_id?: Snowflake;
365
+ /** the id of the embedded application to open for this invite, required if `target_type` is 2, the application must have the `EMBEDDED` flag */
366
+ target_application_id?: Snowflake;
367
+ /** an array of IDs of all users able to see and accept this invite. Max of 1000 IDs */
368
+ target_user_ids?: Snowflake[];
369
+ /** JSON-encoded body of non-file params, only for `multipart/form-data` requests. */
370
+ payload_json?: string;
371
+ /** the role ID(s) for roles in the guild given to the users that accept this invite */
372
+ role_ids?: Snowflake[];
373
+ }
374
+ /**
375
+ * JSON Params
376
+ * @see https://docs.discord.com/developers/resources/channel#follow-announcement-channel-json-params
377
+ */
378
+ export interface FollowAnnouncementChannelJSONParams {
379
+ /** id of target channel */
380
+ webhook_channel_id: Snowflake;
381
+ }
382
+ /**
383
+ * JSON Params
384
+ * @see https://docs.discord.com/developers/resources/channel#group-dm-add-recipient-json-params
385
+ */
386
+ export interface GroupDmAddRecipientJSONParams {
387
+ /** access token of a user that has granted your app the `gdm.join` scope */
388
+ access_token: string;
389
+ /** nickname of the user being added */
390
+ nick: string;
391
+ }
392
+ /**
393
+ * JSON Params
394
+ * @see https://docs.discord.com/developers/resources/channel#start-thread-from-message-json-params
395
+ */
396
+ export interface StartThreadFromMessageJSONParams {
397
+ /** 1-100 character channel name */
398
+ name: string;
399
+ /** the thread will stop showing in the channel list after `auto_archive_duration` minutes of inactivity, can be set to: 60, 1440, 4320, 10080 */
400
+ auto_archive_duration?: number;
401
+ /** amount of seconds a user has to wait before sending another message (0-21600) */
402
+ rate_limit_per_user?: number | null;
403
+ }
404
+ /**
405
+ * JSON Params
406
+ * @see https://docs.discord.com/developers/resources/channel#start-thread-without-message-json-params
407
+ */
408
+ export interface StartThreadWithoutMessageJSONParams {
409
+ /** 1-100 character channel name */
410
+ name: string;
411
+ /** the thread will stop showing in the channel list after `auto_archive_duration` minutes of inactivity, can be set to: 60, 1440, 4320, 10080 */
412
+ auto_archive_duration?: number;
413
+ /** the type of thread to create */
414
+ type?: ChannelType;
415
+ /** whether non-moderators can add other non-moderators to a thread; only available when creating a private thread */
416
+ invitable?: boolean;
417
+ /** amount of seconds a user has to wait before sending another message (0-21600) */
418
+ rate_limit_per_user?: number | null;
419
+ }
420
+ /**
421
+ * JSON/Form Params
422
+ * @see https://docs.discord.com/developers/resources/channel#start-thread-in-forum-or-media-channel-jsonform-params
423
+ */
424
+ export interface StartThreadInForumOrMediaChannelJSONParams {
425
+ /** 1-100 character channel name */
426
+ name: string;
427
+ /** duration in minutes to automatically archive the thread after recent activity, can be set to: 60, 1440, 4320, 10080 */
428
+ auto_archive_duration?: number;
429
+ /** amount of seconds a user has to wait before sending another message (0-21600) */
430
+ rate_limit_per_user?: number | null;
431
+ /** contents of the first message in the forum/media thread */
432
+ message: RawForumAndMediaThreadMessageParams;
433
+ /** the IDs of the set of tags that have been applied to a thread in a `GUILD_FORUM` or a `GUILD_MEDIA` channel */
434
+ applied_tags?: Snowflake[];
435
+ /** JSON-encoded body of non-file params, only for `multipart/form-data` requests. See Uploading Files */
436
+ payload_json?: string;
437
+ }
438
+ /**
439
+ * Forum and Media Thread Message Params Object
440
+ * @see https://docs.discord.com/developers/resources/channel#start-thread-in-forum-or-media-channel-forum-and-media-thread-message-params-object
441
+ */
442
+ export interface RawForumAndMediaThreadMessageParams {
443
+ /** Message contents (up to 2000 characters) */
444
+ content?: string;
445
+ /** Up to 10 `rich` embeds (up to 6000 characters) */
446
+ embeds?: RawEmbed[];
447
+ /** Allowed mentions for the message */
448
+ allowed_mentions?: RawAllowedMentions;
449
+ /** Components to include with the message */
450
+ components?: RawComponent[];
451
+ /** IDs of up to 3 stickers in the server to send in the message */
452
+ sticker_ids?: Snowflake[];
453
+ /** Metadata for the attachments. See Uploading Files */
454
+ attachments?: Partial<RawAttachmentRequest>[];
455
+ /** Message flags combined as a bitfield (only `SUPPRESS_EMBEDS` and `SUPPRESS_NOTIFICATIONS` can be set) */
456
+ flags?: number;
457
+ }
458
+ /**
459
+ * Query String Params
460
+ * @see https://docs.discord.com/developers/resources/channel#get-thread-member-query-string-params
461
+ */
462
+ export interface GetThreadMemberQuery {
463
+ /** Whether to include a guild member object for the thread member */
464
+ with_member?: boolean;
465
+ }
466
+ /**
467
+ * Query String Params
468
+ * @see https://docs.discord.com/developers/resources/channel#list-thread-members-query-string-params
469
+ */
470
+ export interface ListThreadMembersQuery {
471
+ /** Whether to include a guild member object for each thread member */
472
+ with_member?: boolean;
473
+ /** Get thread members after this user ID */
474
+ after?: Snowflake;
475
+ /** Max number of thread members to return (1-100). Defaults to 100. */
476
+ limit?: number;
477
+ }
478
+ /**
479
+ * Query String Params
480
+ * @see https://docs.discord.com/developers/resources/channel#list-public-archived-threads-query-string-params
481
+ */
482
+ export interface ListPublicArchivedThreadsQuery {
483
+ /** returns threads archived before this timestamp */
484
+ before?: ISO8601Timestamp;
485
+ /** optional maximum number of threads to return */
486
+ limit?: number;
487
+ }
488
+ /**
489
+ * Response Body
490
+ * @see https://docs.discord.com/developers/resources/channel#list-public-archived-threads-response-body
491
+ */
492
+ export interface ListPublicArchivedThreadsResponse {
493
+ /** the public, archived threads */
494
+ threads: RawChannel[];
495
+ /** a thread member object for each returned thread the current user has joined */
496
+ members: RawThreadMember[];
497
+ /** whether there are potentially additional threads that could be returned on a subsequent call */
498
+ has_more: boolean;
499
+ }
500
+ /**
501
+ * Query String Params
502
+ * @see https://docs.discord.com/developers/resources/channel#list-private-archived-threads-query-string-params
503
+ */
504
+ export interface ListPrivateArchivedThreadsQuery {
505
+ /** returns threads archived before this timestamp */
506
+ before?: ISO8601Timestamp;
507
+ /** optional maximum number of threads to return */
508
+ limit?: number;
509
+ }
510
+ /**
511
+ * Response Body
512
+ * @see https://docs.discord.com/developers/resources/channel#list-private-archived-threads-response-body
513
+ */
514
+ export interface ListPrivateArchivedThreadsResponse {
515
+ /** the private, archived threads */
516
+ threads: RawChannel[];
517
+ /** a thread member object for each returned thread the current user has joined */
518
+ members: RawThreadMember[];
519
+ /** whether there are potentially additional threads that could be returned on a subsequent call */
520
+ has_more: boolean;
521
+ }
522
+ /**
523
+ * Query String Params
524
+ * @see https://docs.discord.com/developers/resources/channel#list-joined-private-archived-threads-query-string-params
525
+ */
526
+ export interface ListJoinedPrivateArchivedThreadsQuery {
527
+ /** returns threads before this id */
528
+ before?: Snowflake;
529
+ /** optional maximum number of threads to return */
530
+ limit?: number;
531
+ }
532
+ /**
533
+ * Response Body
534
+ * @see https://docs.discord.com/developers/resources/channel#list-joined-private-archived-threads-response-body
535
+ */
536
+ export interface ListJoinedPrivateArchivedThreadsResponse {
537
+ /** the private, archived threads the current user has joined */
538
+ threads: RawChannel[];
539
+ /** a thread member object for each returned thread the current user has joined */
540
+ members: RawThreadMember[];
541
+ /** whether there are potentially additional threads that could be returned on a subsequent call */
542
+ has_more: boolean;
543
+ }
544
+ /**
545
+ * The `type` of a permission overwrite.
546
+ * @see https://docs.discord.com/developers/resources/channel#overwrite-object-overwrite-structure
547
+ */
548
+ export declare const PermissionOverwriteType: {
549
+ readonly Role: 0;
550
+ readonly Member: 1;
551
+ };
552
+ export type PermissionOverwriteType = (typeof PermissionOverwriteType)[keyof typeof PermissionOverwriteType];
553
+ /**
554
+ * What Modify Channel accepts: it depends on the kind of channel.
555
+ * @see https://docs.discord.com/developers/resources/channel#modify-channel
556
+ */
557
+ export type ModifyChannelJSONParams = ModifyGroupDmJSONParams | ModifyGuildChannelJSONParams | ModifyThreadJSONParams;
@@ -0,0 +1,88 @@
1
+ /**
2
+ * Channel Types
3
+ * @see https://docs.discord.com/developers/resources/channel#channel-object-channel-types
4
+ */
5
+ export const ChannelType = {
6
+ /** a text channel within a server */
7
+ GuildText: 0,
8
+ /** a direct message between users */
9
+ Dm: 1,
10
+ /** a voice channel within a server */
11
+ GuildVoice: 2,
12
+ /** a direct message between multiple users */
13
+ GroupDm: 3,
14
+ /** an organizational category that contains up to 50 channels */
15
+ GuildCategory: 4,
16
+ /** a channel that users can follow and crosspost into their own server (formerly news channels) */
17
+ GuildAnnouncement: 5,
18
+ /** a temporary sub-channel within a GUILD_ANNOUNCEMENT channel */
19
+ AnnouncementThread: 10,
20
+ /** a temporary sub-channel within a GUILD_TEXT or GUILD_FORUM channel */
21
+ PublicThread: 11,
22
+ /** a temporary sub-channel within a GUILD_TEXT channel that is only viewable by those invited and those with the MANAGE_THREADS permission */
23
+ PrivateThread: 12,
24
+ /** a voice channel for hosting events with an audience */
25
+ GuildStageVoice: 13,
26
+ /** the channel in a hub containing the listed servers */
27
+ GuildDirectory: 14,
28
+ /** Channel that can only contain threads */
29
+ GuildForum: 15,
30
+ /** Channel that can only contain threads, similar to `GUILD_FORUM` channels */
31
+ GuildMedia: 16,
32
+ };
33
+ /**
34
+ * Video Quality Modes
35
+ * @see https://docs.discord.com/developers/resources/channel#channel-object-video-quality-modes
36
+ */
37
+ export const VideoQualityMode = {
38
+ /** Discord chooses the quality for optimal performance */
39
+ Auto: 1,
40
+ /** 720p */
41
+ Full: 2,
42
+ };
43
+ /**
44
+ * Channel Flags
45
+ * @see https://docs.discord.com/developers/resources/channel#channel-object-channel-flags
46
+ */
47
+ export const ChannelFlags = {
48
+ /** this thread is pinned to the top of its parent `GUILD_FORUM` or `GUILD_MEDIA` channel */
49
+ Pinned: 1 << 1,
50
+ /** whether a tag is required to be specified when creating a thread in a `GUILD_FORUM` or a `GUILD_MEDIA` channel. Tags are specified in the `applied_tags` field. */
51
+ RequireTag: 1 << 4,
52
+ /** when set hides the embedded media download options. Available only for media channels */
53
+ HideMediaDownloadOptions: 1 << 15,
54
+ /** this channel's metadata has been obfuscated because the current user cannot view it. Only ever set on channels received over the Gateway; the HTTP API never sets this flag. See Obfuscated Channels. */
55
+ ChannelObfuscated: 1 << 17,
56
+ /** this channel is a Spoiler Channel i.e. users must opt in to view its contents. Can be set on all textual guild channels and voice channels (not `GUILD_STAGE`). Can only be set if channel's `nsfw` is false */
57
+ IsSpoilerChannel: 1 << 21,
58
+ };
59
+ /**
60
+ * Sort Order Types
61
+ * @see https://docs.discord.com/developers/resources/channel#channel-object-sort-order-types
62
+ */
63
+ export const ForumSortOrderType = {
64
+ /** Sort forum posts by activity */
65
+ LatestActivity: 0,
66
+ /** Sort forum posts by creation time (from most recent to oldest) */
67
+ CreationDate: 1,
68
+ };
69
+ /**
70
+ * Forum Layout Types
71
+ * @see https://docs.discord.com/developers/resources/channel#channel-object-forum-layout-types
72
+ */
73
+ export const ForumLayoutType = {
74
+ /** No default has been set for forum channel */
75
+ NotSet: 0,
76
+ /** Display posts as a list */
77
+ ListView: 1,
78
+ /** Display posts as a collection of tiles */
79
+ GalleryView: 2,
80
+ };
81
+ /**
82
+ * The `type` of a permission overwrite.
83
+ * @see https://docs.discord.com/developers/resources/channel#overwrite-object-overwrite-structure
84
+ */
85
+ export const PermissionOverwriteType = {
86
+ Role: 0,
87
+ Member: 1,
88
+ };