chapterjs 0.1.2 → 0.2.0

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 (318) 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 +205 -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 +253 -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 +135 -0
  25. package/dist/cli/project.js +517 -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 +360 -0
  31. package/dist/commands/command.js +28 -0
  32. package/dist/commands/declaration.d.ts +77 -0
  33. package/dist/commands/declaration.js +492 -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 +47 -0
  39. package/dist/commands/tree.js +216 -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 +106 -0
  44. package/dist/components/component.d.ts +140 -0
  45. package/dist/components/component.js +39 -0
  46. package/dist/components/custom-id.d.ts +72 -0
  47. package/dist/components/custom-id.js +128 -0
  48. package/dist/components/declaration.d.ts +42 -0
  49. package/dist/components/declaration.js +342 -0
  50. package/dist/components/declared.d.ts +29 -0
  51. package/dist/components/declared.js +49 -0
  52. package/dist/components/embed.d.ts +29 -0
  53. package/dist/components/embed.js +11 -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 +245 -0
  59. package/dist/components/modal.js +398 -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 +19 -0
  65. package/dist/components/router.js +251 -0
  66. package/dist/components/select.d.ts +146 -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/declaration.d.ts +16 -0
  155. package/dist/events/declaration.js +80 -0
  156. package/dist/events/event.d.ts +45 -0
  157. package/dist/events/event.js +34 -0
  158. package/dist/events/registry.d.ts +697 -0
  159. package/dist/events/registry.js +839 -0
  160. package/dist/events/router.d.ts +46 -0
  161. package/dist/events/router.js +133 -0
  162. package/dist/gateway/errors.d.ts +18 -0
  163. package/dist/gateway/errors.js +47 -0
  164. package/dist/gateway/gateway.d.ts +64 -0
  165. package/dist/gateway/gateway.js +117 -0
  166. package/dist/gateway/identify-queue.d.ts +25 -0
  167. package/dist/gateway/identify-queue.js +29 -0
  168. package/dist/gateway/shard.d.ts +94 -0
  169. package/dist/gateway/shard.js +414 -0
  170. package/dist/gateway/state.d.ts +11 -0
  171. package/dist/gateway/state.js +184 -0
  172. package/dist/index.d.ts +57 -18
  173. package/dist/index.js +40 -12
  174. package/dist/interactions/cooldown.d.ts +33 -0
  175. package/dist/interactions/cooldown.js +74 -0
  176. package/dist/interactions/dispatch.d.ts +91 -0
  177. package/dist/interactions/dispatch.js +110 -0
  178. package/dist/loader/generated.d.ts +10 -0
  179. package/dist/loader/generated.js +80 -0
  180. package/dist/loader/hot.d.ts +13 -0
  181. package/dist/loader/hot.js +85 -0
  182. package/dist/loader/loader.d.ts +85 -0
  183. package/dist/loader/loader.js +119 -0
  184. package/dist/loader/locate.d.ts +10 -0
  185. package/dist/loader/locate.js +36 -0
  186. package/dist/loader/watch.d.ts +17 -0
  187. package/dist/loader/watch.js +66 -0
  188. package/dist/main.d.ts +2 -0
  189. package/dist/main.js +5 -0
  190. package/dist/messages/commands.d.ts +23 -0
  191. package/dist/messages/commands.js +142 -0
  192. package/dist/messages/declaration.d.ts +89 -0
  193. package/dist/messages/declaration.js +455 -0
  194. package/dist/messages/messages.d.ts +241 -0
  195. package/dist/messages/messages.js +31 -0
  196. package/dist/messages/phrases.d.ts +23 -0
  197. package/dist/messages/phrases.js +44 -0
  198. package/dist/messages/translate.d.ts +100 -0
  199. package/dist/messages/translate.js +249 -0
  200. package/dist/presence/declaration.d.ts +19 -0
  201. package/dist/presence/declaration.js +118 -0
  202. package/dist/presence/presence.d.ts +57 -0
  203. package/dist/presence/presence.js +27 -0
  204. package/dist/rest/errors.d.ts +55 -0
  205. package/dist/rest/errors.js +92 -0
  206. package/dist/rest/rate-limiter.d.ts +46 -0
  207. package/dist/rest/rate-limiter.js +153 -0
  208. package/dist/rest/rest.d.ts +63 -0
  209. package/dist/rest/rest.js +194 -0
  210. package/dist/structures/base.d.ts +48 -0
  211. package/dist/structures/base.js +84 -0
  212. package/dist/structures/channel.d.ts +380 -0
  213. package/dist/structures/channel.js +627 -0
  214. package/dist/structures/context.d.ts +30 -0
  215. package/dist/structures/context.js +7 -0
  216. package/dist/structures/emoji.d.ts +46 -0
  217. package/dist/structures/emoji.js +65 -0
  218. package/dist/structures/entities.d.ts +62 -0
  219. package/dist/structures/entities.js +226 -0
  220. package/dist/structures/guild.d.ts +348 -0
  221. package/dist/structures/guild.js +466 -0
  222. package/dist/structures/interaction.d.ts +197 -0
  223. package/dist/structures/interaction.js +396 -0
  224. package/dist/structures/invite.d.ts +38 -0
  225. package/dist/structures/invite.js +57 -0
  226. package/dist/structures/known.d.ts +28 -0
  227. package/dist/structures/known.js +58 -0
  228. package/dist/structures/member.d.ts +140 -0
  229. package/dist/structures/member.js +260 -0
  230. package/dist/structures/message.d.ts +197 -0
  231. package/dist/structures/message.js +268 -0
  232. package/dist/structures/payload.d.ts +91 -0
  233. package/dist/structures/payload.js +184 -0
  234. package/dist/structures/role.d.ts +69 -0
  235. package/dist/structures/role.js +112 -0
  236. package/dist/structures/user.d.ts +59 -0
  237. package/dist/structures/user.js +94 -0
  238. package/dist/structures/webhook.d.ts +46 -0
  239. package/dist/structures/webhook.js +79 -0
  240. package/dist/tasks/declaration.d.ts +16 -0
  241. package/dist/tasks/declaration.js +56 -0
  242. package/dist/tasks/schedule.d.ts +54 -0
  243. package/dist/tasks/schedule.js +236 -0
  244. package/dist/tasks/scheduler.d.ts +35 -0
  245. package/dist/tasks/scheduler.js +107 -0
  246. package/dist/tasks/task.d.ts +75 -0
  247. package/dist/tasks/task.js +27 -0
  248. package/dist/util/case.d.ts +13 -0
  249. package/dist/util/case.js +54 -0
  250. package/dist/util/duration.d.ts +8 -0
  251. package/dist/util/duration.js +29 -0
  252. package/dist/util/websocket.d.ts +9 -0
  253. package/dist/util/websocket.js +31 -0
  254. package/dist/voice/connection.d.ts +90 -0
  255. package/dist/voice/connection.js +494 -0
  256. package/dist/voice/dave.d.ts +109 -0
  257. package/dist/voice/dave.js +245 -0
  258. package/dist/voice/opus.d.ts +19 -0
  259. package/dist/voice/opus.js +273 -0
  260. package/dist/voice/session.d.ts +55 -0
  261. package/dist/voice/session.js +405 -0
  262. package/dist/voice/source.d.ts +22 -0
  263. package/dist/voice/source.js +195 -0
  264. package/dist/voice/transport.d.ts +43 -0
  265. package/dist/voice/transport.js +140 -0
  266. package/dist/voice/usage.d.ts +4 -0
  267. package/dist/voice/usage.js +33 -0
  268. package/package.json +26 -7
  269. package/vendor/dave/LICENSE +231 -0
  270. package/vendor/dave/libdave.d.mts +99 -0
  271. package/vendor/dave/libdave.mjs +2 -0
  272. package/vendor/dave/libdave.wasm +0 -0
  273. package/dist/components.d.ts +0 -97
  274. package/dist/components.js +0 -260
  275. package/dist/context.d.ts +0 -72
  276. package/dist/context.js +0 -273
  277. package/dist/discord/client.d.ts +0 -35
  278. package/dist/discord/client.js +0 -66
  279. package/dist/discord/constants.d.ts +0 -49
  280. package/dist/discord/constants.js +0 -61
  281. package/dist/discord/events.d.ts +0 -129
  282. package/dist/discord/events.js +0 -102
  283. package/dist/discord/gateway.d.ts +0 -61
  284. package/dist/discord/gateway.js +0 -320
  285. package/dist/discord/payloads.d.ts +0 -275
  286. package/dist/discord/payloads.js +0 -3
  287. package/dist/discord/presence.d.ts +0 -42
  288. package/dist/discord/presence.js +0 -51
  289. package/dist/discord/rest.d.ts +0 -49
  290. package/dist/discord/rest.js +0 -271
  291. package/dist/discord/types.d.ts +0 -334
  292. package/dist/discord/types.js +0 -4
  293. package/dist/events.d.ts +0 -94
  294. package/dist/events.js +0 -255
  295. package/dist/presence.d.ts +0 -92
  296. package/dist/presence.js +0 -250
  297. package/dist/structures/Channel.d.ts +0 -110
  298. package/dist/structures/Channel.js +0 -171
  299. package/dist/structures/Guild.d.ts +0 -70
  300. package/dist/structures/Guild.js +0 -105
  301. package/dist/structures/Interaction.d.ts +0 -113
  302. package/dist/structures/Interaction.js +0 -274
  303. package/dist/structures/Member.d.ts +0 -70
  304. package/dist/structures/Member.js +0 -124
  305. package/dist/structures/Message.d.ts +0 -87
  306. package/dist/structures/Message.js +0 -182
  307. package/dist/structures/Reaction.d.ts +0 -38
  308. package/dist/structures/Reaction.js +0 -64
  309. package/dist/structures/Role.d.ts +0 -43
  310. package/dist/structures/Role.js +0 -77
  311. package/dist/structures/User.d.ts +0 -41
  312. package/dist/structures/User.js +0 -79
  313. package/dist/structures/utils.d.ts +0 -72
  314. package/dist/structures/utils.js +0 -59
  315. package/dist/utils/errors.d.ts +0 -5
  316. package/dist/utils/errors.js +0 -28
  317. package/dist/utils/modules.d.ts +0 -39
  318. package/dist/utils/modules.js +0 -156
@@ -0,0 +1,910 @@
1
+ import type { RawApplication } from './application.js';
2
+ import type { ChannelType, ForumLayoutType, ForumSortOrderType, RawChannel, RawDefaultReaction, RawForumTag, RawPermissionOverwrite, RawThreadMember, VideoQualityMode } from './channel.js';
3
+ import type { ISO8601Timestamp, ImageData, Locale, Snowflake } from './common.js';
4
+ import type { RawEmoji } from './emoji.js';
5
+ import type { OAuth2Scope } from './oauth2.js';
6
+ import type { RawRole, RawRoleColors } from './permissions.js';
7
+ import type { RawSticker } from './sticker.js';
8
+ import type { RawAvatarDecorationData, RawCollectibles, RawUser } from './user.js';
9
+ /**
10
+ * Guild Structure
11
+ * @see https://docs.discord.com/developers/resources/guild#guild-object-guild-structure
12
+ */
13
+ export interface RawGuild {
14
+ /** guild id */
15
+ id: Snowflake;
16
+ /** guild name (2-100 characters, excluding trailing and leading whitespace) */
17
+ name: string;
18
+ /** icon hash */
19
+ icon: string | null;
20
+ /** icon hash, returned when in the template object */
21
+ icon_hash?: string | null;
22
+ /** splash hash */
23
+ splash: string | null;
24
+ /** discovery splash hash; only present for guilds with the "DISCOVERABLE" feature */
25
+ discovery_splash: string | null;
26
+ /** true if the user is the owner of the guild */
27
+ owner?: boolean;
28
+ /** id of owner */
29
+ owner_id: Snowflake;
30
+ /** total permissions for the user in the guild (excludes overwrites and implicit permissions) */
31
+ permissions?: string;
32
+ /** voice region id for the guild (deprecated) */
33
+ region?: string | null;
34
+ /** id of afk channel */
35
+ afk_channel_id: Snowflake | null;
36
+ /** afk timeout in seconds */
37
+ afk_timeout: number;
38
+ /** true if the server widget is enabled */
39
+ widget_enabled?: boolean;
40
+ /** the channel id that the widget will generate an invite to, or `null` if set to no invite */
41
+ widget_channel_id?: Snowflake | null;
42
+ /** verification level required for the guild */
43
+ verification_level: VerificationLevel;
44
+ /** default message notifications level */
45
+ default_message_notifications: DefaultMessageNotificationLevel;
46
+ /** explicit content filter level */
47
+ explicit_content_filter: ExplicitContentFilterLevel;
48
+ /** roles in the guild */
49
+ roles: RawRole[];
50
+ /** custom guild emojis */
51
+ emojis: RawEmoji[];
52
+ /** enabled guild features */
53
+ features: GuildFeature[];
54
+ /** required MFA level for the guild */
55
+ mfa_level: MfaLevel;
56
+ /** application id of the guild creator if it is bot-created */
57
+ application_id: Snowflake | null;
58
+ /** the id of the channel where guild notices such as welcome messages and boost events are posted */
59
+ system_channel_id: Snowflake | null;
60
+ /** system channel flags */
61
+ system_channel_flags: number;
62
+ /** the id of the channel where Community guilds can display rules and/or guidelines */
63
+ rules_channel_id: Snowflake | null;
64
+ /** the maximum number of presences for the guild (`null` is always returned, apart from the largest of guilds) */
65
+ max_presences?: number | null;
66
+ /** the maximum number of members for the guild */
67
+ max_members?: number;
68
+ /** the vanity url code for the guild */
69
+ vanity_url_code: string | null;
70
+ /** the description of a guild */
71
+ description: string | null;
72
+ /** banner hash */
73
+ banner: string | null;
74
+ /** premium tier (Server Boost level) */
75
+ premium_tier: PremiumTier;
76
+ /** the number of boosts this guild currently has */
77
+ premium_subscription_count?: number;
78
+ /** the preferred locale of a Community guild; used in server discovery and notices from Discord, and sent in interactions; defaults to "en-US" */
79
+ preferred_locale: Locale;
80
+ /** the id of the channel where admins and moderators of Community guilds receive notices from Discord */
81
+ public_updates_channel_id: Snowflake | null;
82
+ /** the maximum amount of users in a video channel */
83
+ max_video_channel_users?: number;
84
+ /** the maximum amount of users in a stage video channel */
85
+ max_stage_video_channel_users?: number;
86
+ /** approximate number of members in this guild, returned from the `GET /guilds/` and `/users/@me/guilds` endpoints when `with_counts` is `true` */
87
+ approximate_member_count?: number;
88
+ /** approximate number of non-offline members in this guild, returned from the `GET /guilds/` and `/users/@me/guilds` endpoints when `with_counts` is `true` */
89
+ approximate_presence_count?: number;
90
+ /** the welcome screen of a Community guild, shown to new members, returned in an Invite's guild object */
91
+ welcome_screen?: RawWelcomeScreen;
92
+ /** guild age-restriction level */
93
+ nsfw_level: GuildAgeRestrictionLevel;
94
+ /** custom guild stickers */
95
+ stickers?: RawSticker[];
96
+ /** whether the guild has the boost progress bar enabled */
97
+ premium_progress_bar_enabled: boolean;
98
+ /** the id of the channel where admins and moderators of Community guilds receive safety alerts from Discord */
99
+ safety_alerts_channel_id: Snowflake | null;
100
+ /** the incidents data for this guild */
101
+ incidents_data: RawIncidentsData | null;
102
+ }
103
+ /**
104
+ * Default Message Notification Level
105
+ * @see https://docs.discord.com/developers/resources/guild#guild-object-default-message-notification-level
106
+ */
107
+ export declare const DefaultMessageNotificationLevel: {
108
+ /** members will receive notifications for all messages by default */
109
+ readonly AllMessages: 0;
110
+ /** members will receive notifications only for messages that @mention them by default */
111
+ readonly OnlyMentions: 1;
112
+ };
113
+ export type DefaultMessageNotificationLevel = (typeof DefaultMessageNotificationLevel)[keyof typeof DefaultMessageNotificationLevel];
114
+ /**
115
+ * Explicit Content Filter Level
116
+ * @see https://docs.discord.com/developers/resources/guild#guild-object-explicit-content-filter-level
117
+ */
118
+ export declare const ExplicitContentFilterLevel: {
119
+ /** media content will not be scanned */
120
+ readonly Disabled: 0;
121
+ /** media content sent by members without roles will be scanned */
122
+ readonly MembersWithoutRoles: 1;
123
+ /** media content sent by all members will be scanned */
124
+ readonly AllMembers: 2;
125
+ };
126
+ export type ExplicitContentFilterLevel = (typeof ExplicitContentFilterLevel)[keyof typeof ExplicitContentFilterLevel];
127
+ /**
128
+ * MFA Level
129
+ * @see https://docs.discord.com/developers/resources/guild#guild-object-mfa-level
130
+ */
131
+ export declare const MfaLevel: {
132
+ /** guild has no MFA/2FA requirement for moderation actions */
133
+ readonly None: 0;
134
+ /** guild has a 2FA requirement for moderation actions */
135
+ readonly Elevated: 1;
136
+ };
137
+ export type MfaLevel = (typeof MfaLevel)[keyof typeof MfaLevel];
138
+ /**
139
+ * Verification Level
140
+ * @see https://docs.discord.com/developers/resources/guild#guild-object-verification-level
141
+ */
142
+ export declare const VerificationLevel: {
143
+ /** unrestricted */
144
+ readonly None: 0;
145
+ /** must have verified email on account */
146
+ readonly Low: 1;
147
+ /** must be registered on Discord for longer than 5 minutes */
148
+ readonly Medium: 2;
149
+ /** must be a member of the server for longer than 10 minutes */
150
+ readonly High: 3;
151
+ /** must have a verified phone number */
152
+ readonly VeryHigh: 4;
153
+ };
154
+ export type VerificationLevel = (typeof VerificationLevel)[keyof typeof VerificationLevel];
155
+ /**
156
+ * Guild Age-Restriction Level
157
+ * @see https://docs.discord.com/developers/resources/guild#guild-object-guild-nsfw-level
158
+ */
159
+ export declare const GuildAgeRestrictionLevel: {
160
+ readonly Default: 0;
161
+ readonly Explicit: 1;
162
+ readonly Safe: 2;
163
+ readonly AgeRestricted: 3;
164
+ };
165
+ export type GuildAgeRestrictionLevel = (typeof GuildAgeRestrictionLevel)[keyof typeof GuildAgeRestrictionLevel];
166
+ /**
167
+ * Premium Tier
168
+ * @see https://docs.discord.com/developers/resources/guild#guild-object-premium-tier
169
+ */
170
+ export declare const PremiumTier: {
171
+ /** guild has not unlocked any Server Boost perks */
172
+ readonly None: 0;
173
+ /** guild has unlocked Server Boost level 1 perks */
174
+ readonly Tier1: 1;
175
+ /** guild has unlocked Server Boost level 2 perks */
176
+ readonly Tier2: 2;
177
+ /** guild has unlocked Server Boost level 3 perks */
178
+ readonly Tier3: 3;
179
+ };
180
+ export type PremiumTier = (typeof PremiumTier)[keyof typeof PremiumTier];
181
+ /**
182
+ * System Channel Flags
183
+ * @see https://docs.discord.com/developers/resources/guild#guild-object-system-channel-flags
184
+ */
185
+ export declare const SystemChannelFlags: {
186
+ /** Suppress member join notifications */
187
+ readonly SuppressJoinNotifications: number;
188
+ /** Suppress server boost notifications */
189
+ readonly SuppressPremiumSubscriptions: number;
190
+ /** Suppress server setup tips */
191
+ readonly SuppressGuildReminderNotifications: number;
192
+ /** Hide member join sticker reply buttons */
193
+ readonly SuppressJoinNotificationReplies: number;
194
+ /** Suppress role subscription purchase and renewal notifications */
195
+ readonly SuppressRoleSubscriptionPurchaseNotifications: number;
196
+ /** Hide role subscription sticker reply buttons */
197
+ readonly SuppressRoleSubscriptionPurchaseNotificationReplies: number;
198
+ };
199
+ export type SystemChannelFlags = (typeof SystemChannelFlags)[keyof typeof SystemChannelFlags];
200
+ /**
201
+ * Guild Preview Structure
202
+ * @see https://docs.discord.com/developers/resources/guild#guild-preview-object-guild-preview-structure
203
+ */
204
+ export interface RawGuildPreview {
205
+ /** guild id */
206
+ id: Snowflake;
207
+ /** guild name (2-100 characters) */
208
+ name: string;
209
+ /** icon hash */
210
+ icon: string | null;
211
+ /** splash hash */
212
+ splash: string | null;
213
+ /** discovery splash hash */
214
+ discovery_splash: string | null;
215
+ /** custom guild emojis */
216
+ emojis: RawEmoji[];
217
+ /** enabled guild features */
218
+ features: GuildFeature[];
219
+ /** approximate number of members in this guild */
220
+ approximate_member_count: number;
221
+ /** approximate number of online members in this guild */
222
+ approximate_presence_count: number;
223
+ /** the description for the guild */
224
+ description: string | null;
225
+ /** custom guild stickers */
226
+ stickers: RawSticker[];
227
+ }
228
+ /**
229
+ * Guild Widget Settings Structure
230
+ * @see https://docs.discord.com/developers/resources/guild#guild-widget-settings-object-guild-widget-settings-structure
231
+ */
232
+ export interface RawGuildWidgetSettings {
233
+ /** whether the widget is enabled */
234
+ enabled: boolean;
235
+ /** the widget channel id */
236
+ channel_id: Snowflake | null;
237
+ }
238
+ /**
239
+ * Guild Widget Structure
240
+ * @see https://docs.discord.com/developers/resources/guild#guild-widget-object-guild-widget-structure
241
+ */
242
+ export interface RawGuildWidget {
243
+ /** guild id */
244
+ id: Snowflake;
245
+ /** guild name (2-100 characters) */
246
+ name: string;
247
+ /** instant invite for the guilds specified widget invite channel */
248
+ instant_invite: string | null;
249
+ /** voice and stage channels which are accessible by @everyone */
250
+ channels: Partial<RawChannel>[];
251
+ /** special widget user objects that includes users presence (Limit 100) */
252
+ members: Partial<RawUser>[];
253
+ /** number of online members in this guild */
254
+ presence_count: number;
255
+ }
256
+ /**
257
+ * Guild Member Structure
258
+ * @see https://docs.discord.com/developers/resources/guild#guild-member-object-guild-member-structure
259
+ */
260
+ export interface RawGuildMember {
261
+ /** the user this guild member represents */
262
+ user?: RawUser;
263
+ /** this user's guild nickname */
264
+ nick?: string | null;
265
+ /** the member's guild avatar hash */
266
+ avatar?: string | null;
267
+ /** the member's guild banner hash */
268
+ banner?: string | null;
269
+ /** array of role object ids */
270
+ roles: Snowflake[];
271
+ /** when the user joined the guild */
272
+ joined_at: ISO8601Timestamp | null;
273
+ /** when the user started boosting the guild */
274
+ premium_since?: ISO8601Timestamp | null;
275
+ /** whether the user is deafened in voice channels */
276
+ deaf: boolean;
277
+ /** whether the user is muted in voice channels */
278
+ mute: boolean;
279
+ /** guild member flags represented as a bit set, defaults to `0` */
280
+ flags: number;
281
+ /** whether the user has not yet passed the guild's Membership Screening requirements */
282
+ pending?: boolean;
283
+ /** total permissions of the member in the channel, including overwrites, returned when in the interaction object */
284
+ permissions?: string;
285
+ /** when the user's timeout will expire and the user will be able to communicate in the guild again, null or a time in the past if the user is not timed out */
286
+ communication_disabled_until?: ISO8601Timestamp | null;
287
+ /** data for the member's guild avatar decoration */
288
+ avatar_decoration_data?: RawAvatarDecorationData | null;
289
+ /** data for the member's collectibles */
290
+ collectibles?: RawCollectibles | null;
291
+ }
292
+ /**
293
+ * Guild Member Flags
294
+ * @see https://docs.discord.com/developers/resources/guild#guild-member-object-guild-member-flags
295
+ */
296
+ export declare const GuildMemberFlags: {
297
+ /** Member has left and rejoined the guild */
298
+ readonly DidRejoin: number;
299
+ /** Member has completed onboarding */
300
+ readonly CompletedOnboarding: number;
301
+ /** Member is exempt from guild verification requirements */
302
+ readonly BypassesVerification: number;
303
+ /** Member has started onboarding */
304
+ readonly StartedOnboarding: number;
305
+ /** Member is a guest and can only access the voice channel they were invited to */
306
+ readonly IsGuest: number;
307
+ /** Member has started Server Guide new member actions */
308
+ readonly StartedHomeActions: number;
309
+ /** Member has completed Server Guide new member actions */
310
+ readonly CompletedHomeActions: number;
311
+ /** Member's username, display name, or nickname is blocked by AutoMod */
312
+ readonly AutomodQuarantinedUsername: number;
313
+ /** Member has dismissed the DM settings upsell */
314
+ readonly DmSettingsUpsellAcknowledged: number;
315
+ /** Member's guild tag is blocked by AutoMod */
316
+ readonly AutomodQuarantinedGuildTag: number;
317
+ };
318
+ export type GuildMemberFlags = (typeof GuildMemberFlags)[keyof typeof GuildMemberFlags];
319
+ /**
320
+ * Integration Structure
321
+ * @see https://docs.discord.com/developers/resources/guild#integration-object-integration-structure
322
+ */
323
+ export interface RawIntegration {
324
+ /** integration id */
325
+ id: Snowflake;
326
+ /** integration name */
327
+ name: string;
328
+ /** integration type (twitch, youtube, discord, or guild_subscription) */
329
+ type: string;
330
+ /** is this integration enabled */
331
+ enabled: boolean;
332
+ /** is this integration syncing */
333
+ syncing?: boolean;
334
+ /** id that this integration uses for "subscribers" */
335
+ role_id?: Snowflake;
336
+ /** whether emoticons should be synced for this integration (twitch only currently) */
337
+ enable_emoticons?: boolean;
338
+ /** the behavior of expiring subscribers */
339
+ expire_behavior?: IntegrationExpireBehavior;
340
+ /** the grace period (in days) before expiring subscribers */
341
+ expire_grace_period?: number;
342
+ /** user for this integration */
343
+ user?: RawUser;
344
+ /** integration account information */
345
+ account: RawIntegrationAccount;
346
+ /** when this integration was last synced */
347
+ synced_at?: ISO8601Timestamp;
348
+ /** how many subscribers this integration has */
349
+ subscriber_count?: number;
350
+ /** has this integration been revoked */
351
+ revoked?: boolean;
352
+ /** The bot/OAuth2 application for discord integrations */
353
+ application?: RawApplication;
354
+ /** the scopes the application has been authorized for */
355
+ scopes?: OAuth2Scope[];
356
+ }
357
+ /**
358
+ * Integration Expire Behaviors
359
+ * @see https://docs.discord.com/developers/resources/guild#integration-object-integration-expire-behaviors
360
+ */
361
+ export declare const IntegrationExpireBehavior: {
362
+ readonly RemoveRole: 0;
363
+ readonly Kick: 1;
364
+ };
365
+ export type IntegrationExpireBehavior = (typeof IntegrationExpireBehavior)[keyof typeof IntegrationExpireBehavior];
366
+ /**
367
+ * Integration Account Structure
368
+ * @see https://docs.discord.com/developers/resources/guild#integration-account-object-integration-account-structure
369
+ */
370
+ export interface RawIntegrationAccount {
371
+ /** id of the account */
372
+ id: string;
373
+ /** name of the account */
374
+ name: string;
375
+ }
376
+ /**
377
+ * Integration Application Structure
378
+ * @see https://docs.discord.com/developers/resources/guild#integration-application-object-integration-application-structure
379
+ */
380
+ export interface RawIntegrationApplication {
381
+ /** the id of the app */
382
+ id: Snowflake;
383
+ /** the name of the app */
384
+ name: string;
385
+ /** the icon hash of the app */
386
+ icon: string | null;
387
+ /** the description of the app */
388
+ description: string;
389
+ /** the bot associated with this application */
390
+ bot?: RawUser;
391
+ }
392
+ /**
393
+ * Ban Structure
394
+ * @see https://docs.discord.com/developers/resources/guild#ban-object-ban-structure
395
+ */
396
+ export interface RawBan {
397
+ /** the reason for the ban */
398
+ reason: string | null;
399
+ /** the banned user */
400
+ user: RawUser;
401
+ }
402
+ /**
403
+ * Welcome Screen Structure
404
+ * @see https://docs.discord.com/developers/resources/guild#welcome-screen-object-welcome-screen-structure
405
+ */
406
+ export interface RawWelcomeScreen {
407
+ /** the server description shown in the welcome screen */
408
+ description: string | null;
409
+ /** the channels shown in the welcome screen, up to 5 */
410
+ welcome_channels: RawWelcomeScreenChannel[];
411
+ }
412
+ /**
413
+ * Welcome Screen Channel Structure
414
+ * @see https://docs.discord.com/developers/resources/guild#welcome-screen-object-welcome-screen-channel-structure
415
+ */
416
+ export interface RawWelcomeScreenChannel {
417
+ /** the channel's id */
418
+ channel_id: Snowflake;
419
+ /** the description shown for the channel */
420
+ description: string;
421
+ /** the emoji id, if the emoji is custom */
422
+ emoji_id: Snowflake | null;
423
+ /** the emoji name if custom, the unicode character if standard, or `null` if no emoji is set */
424
+ emoji_name: string | null;
425
+ }
426
+ /**
427
+ * Guild Onboarding Structure
428
+ * @see https://docs.discord.com/developers/resources/guild#guild-onboarding-object-guild-onboarding-structure
429
+ */
430
+ export interface RawGuildOnboarding {
431
+ /** ID of the guild this onboarding is part of */
432
+ guild_id: Snowflake;
433
+ /** Prompts shown during onboarding and in customize community */
434
+ prompts: RawOnboardingPrompt[];
435
+ /** Channel IDs that members get opted into automatically */
436
+ default_channel_ids: Snowflake[];
437
+ /** Whether onboarding is enabled in the guild */
438
+ enabled: boolean;
439
+ /** Current mode of onboarding */
440
+ mode: OnboardingMode;
441
+ }
442
+ /**
443
+ * Onboarding Prompt Structure
444
+ * @see https://docs.discord.com/developers/resources/guild#guild-onboarding-object-onboarding-prompt-structure
445
+ */
446
+ export interface RawOnboardingPrompt {
447
+ /** ID of the prompt */
448
+ id: Snowflake;
449
+ /** Type of prompt */
450
+ type: OnboardingPromptType;
451
+ /** Options available within the prompt */
452
+ options: RawOnboardingPromptOption[];
453
+ /** Title of the prompt */
454
+ title: string;
455
+ /** Indicates whether users are limited to selecting one option for the prompt */
456
+ single_select: boolean;
457
+ /** Indicates whether the prompt is required before a user completes the onboarding flow */
458
+ required: boolean;
459
+ /** Indicates whether the prompt is present in the onboarding flow. If `false`, the prompt will only appear in the Channels & Roles tab */
460
+ in_onboarding: boolean;
461
+ }
462
+ /**
463
+ * Prompt Option Structure
464
+ * @see https://docs.discord.com/developers/resources/guild#guild-onboarding-object-prompt-option-structure
465
+ */
466
+ export interface RawOnboardingPromptOption {
467
+ /** ID of the prompt option */
468
+ id: Snowflake;
469
+ /** IDs for channels a member is added to when the option is selected */
470
+ channel_ids: Snowflake[];
471
+ /** IDs for roles assigned to a member when the option is selected */
472
+ role_ids: Snowflake[];
473
+ /** Emoji of the option (see below) */
474
+ emoji?: RawEmoji;
475
+ /** Emoji ID of the option (see below) */
476
+ emoji_id?: Snowflake;
477
+ /** Emoji name of the option (see below) */
478
+ emoji_name?: string;
479
+ /** Whether the emoji is animated (see below) */
480
+ emoji_animated?: boolean;
481
+ /** Title of the option */
482
+ title: string;
483
+ /** Description of the option */
484
+ description: string | null;
485
+ }
486
+ /**
487
+ * Onboarding Mode
488
+ * @see https://docs.discord.com/developers/resources/guild#guild-onboarding-object-onboarding-mode
489
+ */
490
+ export declare const OnboardingMode: {
491
+ /** Counts only Default Channels towards constraints */
492
+ readonly OnboardingDefault: 0;
493
+ /** Counts Default Channels and Questions towards constraints */
494
+ readonly OnboardingAdvanced: 1;
495
+ };
496
+ export type OnboardingMode = (typeof OnboardingMode)[keyof typeof OnboardingMode];
497
+ /**
498
+ * Prompt Types
499
+ * @see https://docs.discord.com/developers/resources/guild#guild-onboarding-object-prompt-types
500
+ */
501
+ export declare const OnboardingPromptType: {
502
+ readonly MultipleChoice: 0;
503
+ readonly Dropdown: 1;
504
+ };
505
+ export type OnboardingPromptType = (typeof OnboardingPromptType)[keyof typeof OnboardingPromptType];
506
+ /**
507
+ * Incidents Data Structure
508
+ * @see https://docs.discord.com/developers/resources/guild#incidents-data-object-incidents-data-structure
509
+ */
510
+ export interface RawIncidentsData {
511
+ /** when invites get enabled again */
512
+ invites_disabled_until: ISO8601Timestamp | null;
513
+ /** when direct messages get enabled again */
514
+ dms_disabled_until: ISO8601Timestamp | null;
515
+ /** when the dm spam was detected */
516
+ dm_spam_detected_at?: ISO8601Timestamp | null;
517
+ /** when the raid was detected */
518
+ raid_detected_at?: ISO8601Timestamp | null;
519
+ }
520
+ /**
521
+ * Query String Params
522
+ * @see https://docs.discord.com/developers/resources/guild#get-guild-query-string-params
523
+ */
524
+ export interface GetGuildQuery {
525
+ /** when `true`, will return approximate member and presence counts for the guild */
526
+ with_counts?: boolean;
527
+ }
528
+ /**
529
+ * JSON Params
530
+ * @see https://docs.discord.com/developers/resources/guild#modify-guild-json-params
531
+ */
532
+ export interface ModifyGuildJSONParams {
533
+ /** guild name */
534
+ name?: string;
535
+ /** guild voice region id (deprecated) */
536
+ region?: string | null;
537
+ /** verification level */
538
+ verification_level?: VerificationLevel | null;
539
+ /** default message notification level */
540
+ default_message_notifications?: DefaultMessageNotificationLevel | null;
541
+ /** explicit content filter level */
542
+ explicit_content_filter?: ExplicitContentFilterLevel | null;
543
+ /** id for afk channel */
544
+ afk_channel_id?: Snowflake | null;
545
+ /** afk timeout in seconds, can be set to: 60, 300, 900, 1800, 3600 */
546
+ afk_timeout?: number;
547
+ /** base64 1024x1024 png/jpeg/gif image for the guild icon (can be animated gif when the server has the `ANIMATED_ICON` feature) */
548
+ icon?: ImageData | null;
549
+ /** base64 16:9 png/jpeg image for the guild splash (when the server has the `INVITE_SPLASH` feature) */
550
+ splash?: ImageData | null;
551
+ /** base64 16:9 png/jpeg image for the guild discovery splash (when the server has the `DISCOVERABLE` feature) */
552
+ discovery_splash?: ImageData | null;
553
+ /** base64 16:9 png/jpeg image for the guild banner (when the server has the `BANNER` feature; can be animated gif when the server has the `ANIMATED_BANNER` feature) */
554
+ banner?: ImageData | null;
555
+ /** the id of the channel where guild notices such as welcome messages and boost events are posted */
556
+ system_channel_id?: Snowflake | null;
557
+ /** system channel flags */
558
+ system_channel_flags?: number;
559
+ /** the id of the channel where Community guilds display rules and/or guidelines */
560
+ rules_channel_id?: Snowflake | null;
561
+ /** the id of the channel where admins and moderators of Community guilds receive notices from Discord */
562
+ public_updates_channel_id?: Snowflake | null;
563
+ /** the preferred locale of a Community guild used in server discovery and notices from Discord; defaults to "en-US" */
564
+ preferred_locale?: Locale | null;
565
+ /** enabled guild features */
566
+ features?: GuildFeature[];
567
+ /** the description for the guild */
568
+ description?: string | null;
569
+ /** whether the guild's boost progress bar should be enabled */
570
+ premium_progress_bar_enabled?: boolean;
571
+ /** the id of the channel where admins and moderators of Community guilds receive safety alerts from Discord */
572
+ safety_alerts_channel_id?: Snowflake | null;
573
+ }
574
+ /**
575
+ * JSON Params
576
+ * @see https://docs.discord.com/developers/resources/guild#create-guild-channel-json-params
577
+ */
578
+ export interface CreateGuildChannelJSONParams {
579
+ /** channel name (1-100 characters) */
580
+ name: string;
581
+ /** the type of channel */
582
+ type?: ChannelType | null;
583
+ /** channel topic (0-1024 characters) */
584
+ topic?: string | null;
585
+ /** the bitrate (in bits per second) of the voice or stage channel; min 8000 */
586
+ bitrate?: number | null;
587
+ /** the user limit of the voice channel */
588
+ user_limit?: number | null;
589
+ /** 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 */
590
+ rate_limit_per_user?: number | null;
591
+ /** sorting position of the channel (channels with the same position are sorted by id) */
592
+ position?: number | null;
593
+ /** the channel's permission overwrites */
594
+ permission_overwrites?: Partial<RawPermissionOverwrite>[] | null;
595
+ /** id of the parent category for a channel */
596
+ parent_id?: Snowflake | null;
597
+ /** whether the channel is age-restricted */
598
+ nsfw?: boolean | null;
599
+ /** channel voice region id of the voice or stage channel, automatic when set to null */
600
+ rtc_region?: string | null;
601
+ /** the camera video quality mode of the voice channel */
602
+ video_quality_mode?: VideoQualityMode | null;
603
+ /** 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 */
604
+ default_auto_archive_duration?: number | null;
605
+ /** emoji to show in the add reaction button on a thread in a `GUILD_FORUM` or a `GUILD_MEDIA` channel */
606
+ default_reaction_emoji?: RawDefaultReaction | null;
607
+ /** set of tags that can be used in a `GUILD_FORUM` or a `GUILD_MEDIA` channel */
608
+ available_tags?: RawForumTag[] | null;
609
+ /** the default sort order type used to order posts in `GUILD_FORUM` and `GUILD_MEDIA` channels */
610
+ default_sort_order?: ForumSortOrderType | null;
611
+ /** the default forum layout view used to display posts in `GUILD_FORUM` channels */
612
+ default_forum_layout?: ForumLayoutType | null;
613
+ /** 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. */
614
+ default_thread_rate_limit_per_user?: number | null;
615
+ /** channel flags combined as a bitfield. */
616
+ flags?: number | null;
617
+ }
618
+ /**
619
+ * JSON Params
620
+ * @see https://docs.discord.com/developers/resources/guild#modify-guild-channel-positions-json-params
621
+ */
622
+ export interface ModifyGuildChannelPositionsJSONParams {
623
+ /** channel id */
624
+ id?: Snowflake;
625
+ /** sorting position of the channel (channels with the same position are sorted by id) */
626
+ position?: number | null;
627
+ /** syncs the permission overwrites with the new parent, if moving to a new category */
628
+ lock_permissions?: boolean | null;
629
+ /** the new parent ID for the channel that is moved */
630
+ parent_id?: Snowflake | null;
631
+ /** channel flags combined as a bitfield. */
632
+ flags?: number | null;
633
+ }
634
+ /**
635
+ * Response Body
636
+ * @see https://docs.discord.com/developers/resources/guild#list-active-guild-threads-response-body
637
+ */
638
+ export interface ListActiveGuildThreadsResponse {
639
+ /** the active threads */
640
+ threads: RawChannel[];
641
+ /** a thread member object for each returned thread the current user has joined */
642
+ members: RawThreadMember[];
643
+ }
644
+ /**
645
+ * Query String Params
646
+ * @see https://docs.discord.com/developers/resources/guild#list-guild-members-query-string-params
647
+ */
648
+ export interface ListGuildMembersQuery {
649
+ /** max number of members to return (1-1000) */
650
+ limit?: number;
651
+ /** the highest user id in the previous page */
652
+ after?: Snowflake;
653
+ }
654
+ /**
655
+ * Query String Params
656
+ * @see https://docs.discord.com/developers/resources/guild#search-guild-members-query-string-params
657
+ */
658
+ export interface SearchGuildMembersQuery {
659
+ /** Query string to match username(s) and nickname(s) against. */
660
+ query?: string;
661
+ /** max number of members to return (1-1000) */
662
+ limit?: number;
663
+ }
664
+ /**
665
+ * JSON Params
666
+ * @see https://docs.discord.com/developers/resources/guild#add-guild-member-json-params
667
+ */
668
+ export interface AddGuildMemberJSONParams {
669
+ /** an oauth2 access token granted with the `guilds.join` to the bot's application for the user you want to add to the guild */
670
+ access_token: string;
671
+ /** value to set user's nickname to */
672
+ nick?: string;
673
+ /** array of role ids the member is assigned */
674
+ roles?: Snowflake[];
675
+ /** whether the user is muted in voice channels */
676
+ mute?: boolean;
677
+ /** whether the user is deafened in voice channels */
678
+ deaf?: boolean;
679
+ }
680
+ /**
681
+ * JSON Params
682
+ * @see https://docs.discord.com/developers/resources/guild#modify-guild-member-json-params
683
+ */
684
+ export interface ModifyGuildMemberJSONParams {
685
+ /** value to set user's nickname to */
686
+ nick?: string;
687
+ /** array of role ids the member is assigned */
688
+ roles?: Snowflake[];
689
+ /** whether the user is muted in voice channels. Will throw a 400 error if the user is not in a voice channel */
690
+ mute?: boolean;
691
+ /** whether the user is deafened in voice channels. Will throw a 400 error if the user is not in a voice channel */
692
+ deaf?: boolean;
693
+ /** id of channel to move user to (if they are connected to voice) */
694
+ channel_id?: Snowflake;
695
+ /** when the user's timeout will expire and the user will be able to communicate in the guild again (up to 28 days in the future), set to null to remove timeout. Will throw a 403 error if the user has the ADMINISTRATOR permission or is the owner of the guild */
696
+ communication_disabled_until?: ISO8601Timestamp;
697
+ /** guild member flags */
698
+ flags?: number;
699
+ }
700
+ /**
701
+ * JSON Params
702
+ * @see https://docs.discord.com/developers/resources/guild#modify-current-member-json-params
703
+ */
704
+ export interface ModifyCurrentMemberJSONParams {
705
+ /** value to set user's nickname to */
706
+ nick?: string | null;
707
+ /** data URI base64 encoded banner image */
708
+ banner?: string | null;
709
+ /** data URI base64 encoded avatar image */
710
+ avatar?: string | null;
711
+ /** guild member bio */
712
+ bio?: string | null;
713
+ }
714
+ /**
715
+ * JSON Params
716
+ * @see https://docs.discord.com/developers/resources/guild#modify-current-user-nick-json-params
717
+ */
718
+ export interface ModifyCurrentUserNickJSONParams {
719
+ /** value to set user's nickname to */
720
+ nick?: string | null;
721
+ }
722
+ /**
723
+ * Query String Params
724
+ * @see https://docs.discord.com/developers/resources/guild#get-guild-bans-query-string-params
725
+ */
726
+ export interface GetGuildBansQuery {
727
+ /** number of users to return (up to maximum 1000) */
728
+ limit?: number;
729
+ /** consider only users before given user id */
730
+ before?: Snowflake;
731
+ /** consider only users after given user id */
732
+ after?: Snowflake;
733
+ }
734
+ /**
735
+ * JSON Params
736
+ * @see https://docs.discord.com/developers/resources/guild#create-guild-ban-json-params
737
+ */
738
+ export interface CreateGuildBanJSONParams {
739
+ /** number of days to delete messages for (0-7) (deprecated) */
740
+ delete_message_days?: number;
741
+ /** number of seconds to delete messages for, between 0 and 604800 (7 days) */
742
+ delete_message_seconds?: number;
743
+ }
744
+ /**
745
+ * JSON Params
746
+ * @see https://docs.discord.com/developers/resources/guild#bulk-guild-ban-json-params
747
+ */
748
+ export interface BulkGuildBanJSONParams {
749
+ /** list of user ids to ban (max 200) */
750
+ user_ids: Snowflake[];
751
+ /** number of seconds to delete messages for, between 0 and 604800 (7 days) */
752
+ delete_message_seconds?: number;
753
+ }
754
+ /**
755
+ * Bulk Ban Response
756
+ * @see https://docs.discord.com/developers/resources/guild#bulk-guild-ban-bulk-ban-response
757
+ */
758
+ export interface RawBulkBanResponse {
759
+ /** list of user ids, that were successfully banned */
760
+ banned_users: Snowflake[];
761
+ /** list of user ids, that were not banned */
762
+ failed_users: Snowflake[];
763
+ }
764
+ /**
765
+ * JSON Params
766
+ * @see https://docs.discord.com/developers/resources/guild#create-guild-role-json-params
767
+ */
768
+ export interface CreateGuildRoleJSONParams {
769
+ /** name of the role, max 100 characters */
770
+ name?: string;
771
+ /** bitwise value of the enabled/disabled permissions */
772
+ permissions?: string;
773
+ /** **Deprecated** RGB color value */
774
+ color?: number;
775
+ /** the role's colors */
776
+ colors?: RawRoleColors;
777
+ /** whether the role should be displayed separately in the sidebar */
778
+ hoist?: boolean;
779
+ /** the role's icon image (if the guild has the `ROLE_ICONS` feature) */
780
+ icon?: ImageData | null;
781
+ /** the role's unicode emoji as a standard emoji (if the guild has the `ROLE_ICONS` feature) */
782
+ unicode_emoji?: string | null;
783
+ /** whether the role should be mentionable */
784
+ mentionable?: boolean;
785
+ }
786
+ /**
787
+ * JSON Params
788
+ * @see https://docs.discord.com/developers/resources/guild#modify-guild-role-positions-json-params
789
+ */
790
+ export interface ModifyGuildRolePositionsJSONParams {
791
+ /** role */
792
+ id?: Snowflake;
793
+ /** sorting position of the role (roles with the same position are sorted by id) */
794
+ position?: number | null;
795
+ }
796
+ /**
797
+ * JSON Params
798
+ * @see https://docs.discord.com/developers/resources/guild#modify-guild-role-json-params
799
+ */
800
+ export interface ModifyGuildRoleJSONParams {
801
+ /** name of the role, max 100 characters */
802
+ name?: string;
803
+ /** bitwise value of the enabled/disabled permissions */
804
+ permissions?: string;
805
+ /** **Deprecated** RGB color value */
806
+ color?: number;
807
+ /** the role's colors */
808
+ colors?: RawRoleColors;
809
+ /** whether the role should be displayed separately in the sidebar */
810
+ hoist?: boolean;
811
+ /** the role's icon image (if the guild has the `ROLE_ICONS` feature) */
812
+ icon?: ImageData;
813
+ /** the role's unicode emoji as a standard emoji (if the guild has the `ROLE_ICONS` feature) */
814
+ unicode_emoji?: string;
815
+ /** whether the role should be mentionable */
816
+ mentionable?: boolean;
817
+ }
818
+ /**
819
+ * Query String Params
820
+ * @see https://docs.discord.com/developers/resources/guild#get-guild-prune-count-query-string-params
821
+ */
822
+ export interface GetGuildPruneCountQuery {
823
+ /** number of days to count prune for (1-30) */
824
+ days?: number;
825
+ /** role(s) to include */
826
+ include_roles?: string;
827
+ }
828
+ /**
829
+ * JSON Params
830
+ * @see https://docs.discord.com/developers/resources/guild#begin-guild-prune-json-params
831
+ */
832
+ export interface BeginGuildPruneJSONParams {
833
+ /** number of days to prune (1-30) */
834
+ days?: number;
835
+ /** whether `pruned` is returned, discouraged for large guilds */
836
+ compute_prune_count?: boolean;
837
+ /** role(s) to include */
838
+ include_roles?: Snowflake[];
839
+ /** reason for the prune (deprecated) */
840
+ reason?: string;
841
+ }
842
+ /**
843
+ * Query String Params
844
+ * @see https://docs.discord.com/developers/resources/guild#get-guild-widget-image-query-string-params
845
+ */
846
+ export interface GetGuildWidgetImageQuery {
847
+ /** style of the widget image returned (see below) */
848
+ style?: GuildWidgetStyle;
849
+ }
850
+ /**
851
+ * Widget Style Options
852
+ * @see https://docs.discord.com/developers/resources/guild#get-guild-widget-image-widget-style-options
853
+ */
854
+ export declare const GuildWidgetStyle: {
855
+ readonly Shield: 'shield';
856
+ readonly Banner1: 'banner1';
857
+ readonly Banner2: 'banner2';
858
+ readonly Banner3: 'banner3';
859
+ readonly Banner4: 'banner4';
860
+ };
861
+ export type GuildWidgetStyle = (typeof GuildWidgetStyle)[keyof typeof GuildWidgetStyle];
862
+ /**
863
+ * JSON Params
864
+ * @see https://docs.discord.com/developers/resources/guild#modify-guild-welcome-screen-json-params
865
+ */
866
+ export interface ModifyGuildWelcomeScreenJSONParams {
867
+ /** whether the welcome screen is enabled */
868
+ enabled?: boolean;
869
+ /** channels linked in the welcome screen and their display options */
870
+ welcome_channels?: RawWelcomeScreenChannel[];
871
+ /** the server description to show in the welcome screen */
872
+ description?: string;
873
+ }
874
+ /**
875
+ * JSON Params
876
+ * @see https://docs.discord.com/developers/resources/guild#modify-guild-onboarding-json-params
877
+ */
878
+ export interface ModifyGuildOnboardingJSONParams {
879
+ /** Prompts shown during onboarding and in customize community */
880
+ prompts?: RawOnboardingPrompt[];
881
+ /** Channel IDs that members get opted into automatically */
882
+ default_channel_ids?: Snowflake[];
883
+ /** Whether onboarding is enabled in the guild */
884
+ enabled?: boolean;
885
+ /** Current mode of onboarding */
886
+ mode?: OnboardingMode;
887
+ }
888
+ /**
889
+ * JSON Params
890
+ * @see https://docs.discord.com/developers/resources/guild#modify-guild-incident-actions-json-params
891
+ */
892
+ export interface ModifyGuildIncidentActionsJSONParams {
893
+ /** when invites will be enabled again */
894
+ invites_disabled_until?: ISO8601Timestamp | null;
895
+ /** when direct messages will be enabled again */
896
+ dms_disabled_until?: ISO8601Timestamp | null;
897
+ }
898
+ /**
899
+ * Guild Features
900
+ * @see https://docs.discord.com/developers/resources/guild#guild-object-guild-features
901
+ */
902
+ export type GuildFeature = 'ANIMATED_BANNER' | 'ANIMATED_ICON' | 'APPLICATION_COMMAND_PERMISSIONS_V2' | 'AUTO_MODERATION' | 'BANNER' | 'COMMUNITY' | 'CREATOR_MONETIZABLE_PROVISIONAL' | 'CREATOR_STORE_PAGE' | 'DEVELOPER_SUPPORT_SERVER' | 'DISCOVERABLE' | 'ENHANCED_ROLE_COLORS' | 'FEATURABLE' | 'GUILD_TAGS' | 'GUESTS_ENABLED' | 'INVITES_DISABLED' | 'INVITE_SPLASH' | 'MEMBER_VERIFICATION_GATE_ENABLED' | 'MORE_SOUNDBOARD' | 'MORE_STICKERS' | 'NEWS' | 'PARTNERED' | 'PREVIEW_ENABLED' | 'PRUNE_REQUIRES_ADMIN' | 'RAID_ALERTS_DISABLED' | 'ROLE_ICONS' | 'ROLE_SUBSCRIPTIONS_AVAILABLE_FOR_PURCHASE' | 'ROLE_SUBSCRIPTIONS_ENABLED' | 'SOUNDBOARD' | 'TICKETED_EVENTS_ENABLED' | 'VANITY_URL' | 'VERIFIED' | 'VIP_REGIONS' | 'WELCOME_SCREEN_ENABLED' | (string & {});
903
+ /**
904
+ * Unavailable Guild Object: a guild that is offline, or not sent yet.
905
+ * @see https://docs.discord.com/developers/resources/guild#unavailable-guild-object
906
+ */
907
+ export interface RawUnavailableGuild {
908
+ id: Snowflake;
909
+ unavailable?: boolean;
910
+ }