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,348 @@
1
+ import type { CacheStore } from '../cache/store.js';
2
+ import { type ImageOptions } from '../discord/cdn.js';
3
+ import { Permissions } from '../discord/permissions.js';
4
+ import type { GetGuildAuditLogQuery, RawAuditLog, RawAuditLogEntry } from '../discord/types/audit-log.js';
5
+ import type { RawAutoModerationRule } from '../discord/types/auto-moderation.js';
6
+ import type { Locale, Snowflake } from '../discord/types/common.js';
7
+ import type { RawGuildCreateExtra } from '../discord/types/gateway-events.js';
8
+ import type { CreateGuildScheduledEventJSONParams, RawGuildScheduledEvent } from '../discord/types/guild-scheduled-event.js';
9
+ import type { CreateGuildChannelJSONParams, CreateGuildRoleJSONParams, GuildFeature, ModifyGuildJSONParams, PremiumTier, RawGuild, VerificationLevel } from '../discord/types/guild.js';
10
+ import type { RawSticker } from '../discord/types/sticker.js';
11
+ import type { RawVoiceState } from '../discord/types/voice.js';
12
+ import { type Camelize } from '../util/case.js';
13
+ import { IdStructure } from './base.js';
14
+ import type { GuildChannel, ThreadChannel, VoiceChannel } from './channel.js';
15
+ import type { Context } from './context.js';
16
+ import type { GuildEmoji } from './emoji.js';
17
+ import type { Invite } from './invite.js';
18
+ import { type BanOptions, type GuildMember } from './member.js';
19
+ import type { Role } from './role.js';
20
+ import type { User } from './user.js';
21
+ import type { Webhook } from './webhook.js';
22
+ import type { VoiceConnection } from '../voice/connection.js';
23
+ /** What a server stores itself; its roles, emojis... live in its stores. */
24
+ export type GuildData = Omit<RawGuild, 'roles' | 'emojis' | 'stickers'> & Partial<Pick<RawGuildCreateExtra, 'joined_at' | 'large' | 'member_count'>> & {
25
+ unavailable?: boolean;
26
+ };
27
+ /** What belongs to a server: forgotten with it. */
28
+ export interface GuildStores {
29
+ roles: CacheStore<Snowflake, Role>;
30
+ members: CacheStore<Snowflake, GuildMember>;
31
+ channels: CacheStore<Snowflake, GuildChannel | ThreadChannel>;
32
+ emojis: CacheStore<Snowflake, GuildEmoji>;
33
+ /**
34
+ * Who is in a voice channel, by user id: what the voice events compare
35
+ * with. Only filled when Discord sends voice states, which is when a
36
+ * file listens to them.
37
+ */
38
+ voiceStates: CacheStore<Snowflake, VoiceEntry>;
39
+ }
40
+ /** What the voice state of one person holds, without its member. */
41
+ export type VoiceStateData = Omit<RawVoiceState, 'member' | 'guild_id'>;
42
+ /** Someone in a voice channel: their state, and the channel they are in. */
43
+ export interface VoiceEntry {
44
+ state: VoiceStateData;
45
+ /** Kept with the state, so a channel deleted meanwhile is still known. */
46
+ channel: VoiceChannel;
47
+ }
48
+ /**
49
+ * Where someone is in voice, and how: muted, deafened, streaming...
50
+ * @see https://docs.discord.com/developers/resources/voice#voice-state-object
51
+ */
52
+ export type VoiceState = Camelize<VoiceStateData>;
53
+ /** Only the framework writes to the stores of a server. */
54
+ export declare let storesOf: (guild: Guild) => GuildStores;
55
+ /**
56
+ * What `edit()` takes on a server: only what is passed changes. Images are
57
+ * data URIs (`data:image/png;base64,...`).
58
+ * @see https://docs.discord.com/developers/resources/guild#modify-guild-json-params
59
+ */
60
+ export type GuildEditOptions = Camelize<ModifyGuildJSONParams>;
61
+ /**
62
+ * What `createChannel()` takes: a name, a type, and the settings of that
63
+ * kind of channel.
64
+ * @see https://docs.discord.com/developers/resources/guild#create-guild-channel-json-params
65
+ */
66
+ export type ChannelCreateOptions = Camelize<CreateGuildChannelJSONParams>;
67
+ /**
68
+ * What `createRole()` takes. Permissions are given by name, as a list of
69
+ * names or as a `Permissions` set.
70
+ * @see https://docs.discord.com/developers/resources/guild#create-guild-role-json-params
71
+ */
72
+ export type RoleCreateOptions = Camelize<Omit<CreateGuildRoleJSONParams, 'permissions'>> & {
73
+ permissions?: Permissions | ConstructorParameters<typeof Permissions>[0];
74
+ };
75
+ /** A ban of a server. */
76
+ export interface Ban {
77
+ /** Who is banned. */
78
+ user: User;
79
+ /** Why, when a reason was given. */
80
+ reason: string | null;
81
+ }
82
+ /**
83
+ * What moderators and bots did in a server: its entries, newest first, and
84
+ * what they refer to.
85
+ * @see https://docs.discord.com/developers/resources/audit-log#audit-log-object-audit-log-structure
86
+ */
87
+ export type AuditLog = Camelize<RawAuditLog>;
88
+ /**
89
+ * One thing a moderator or a bot did in a server: what, by whom, on what,
90
+ * and what changed.
91
+ * @see https://docs.discord.com/developers/resources/audit-log#audit-log-entry-object-audit-log-entry-structure
92
+ */
93
+ export type AuditLogEntry = Camelize<RawAuditLogEntry>;
94
+ /**
95
+ * An event scheduled in a server: when it happens, where, and how often.
96
+ * @see https://docs.discord.com/developers/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-structure
97
+ */
98
+ export type ScheduledEvent = Camelize<RawGuildScheduledEvent>;
99
+ /**
100
+ * A rule Discord applies by itself to the messages of a server: what
101
+ * triggers it, and what it does then.
102
+ * @see https://docs.discord.com/developers/resources/auto-moderation#auto-moderation-rule-object-auto-moderation-rule-structure
103
+ */
104
+ export type AutoModerationRule = Camelize<RawAutoModerationRule>;
105
+ /**
106
+ * A sticker: one of a server, or a standard one from a pack.
107
+ * @see https://docs.discord.com/developers/resources/sticker#sticker-object-sticker-structure
108
+ */
109
+ export type Sticker = Camelize<RawSticker>;
110
+ /**
111
+ * A server ("guild" is the name Discord gives servers in its API).
112
+ * @see https://docs.discord.com/developers/resources/guild#guild-object
113
+ */
114
+ export declare class Guild extends IdStructure<GuildData> {
115
+ #private;
116
+ constructor(ctx: Context, data: GuildData);
117
+ /** The name of the server. */
118
+ get name(): string;
119
+ /** The description of the server, when it has one. */
120
+ get description(): string | null;
121
+ /** The id of the user who owns the server. */
122
+ get ownerId(): Snowflake;
123
+ /** `false` during an outage of Discord: the data may be out of date. */
124
+ get available(): boolean;
125
+ /**
126
+ * How many members the server has. Exact when the bot receives member
127
+ * events, approximate otherwise; `null` when Discord never said it.
128
+ */
129
+ get memberCount(): number | null;
130
+ /**
131
+ * What the server has enabled or unlocked (`COMMUNITY`, `VANITY_URL`...).
132
+ * @see https://docs.discord.com/developers/resources/guild#guild-object-guild-features
133
+ */
134
+ get features(): readonly GuildFeature[];
135
+ /** What Discord asks of new members before they can write. */
136
+ get verificationLevel(): VerificationLevel;
137
+ /** The boost level of the server. */
138
+ get premiumTier(): PremiumTier;
139
+ /** How many boosts the server has. */
140
+ get boostCount(): number;
141
+ /** The language of the server, used for what Discord sends to it. */
142
+ get preferredLocale(): Locale;
143
+ /** The code of the custom invite link of the server, when it has one. */
144
+ get vanityUrlCode(): string | null;
145
+ /** The id of the channel where Discord posts welcome messages. */
146
+ get systemChannelId(): Snowflake | null;
147
+ /** The id of the channel that shows the rules, in a community server. */
148
+ get rulesChannelId(): Snowflake | null;
149
+ /** The id of the voice channel inactive members are moved to. */
150
+ get afkChannelId(): Snowflake | null;
151
+ /** When the bot joined the server, when Discord said it. */
152
+ get joinedAt(): Date | null;
153
+ /** The roles of the server, @everyone included. */
154
+ get roles(): ReadonlyMap<Snowflake, Role>;
155
+ /**
156
+ * The members of the server the bot knows: the ones seen the most
157
+ * recently, not all of them.
158
+ */
159
+ get members(): ReadonlyMap<Snowflake, GuildMember>;
160
+ /** The channels and active threads of the server. */
161
+ get channels(): ReadonlyMap<Snowflake, GuildChannel | ThreadChannel>;
162
+ /** The custom emojis of the server. */
163
+ get emojis(): ReadonlyMap<Snowflake, GuildEmoji>;
164
+ /**
165
+ * The bot in voice in this server, to play or leave; `null` when it is
166
+ * in no voice channel here.
167
+ */
168
+ get voice(): VoiceConnection | null;
169
+ /** The @everyone role, which every member has. */
170
+ get everyoneRole(): Role;
171
+ /** The bot as a member of this server. */
172
+ get me(): GuildMember;
173
+ /** The URL of the icon of the server, when it has one. */
174
+ iconURL(options?: ImageOptions): string | null;
175
+ /** The URL of the banner of the server, when it has one. */
176
+ bannerURL(options?: ImageOptions): string | null;
177
+ /** The URL of the invite background of the server, when it has one. */
178
+ splashURL(options?: ImageOptions): string | null;
179
+ /**
180
+ * Asks Discord for the latest data of the server.
181
+ * @see https://docs.discord.com/developers/resources/guild#get-guild
182
+ */
183
+ fetch(): Promise<Guild>;
184
+ /**
185
+ * Changes the settings of the server.
186
+ * @see https://docs.discord.com/developers/resources/guild#modify-guild
187
+ */
188
+ edit(options: GuildEditOptions, reason?: string): Promise<Guild>;
189
+ /**
190
+ * Makes the bot leave the server.
191
+ * @see https://docs.discord.com/developers/resources/user#leave-guild
192
+ */
193
+ leave(): Promise<void>;
194
+ /**
195
+ * A member of the server: from what the bot remembers, or else from Discord.
196
+ * @see https://docs.discord.com/developers/resources/guild#get-guild-member
197
+ */
198
+ fetchMember(user: Snowflake | {
199
+ id: Snowflake;
200
+ }, { force }?: {
201
+ force?: boolean;
202
+ }): Promise<GuildMember>;
203
+ /**
204
+ * Members of the server, by pages of 1000 at most, ordered by id. Needs
205
+ * the Server Members intent to be enabled for the bot.
206
+ * @see https://docs.discord.com/developers/resources/guild#list-guild-members
207
+ */
208
+ fetchMembers(options?: {
209
+ limit?: number;
210
+ after?: Snowflake | {
211
+ id: Snowflake;
212
+ };
213
+ }): Promise<GuildMember[]>;
214
+ /**
215
+ * Members whose username or nickname starts with the given text.
216
+ * @see https://docs.discord.com/developers/resources/guild#search-guild-members
217
+ */
218
+ searchMembers(query: string, limit?: number): Promise<GuildMember[]>;
219
+ /** The member who owns the server. */
220
+ fetchOwner(): Promise<GuildMember>;
221
+ /**
222
+ * Removes a member from the server; they can come back with an invite.
223
+ * @see https://docs.discord.com/developers/resources/guild#remove-guild-member
224
+ */
225
+ kick(user: Snowflake | {
226
+ id: Snowflake;
227
+ }, reason?: string): Promise<void>;
228
+ /**
229
+ * Bans a user from the server, member or not.
230
+ * @see https://docs.discord.com/developers/resources/guild#create-guild-ban
231
+ */
232
+ ban(user: Snowflake | {
233
+ id: Snowflake;
234
+ }, options?: BanOptions): Promise<void>;
235
+ /**
236
+ * Bans up to 200 users at once.
237
+ * @returns the ids of the users that were banned, and of those that could not be
238
+ * @see https://docs.discord.com/developers/resources/guild#bulk-guild-ban
239
+ */
240
+ bulkBan(users: readonly (Snowflake | {
241
+ id: Snowflake;
242
+ })[], options?: BanOptions): Promise<{
243
+ bannedUsers: Snowflake[];
244
+ failedUsers: Snowflake[];
245
+ }>;
246
+ /**
247
+ * Lifts the ban of a user.
248
+ * @see https://docs.discord.com/developers/resources/guild#remove-guild-ban
249
+ */
250
+ unban(user: Snowflake | {
251
+ id: Snowflake;
252
+ }, reason?: string): Promise<void>;
253
+ /**
254
+ * The ban of a user; `null` when they are not banned.
255
+ * @see https://docs.discord.com/developers/resources/guild#get-guild-ban
256
+ */
257
+ fetchBan(user: Snowflake | {
258
+ id: Snowflake;
259
+ }): Promise<Ban | null>;
260
+ /**
261
+ * The bans of the server, by pages of 1000 at most.
262
+ * @see https://docs.discord.com/developers/resources/guild#get-guild-bans
263
+ */
264
+ fetchBans(options?: {
265
+ limit?: number;
266
+ before?: Snowflake;
267
+ after?: Snowflake;
268
+ }): Promise<Ban[]>;
269
+ /**
270
+ * Asks Discord for the roles of the server.
271
+ * @see https://docs.discord.com/developers/resources/guild#get-guild-roles
272
+ */
273
+ fetchRoles(): Promise<Role[]>;
274
+ /**
275
+ * Creates a role.
276
+ * @see https://docs.discord.com/developers/resources/guild#create-guild-role
277
+ */
278
+ createRole(options?: RoleCreateOptions, reason?: string): Promise<Role>;
279
+ /**
280
+ * The channels of the server (threads are not included).
281
+ * @see https://docs.discord.com/developers/resources/guild#get-guild-channels
282
+ */
283
+ fetchChannels(): Promise<GuildChannel[]>;
284
+ /**
285
+ * Creates a channel.
286
+ * @see https://docs.discord.com/developers/resources/guild#create-guild-channel
287
+ */
288
+ createChannel(options: ChannelCreateOptions, reason?: string): Promise<GuildChannel>;
289
+ /**
290
+ * The threads of the server that are not archived.
291
+ * @see https://docs.discord.com/developers/resources/guild#list-active-guild-threads
292
+ */
293
+ fetchActiveThreads(): Promise<ThreadChannel[]>;
294
+ /**
295
+ * Asks Discord for the custom emojis of the server.
296
+ * @see https://docs.discord.com/developers/resources/emoji#list-guild-emojis
297
+ */
298
+ fetchEmojis(): Promise<GuildEmoji[]>;
299
+ /**
300
+ * Adds a custom emoji to the server.
301
+ * @param options.image the image as a data URI (`data:image/png;base64,...`)
302
+ * @see https://docs.discord.com/developers/resources/emoji#create-guild-emoji
303
+ */
304
+ createEmoji(options: {
305
+ name: string;
306
+ image: string;
307
+ roles?: (Snowflake | {
308
+ id: Snowflake;
309
+ })[];
310
+ }, reason?: string): Promise<GuildEmoji>;
311
+ /**
312
+ * The invites of the server, with how many times each was used.
313
+ * @see https://docs.discord.com/developers/resources/guild#get-guild-invites
314
+ */
315
+ fetchInvites(): Promise<Invite[]>;
316
+ /**
317
+ * The webhooks of every channel of the server.
318
+ * @see https://docs.discord.com/developers/resources/webhook#get-guild-webhooks
319
+ */
320
+ fetchWebhooks(): Promise<Webhook[]>;
321
+ /**
322
+ * What moderators and bots did in the server.
323
+ * @see https://docs.discord.com/developers/resources/audit-log#get-guild-audit-log
324
+ */
325
+ fetchAuditLog(options?: Camelize<GetGuildAuditLogQuery>): Promise<AuditLog>;
326
+ /**
327
+ * The scheduled events of the server.
328
+ * @see https://docs.discord.com/developers/resources/guild-scheduled-event#list-scheduled-events-for-guild
329
+ */
330
+ fetchScheduledEvents(): Promise<ScheduledEvent[]>;
331
+ /**
332
+ * Schedules an event in the server.
333
+ * @see https://docs.discord.com/developers/resources/guild-scheduled-event#create-guild-scheduled-event
334
+ */
335
+ createScheduledEvent(options: Camelize<CreateGuildScheduledEventJSONParams>, reason?: string): Promise<ScheduledEvent>;
336
+ /**
337
+ * The auto moderation rules of the server.
338
+ * @see https://docs.discord.com/developers/resources/auto-moderation#list-auto-moderation-rules-for-guild
339
+ */
340
+ fetchAutoModerationRules(): Promise<AutoModerationRule[]>;
341
+ /**
342
+ * The custom stickers of the server.
343
+ * @see https://docs.discord.com/developers/resources/sticker#list-guild-stickers
344
+ */
345
+ fetchStickers(): Promise<Sticker[]>;
346
+ /** The name of the server. */
347
+ toString(): string;
348
+ }