seyfert 1.5.0 → 2.0.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 (427) hide show
  1. package/LICENSE +21 -190
  2. package/README.md +18 -10
  3. package/lib/api/Router.js +2 -2
  4. package/lib/api/Routes/applications.d.ts +23 -1
  5. package/lib/api/Routes/channels.d.ts +1 -1
  6. package/lib/api/Routes/gateway.d.ts +1 -1
  7. package/lib/api/Routes/guilds.d.ts +5 -2
  8. package/lib/api/Routes/interactions.d.ts +1 -1
  9. package/lib/api/Routes/invites.d.ts +1 -1
  10. package/lib/api/Routes/stage-instances.d.ts +1 -1
  11. package/lib/api/Routes/stickers.d.ts +2 -2
  12. package/lib/api/Routes/users.d.ts +1 -1
  13. package/lib/api/Routes/voice.d.ts +1 -1
  14. package/lib/api/Routes/webhooks.d.ts +2 -2
  15. package/lib/api/api.d.ts +2 -2
  16. package/lib/api/api.js +2 -14
  17. package/lib/api/bucket.d.ts +0 -1
  18. package/lib/api/shared.d.ts +0 -1
  19. package/lib/api/utils/constants.d.ts +2 -5
  20. package/lib/api/utils/constants.js +3 -7
  21. package/lib/api/utils/utils.d.ts +1 -2
  22. package/lib/api/utils/utils.js +2 -3
  23. package/lib/builders/ActionRow.d.ts +1 -1
  24. package/lib/builders/ActionRow.js +3 -3
  25. package/lib/builders/Attachment.d.ts +2 -3
  26. package/lib/builders/Attachment.js +12 -13
  27. package/lib/builders/Base.d.ts +2 -2
  28. package/lib/builders/Base.js +1 -1
  29. package/lib/builders/Button.d.ts +7 -7
  30. package/lib/builders/Button.js +11 -9
  31. package/lib/builders/Embed.d.ts +1 -1
  32. package/lib/builders/Modal.d.ts +1 -1
  33. package/lib/builders/Modal.js +2 -2
  34. package/lib/builders/Poll.d.ts +2 -2
  35. package/lib/builders/Poll.js +5 -6
  36. package/lib/builders/SelectMenu.d.ts +1 -1
  37. package/lib/builders/SelectMenu.js +17 -18
  38. package/lib/builders/index.d.ts +1 -1
  39. package/lib/builders/index.js +10 -11
  40. package/lib/cache/adapters/default.d.ts +16 -9
  41. package/lib/cache/adapters/default.js +42 -31
  42. package/lib/cache/adapters/index.d.ts +0 -1
  43. package/lib/cache/adapters/index.js +0 -1
  44. package/lib/cache/adapters/limited.d.ts +17 -12
  45. package/lib/cache/adapters/limited.js +80 -36
  46. package/lib/cache/adapters/types.d.ts +6 -7
  47. package/lib/cache/adapters/workeradapter.d.ts +6 -6
  48. package/lib/cache/adapters/workeradapter.js +13 -0
  49. package/lib/cache/index.d.ts +18 -9
  50. package/lib/cache/index.js +319 -21
  51. package/lib/cache/resources/bans.d.ts +9 -6
  52. package/lib/cache/resources/bans.js +13 -4
  53. package/lib/cache/resources/channels.d.ts +6 -4
  54. package/lib/cache/resources/channels.js +13 -7
  55. package/lib/cache/resources/default/base.d.ts +7 -7
  56. package/lib/cache/resources/default/base.js +2 -2
  57. package/lib/cache/resources/default/guild-based.d.ts +6 -6
  58. package/lib/cache/resources/default/guild-based.js +6 -6
  59. package/lib/cache/resources/default/guild-related.d.ts +7 -7
  60. package/lib/cache/resources/default/guild-related.js +10 -8
  61. package/lib/cache/resources/emojis.d.ts +15 -6
  62. package/lib/cache/resources/emojis.js +13 -4
  63. package/lib/cache/resources/guilds.d.ts +9 -6
  64. package/lib/cache/resources/guilds.js +27 -6
  65. package/lib/cache/resources/members.d.ts +9 -6
  66. package/lib/cache/resources/members.js +22 -6
  67. package/lib/cache/resources/messages.d.ts +11 -7
  68. package/lib/cache/resources/messages.js +19 -7
  69. package/lib/cache/resources/overwrites.d.ts +11 -2
  70. package/lib/cache/resources/overwrites.js +9 -0
  71. package/lib/cache/resources/presence.d.ts +3 -2
  72. package/lib/cache/resources/roles.d.ts +9 -6
  73. package/lib/cache/resources/roles.js +13 -4
  74. package/lib/cache/resources/stage-instances.d.ts +2 -2
  75. package/lib/cache/resources/stickers.d.ts +9 -6
  76. package/lib/cache/resources/stickers.js +13 -4
  77. package/lib/cache/resources/threads.d.ts +9 -6
  78. package/lib/cache/resources/threads.js +13 -4
  79. package/lib/cache/resources/users.d.ts +9 -6
  80. package/lib/cache/resources/users.js +13 -4
  81. package/lib/cache/resources/voice-states.d.ts +11 -8
  82. package/lib/cache/resources/voice-states.js +15 -4
  83. package/lib/client/base.d.ts +28 -20
  84. package/lib/client/base.js +58 -56
  85. package/lib/client/client.d.ts +7 -16
  86. package/lib/client/client.js +29 -31
  87. package/lib/client/collectors.d.ts +10 -10
  88. package/lib/client/collectors.js +26 -1
  89. package/lib/client/httpclient.d.ts +8 -13
  90. package/lib/client/httpclient.js +27 -218
  91. package/lib/client/index.d.ts +1 -0
  92. package/lib/client/index.js +1 -0
  93. package/lib/client/transformers.d.ts +68 -0
  94. package/lib/client/transformers.js +99 -0
  95. package/lib/client/types.d.ts +5 -0
  96. package/lib/client/types.js +2 -0
  97. package/lib/client/workerclient.d.ts +14 -14
  98. package/lib/client/workerclient.js +112 -66
  99. package/lib/commands/applications/chat.d.ts +35 -34
  100. package/lib/commands/applications/chat.js +5 -9
  101. package/lib/commands/applications/chatcontext.d.ts +17 -17
  102. package/lib/commands/applications/chatcontext.js +5 -5
  103. package/lib/commands/applications/menu.d.ts +2 -3
  104. package/lib/commands/applications/menu.js +2 -5
  105. package/lib/commands/applications/menucontext.d.ts +14 -13
  106. package/lib/commands/applications/menucontext.js +9 -9
  107. package/lib/commands/applications/options.d.ts +1 -1
  108. package/lib/commands/applications/options.js +20 -21
  109. package/lib/commands/applications/shared.d.ts +3 -1
  110. package/lib/commands/decorators.d.ts +38 -20
  111. package/lib/commands/decorators.js +17 -18
  112. package/lib/commands/handle.d.ts +64 -0
  113. package/lib/commands/handle.js +685 -0
  114. package/lib/commands/handler.d.ts +27 -18
  115. package/lib/commands/handler.js +290 -164
  116. package/lib/commands/optionresolver.d.ts +13 -13
  117. package/lib/commands/optionresolver.js +23 -28
  118. package/lib/common/bot/watcher.d.ts +4 -33
  119. package/lib/common/bot/watcher.js +0 -109
  120. package/lib/common/index.d.ts +1 -0
  121. package/lib/common/index.js +1 -0
  122. package/lib/common/it/colors.js +48 -49
  123. package/lib/common/it/formatter.d.ts +32 -0
  124. package/lib/common/it/formatter.js +42 -0
  125. package/lib/common/it/logger.d.ts +0 -1
  126. package/lib/common/it/logger.js +3 -3
  127. package/lib/common/it/utils.d.ts +15 -2
  128. package/lib/common/it/utils.js +78 -17
  129. package/lib/common/shorters/application.d.ts +56 -0
  130. package/lib/common/shorters/application.js +81 -0
  131. package/lib/common/shorters/bans.d.ts +4 -5
  132. package/lib/common/shorters/bans.js +3 -3
  133. package/lib/common/shorters/channels.d.ts +7 -6
  134. package/lib/common/shorters/channels.js +19 -15
  135. package/lib/common/shorters/emojis.d.ts +5 -6
  136. package/lib/common/shorters/emojis.js +5 -5
  137. package/lib/common/shorters/guilds.d.ts +18 -16
  138. package/lib/common/shorters/guilds.js +31 -26
  139. package/lib/common/shorters/interaction.d.ts +6 -6
  140. package/lib/common/shorters/interaction.js +3 -2
  141. package/lib/common/shorters/members.d.ts +29 -12
  142. package/lib/common/shorters/members.js +55 -16
  143. package/lib/common/shorters/messages.d.ts +7 -8
  144. package/lib/common/shorters/messages.js +8 -7
  145. package/lib/common/shorters/reactions.d.ts +3 -3
  146. package/lib/common/shorters/reactions.js +11 -11
  147. package/lib/common/shorters/roles.d.ts +9 -7
  148. package/lib/common/shorters/roles.js +26 -7
  149. package/lib/common/shorters/templates.d.ts +7 -8
  150. package/lib/common/shorters/templates.js +7 -7
  151. package/lib/common/shorters/threads.d.ts +6 -7
  152. package/lib/common/shorters/threads.js +6 -9
  153. package/lib/common/shorters/users.d.ts +4 -4
  154. package/lib/common/shorters/users.js +8 -4
  155. package/lib/common/shorters/webhook.d.ts +10 -10
  156. package/lib/common/shorters/webhook.js +10 -9
  157. package/lib/common/types/resolvables.d.ts +2 -2
  158. package/lib/common/types/util.d.ts +3 -1
  159. package/lib/common/types/write.d.ts +1 -1
  160. package/lib/components/ActionRow.d.ts +1 -1
  161. package/lib/components/BaseComponent.d.ts +1 -1
  162. package/lib/components/BaseComponent.js +1 -1
  163. package/lib/components/BaseSelectMenuComponent.d.ts +1 -1
  164. package/lib/components/ButtonComponent.d.ts +17 -7
  165. package/lib/components/ButtonComponent.js +19 -2
  166. package/lib/components/ChannelSelectMenuComponent.d.ts +3 -3
  167. package/lib/components/MentionableSelectMenuComponent.d.ts +2 -2
  168. package/lib/components/RoleSelectMenuComponent.d.ts +2 -2
  169. package/lib/components/StringSelectMenuComponent.d.ts +2 -2
  170. package/lib/components/TextInputComponent.d.ts +2 -2
  171. package/lib/components/UserSelectMenuComponent.d.ts +2 -2
  172. package/lib/components/componentcommand.js +2 -2
  173. package/lib/components/componentcontext.d.ts +10 -9
  174. package/lib/components/componentcontext.js +8 -8
  175. package/lib/components/handler.d.ts +15 -14
  176. package/lib/components/handler.js +89 -93
  177. package/lib/components/index.d.ts +3 -3
  178. package/lib/components/index.js +12 -10
  179. package/lib/components/modalcontext.d.ts +12 -11
  180. package/lib/components/modalcontext.js +2 -2
  181. package/lib/deps/mixer.d.ts +8 -0
  182. package/lib/deps/mixer.js +66 -0
  183. package/lib/events/handler.d.ts +35 -13
  184. package/lib/events/handler.js +58 -25
  185. package/lib/events/hooks/application_command.d.ts +2 -2
  186. package/lib/events/hooks/auto_moderation.d.ts +6 -7
  187. package/lib/events/hooks/auto_moderation.js +4 -4
  188. package/lib/events/hooks/channel.d.ts +2 -2
  189. package/lib/events/hooks/channel.js +4 -7
  190. package/lib/events/hooks/custom.d.ts +3 -3
  191. package/lib/events/hooks/dispatch.d.ts +3 -4
  192. package/lib/events/hooks/dispatch.js +2 -2
  193. package/lib/events/hooks/entitlement.d.ts +5 -37
  194. package/lib/events/hooks/entitlement.js +7 -7
  195. package/lib/events/hooks/guild.d.ts +125 -125
  196. package/lib/events/hooks/guild.js +13 -15
  197. package/lib/events/hooks/integration.d.ts +27 -28
  198. package/lib/events/hooks/integration.js +3 -3
  199. package/lib/events/hooks/interactions.d.ts +2 -2
  200. package/lib/events/hooks/invite.d.ts +18 -17
  201. package/lib/events/hooks/message.d.ts +69 -54
  202. package/lib/events/hooks/message.js +4 -8
  203. package/lib/events/hooks/presence.d.ts +17 -16
  204. package/lib/events/hooks/stage.d.ts +4 -4
  205. package/lib/events/hooks/thread.d.ts +132 -63
  206. package/lib/events/hooks/thread.js +4 -4
  207. package/lib/events/hooks/typing.d.ts +28 -6
  208. package/lib/events/hooks/typing.js +2 -2
  209. package/lib/events/hooks/user.d.ts +3 -3
  210. package/lib/events/hooks/user.js +2 -2
  211. package/lib/events/hooks/voice.d.ts +28 -3
  212. package/lib/events/hooks/voice.js +8 -4
  213. package/lib/events/hooks/webhook.d.ts +1 -1
  214. package/lib/index.d.ts +5 -14
  215. package/lib/index.js +7 -12
  216. package/lib/langs/handler.d.ts +14 -10
  217. package/lib/langs/handler.js +40 -9
  218. package/lib/structures/AutoModerationRule.d.ts +4 -4
  219. package/lib/structures/AutoModerationRule.js +1 -2
  220. package/lib/structures/ClientUser.d.ts +1 -1
  221. package/lib/structures/Entitlement.d.ts +10 -0
  222. package/lib/structures/Entitlement.js +16 -0
  223. package/lib/structures/Guild.d.ts +33 -34
  224. package/lib/structures/Guild.js +5 -2
  225. package/lib/structures/GuildBan.d.ts +6 -6
  226. package/lib/structures/GuildBan.js +2 -1
  227. package/lib/structures/GuildEmoji.d.ts +4 -4
  228. package/lib/structures/GuildEmoji.js +3 -2
  229. package/lib/structures/GuildMember.d.ts +20 -17
  230. package/lib/structures/GuildMember.js +18 -8
  231. package/lib/structures/GuildPreview.d.ts +1 -1
  232. package/lib/structures/GuildRole.d.ts +5 -3
  233. package/lib/structures/GuildRole.js +8 -1
  234. package/lib/structures/GuildTemplate.d.ts +2 -2
  235. package/lib/structures/GuildTemplate.js +1 -1
  236. package/lib/structures/Interaction.d.ts +53 -36
  237. package/lib/structures/Interaction.js +127 -91
  238. package/lib/structures/Message.d.ts +29 -30
  239. package/lib/structures/Message.js +8 -9
  240. package/lib/structures/Poll.d.ts +4 -3
  241. package/lib/structures/Poll.js +6 -2
  242. package/lib/structures/Sticker.d.ts +7 -7
  243. package/lib/structures/Sticker.js +7 -7
  244. package/lib/structures/User.d.ts +5 -4
  245. package/lib/structures/User.js +2 -1
  246. package/lib/structures/VoiceState.d.ts +15 -11
  247. package/lib/structures/VoiceState.js +35 -17
  248. package/lib/structures/Webhook.d.ts +6 -7
  249. package/lib/structures/Webhook.js +6 -7
  250. package/lib/structures/channels.d.ts +11 -10
  251. package/lib/structures/channels.js +70 -65
  252. package/lib/structures/extra/BaseGuild.d.ts +1 -1
  253. package/lib/structures/extra/BaseGuild.js +3 -3
  254. package/lib/structures/extra/BitField.d.ts +1 -1
  255. package/lib/structures/extra/BitField.js +3 -2
  256. package/lib/structures/extra/DiscordBase.js +2 -2
  257. package/lib/structures/extra/Permissions.d.ts +3 -1
  258. package/lib/structures/extra/Permissions.js +8 -3
  259. package/lib/types/gateway.d.ts +1537 -0
  260. package/lib/types/gateway.js +4 -0
  261. package/lib/types/index.d.ts +9 -1
  262. package/lib/types/index.js +28 -1
  263. package/lib/types/payloads/_interactions/_applicationCommands/_chatInput/attachment.d.ts +5 -0
  264. package/lib/types/payloads/_interactions/_applicationCommands/_chatInput/attachment.js +2 -0
  265. package/lib/types/payloads/_interactions/_applicationCommands/_chatInput/base.d.ts +22 -0
  266. package/lib/types/payloads/_interactions/_applicationCommands/_chatInput/base.js +2 -0
  267. package/lib/types/payloads/_interactions/_applicationCommands/_chatInput/boolean.d.ts +4 -0
  268. package/lib/types/payloads/_interactions/_applicationCommands/_chatInput/boolean.js +2 -0
  269. package/lib/types/payloads/_interactions/_applicationCommands/_chatInput/channel.d.ts +7 -0
  270. package/lib/types/payloads/_interactions/_applicationCommands/_chatInput/channel.js +2 -0
  271. package/lib/types/payloads/_interactions/_applicationCommands/_chatInput/integer.d.ts +17 -0
  272. package/lib/types/payloads/_interactions/_applicationCommands/_chatInput/integer.js +2 -0
  273. package/lib/types/payloads/_interactions/_applicationCommands/_chatInput/mentionable.d.ts +5 -0
  274. package/lib/types/payloads/_interactions/_applicationCommands/_chatInput/mentionable.js +2 -0
  275. package/lib/types/payloads/_interactions/_applicationCommands/_chatInput/number.d.ts +17 -0
  276. package/lib/types/payloads/_interactions/_applicationCommands/_chatInput/number.js +2 -0
  277. package/lib/types/payloads/_interactions/_applicationCommands/_chatInput/role.d.ts +5 -0
  278. package/lib/types/payloads/_interactions/_applicationCommands/_chatInput/role.js +2 -0
  279. package/lib/types/payloads/_interactions/_applicationCommands/_chatInput/shared.d.ts +25 -0
  280. package/lib/types/payloads/_interactions/_applicationCommands/_chatInput/shared.js +20 -0
  281. package/lib/types/payloads/_interactions/_applicationCommands/_chatInput/string.d.ts +17 -0
  282. package/lib/types/payloads/_interactions/_applicationCommands/_chatInput/string.js +2 -0
  283. package/lib/types/payloads/_interactions/_applicationCommands/_chatInput/subcommand.d.ts +11 -0
  284. package/lib/types/payloads/_interactions/_applicationCommands/_chatInput/subcommand.js +2 -0
  285. package/lib/types/payloads/_interactions/_applicationCommands/_chatInput/subcommandGroup.d.ts +11 -0
  286. package/lib/types/payloads/_interactions/_applicationCommands/_chatInput/subcommandGroup.js +2 -0
  287. package/lib/types/payloads/_interactions/_applicationCommands/_chatInput/user.d.ts +5 -0
  288. package/lib/types/payloads/_interactions/_applicationCommands/_chatInput/user.js +2 -0
  289. package/lib/types/payloads/_interactions/_applicationCommands/chatInput.d.ts +60 -0
  290. package/lib/types/payloads/_interactions/_applicationCommands/chatInput.js +29 -0
  291. package/lib/types/payloads/_interactions/_applicationCommands/contextMenu.d.ts +65 -0
  292. package/lib/types/payloads/_interactions/_applicationCommands/contextMenu.js +2 -0
  293. package/lib/types/payloads/_interactions/_applicationCommands/internals.d.ts +8 -0
  294. package/lib/types/payloads/_interactions/_applicationCommands/internals.js +2 -0
  295. package/lib/types/payloads/_interactions/_applicationCommands/permissions.d.ts +54 -0
  296. package/lib/types/payloads/_interactions/_applicationCommands/permissions.js +20 -0
  297. package/lib/types/payloads/_interactions/applicationCommands.d.ts +153 -0
  298. package/lib/types/payloads/_interactions/applicationCommands.js +61 -0
  299. package/lib/types/payloads/_interactions/autocomplete.d.ts +10 -0
  300. package/lib/types/payloads/_interactions/autocomplete.js +2 -0
  301. package/lib/types/payloads/_interactions/base.d.ts +197 -0
  302. package/lib/types/payloads/_interactions/base.js +2 -0
  303. package/lib/types/payloads/_interactions/messageComponents.d.ts +41 -0
  304. package/lib/types/payloads/_interactions/messageComponents.js +2 -0
  305. package/lib/types/payloads/_interactions/modalSubmit.d.ts +35 -0
  306. package/lib/types/payloads/_interactions/modalSubmit.js +2 -0
  307. package/lib/types/payloads/_interactions/ping.d.ts +3 -0
  308. package/lib/types/payloads/_interactions/ping.js +2 -0
  309. package/lib/types/payloads/_interactions/responses.d.ts +112 -0
  310. package/lib/types/payloads/_interactions/responses.js +54 -0
  311. package/lib/types/payloads/application.d.ts +292 -0
  312. package/lib/types/payloads/application.js +117 -0
  313. package/lib/types/payloads/auditLog.d.ts +644 -0
  314. package/lib/types/payloads/auditLog.js +80 -0
  315. package/lib/types/payloads/autoModeration.d.ts +219 -0
  316. package/lib/types/payloads/autoModeration.js +87 -0
  317. package/lib/types/payloads/channel.d.ts +1708 -0
  318. package/lib/types/payloads/channel.js +372 -0
  319. package/lib/types/payloads/emoji.d.ts +48 -0
  320. package/lib/types/payloads/emoji.js +5 -0
  321. package/lib/types/payloads/gateway.d.ts +373 -0
  322. package/lib/types/payloads/gateway.js +82 -0
  323. package/lib/types/payloads/guild.d.ts +1060 -0
  324. package/lib/types/payloads/guild.js +324 -0
  325. package/lib/types/payloads/guildScheduledEvent.d.ts +138 -0
  326. package/lib/types/payloads/guildScheduledEvent.js +32 -0
  327. package/lib/types/payloads/index.d.ts +64 -0
  328. package/lib/types/payloads/index.js +37 -0
  329. package/lib/types/payloads/interactions.d.ts +24 -0
  330. package/lib/types/payloads/interactions.js +23 -0
  331. package/lib/types/payloads/invite.d.ts +121 -0
  332. package/lib/types/payloads/invite.js +23 -0
  333. package/lib/types/payloads/monetization.d.ts +150 -0
  334. package/lib/types/payloads/monetization.js +79 -0
  335. package/lib/types/payloads/oauth2.d.ts +131 -0
  336. package/lib/types/payloads/oauth2.js +135 -0
  337. package/lib/types/payloads/permissions.d.ts +97 -0
  338. package/lib/types/payloads/permissions.js +16 -0
  339. package/lib/types/payloads/poll.d.ts +104 -0
  340. package/lib/types/payloads/poll.js +16 -0
  341. package/lib/types/payloads/stageInstance.d.ts +77 -0
  342. package/lib/types/payloads/stageInstance.js +19 -0
  343. package/lib/types/payloads/sticker.d.ts +123 -0
  344. package/lib/types/payloads/sticker.js +30 -0
  345. package/lib/types/payloads/teams.d.ts +78 -0
  346. package/lib/types/payloads/teams.js +23 -0
  347. package/lib/types/payloads/template.d.ts +62 -0
  348. package/lib/types/payloads/template.js +5 -0
  349. package/lib/types/payloads/user.d.ts +337 -0
  350. package/lib/types/payloads/user.js +167 -0
  351. package/lib/types/payloads/voice.d.ts +89 -0
  352. package/lib/types/payloads/voice.js +5 -0
  353. package/lib/types/payloads/webhook.d.ts +76 -0
  354. package/lib/types/payloads/webhook.js +21 -0
  355. package/lib/types/rest/application.d.ts +57 -0
  356. package/lib/types/rest/application.js +2 -0
  357. package/lib/types/rest/auditLog.d.ts +30 -0
  358. package/lib/types/rest/auditLog.js +2 -0
  359. package/lib/types/rest/autoModeration.d.ts +66 -0
  360. package/lib/types/rest/autoModeration.js +2 -0
  361. package/lib/types/rest/channel.d.ts +712 -0
  362. package/lib/types/rest/channel.js +11 -0
  363. package/lib/types/rest/emoji.d.ts +54 -0
  364. package/lib/types/rest/emoji.js +2 -0
  365. package/lib/types/rest/gateway.d.ts +9 -0
  366. package/lib/types/rest/gateway.js +2 -0
  367. package/lib/types/rest/guild.d.ts +865 -0
  368. package/lib/types/rest/guild.js +2 -0
  369. package/lib/types/rest/guildScheduledEvent.d.ts +126 -0
  370. package/lib/types/rest/guildScheduledEvent.js +2 -0
  371. package/lib/types/rest/index.d.ts +296 -0
  372. package/lib/types/rest/index.js +292 -0
  373. package/lib/types/rest/interactions.d.ts +194 -0
  374. package/lib/types/rest/interactions.js +2 -0
  375. package/lib/types/rest/invite.d.ts +24 -0
  376. package/lib/types/rest/invite.js +2 -0
  377. package/lib/types/rest/monetization.d.ts +82 -0
  378. package/lib/types/rest/monetization.js +11 -0
  379. package/lib/types/rest/oauth2.d.ts +172 -0
  380. package/lib/types/rest/oauth2.js +2 -0
  381. package/lib/types/rest/poll.d.ts +44 -0
  382. package/lib/types/rest/poll.js +2 -0
  383. package/lib/types/rest/stageInstance.d.ts +58 -0
  384. package/lib/types/rest/stageInstance.js +2 -0
  385. package/lib/types/rest/sticker.d.ts +77 -0
  386. package/lib/types/rest/sticker.js +2 -0
  387. package/lib/types/rest/template.d.ts +62 -0
  388. package/lib/types/rest/template.js +2 -0
  389. package/lib/types/rest/user.d.ts +120 -0
  390. package/lib/types/rest/user.js +2 -0
  391. package/lib/types/rest/voice.d.ts +17 -0
  392. package/lib/types/rest/voice.js +2 -0
  393. package/lib/types/rest/webhook.d.ts +250 -0
  394. package/lib/types/rest/webhook.js +2 -0
  395. package/lib/types/utils/index.d.ts +797 -0
  396. package/lib/types/utils/index.js +799 -0
  397. package/lib/websocket/SharedTypes.d.ts +4 -3
  398. package/lib/websocket/SharedTypes.js +1 -1
  399. package/lib/websocket/constants/index.d.ts +0 -1
  400. package/lib/websocket/discord/basesocket.d.ts +7 -7
  401. package/lib/websocket/discord/basesocket.js +34 -22
  402. package/lib/websocket/discord/events/memberUpdate.d.ts +1 -6
  403. package/lib/websocket/discord/events/memberUpdate.js +2 -1
  404. package/lib/websocket/discord/events/presenceUpdate.d.ts +5 -18
  405. package/lib/websocket/discord/events/presenceUpdate.js +5 -6
  406. package/lib/websocket/discord/shard.d.ts +8 -8
  407. package/lib/websocket/discord/shard.js +59 -47
  408. package/lib/websocket/discord/sharder.d.ts +6 -5
  409. package/lib/websocket/discord/sharder.js +11 -10
  410. package/lib/websocket/discord/shared.d.ts +13 -5
  411. package/lib/websocket/discord/socket/custom.d.ts +52 -0
  412. package/lib/websocket/discord/socket/custom.js +283 -0
  413. package/lib/websocket/discord/worker.d.ts +5 -10
  414. package/lib/websocket/discord/workermanager.d.ts +8 -15
  415. package/lib/websocket/discord/workermanager.js +35 -39
  416. package/lib/websocket/structures/index.d.ts +0 -1
  417. package/lib/websocket/structures/index.js +1 -1
  418. package/lib/websocket/structures/timeout.d.ts +0 -1
  419. package/package.json +65 -74
  420. package/lib/cache/adapters/redis.d.ts +0 -37
  421. package/lib/cache/adapters/redis.js +0 -218
  422. package/lib/client/oninteractioncreate.d.ts +0 -4
  423. package/lib/client/oninteractioncreate.js +0 -198
  424. package/lib/client/onmessagecreate.d.ts +0 -13
  425. package/lib/client/onmessagecreate.js +0 -410
  426. package/lib/structures/extra/functions.d.ts +0 -12
  427. package/lib/structures/extra/functions.js +0 -70
@@ -0,0 +1,1060 @@
1
+ /**
2
+ * Types extracted from https://discord.com/developers/docs/resources/guild
3
+ */
4
+ import type { Permissions, Snowflake, GuildMemberFlags } from '../index';
5
+ import type { APIEmoji, APIPartialEmoji } from './emoji';
6
+ import type { PresenceUpdateReceiveStatus } from './gateway';
7
+ import type { OAuth2Scopes } from './oauth2';
8
+ import type { APIRole } from './permissions';
9
+ import type { APISticker } from './sticker';
10
+ import type { APIAvatarDecorationData, APIUser } from './user';
11
+ /**
12
+ * https://discord.com/developers/docs/resources/guild#unavailable-guild-object
13
+ */
14
+ export interface APIUnavailableGuild {
15
+ /**
16
+ * Guild id
17
+ */
18
+ id: Snowflake;
19
+ /**
20
+ * `true` if this guild is unavailable due to an outage
21
+ */
22
+ unavailable: boolean;
23
+ }
24
+ /**
25
+ * https://discord.com/developers/docs/resources/guild#guild-object-guild-structure
26
+ */
27
+ export interface APIPartialGuild extends Omit<APIUnavailableGuild, 'unavailable'>, Pick<APIGuild, 'welcome_screen'> {
28
+ /**
29
+ * Guild name (2-100 characters, excluding trailing and leading whitespace)
30
+ */
31
+ name: string;
32
+ /**
33
+ * Icon hash
34
+ *
35
+ * See https://discord.com/developers/docs/reference#image-formatting
36
+ */
37
+ icon: string | null;
38
+ /**
39
+ * Splash hash
40
+ *
41
+ * See https://discord.com/developers/docs/reference#image-formatting
42
+ */
43
+ splash: string | null;
44
+ /**
45
+ * Banner hash
46
+ *
47
+ * See https://discord.com/developers/docs/reference#image-formatting
48
+ */
49
+ banner?: string | null;
50
+ /**
51
+ * The description for the guild
52
+ */
53
+ description?: string | null;
54
+ /**
55
+ * Enabled guild features
56
+ *
57
+ * See https://discord.com/developers/docs/resources/guild#guild-object-guild-features
58
+ */
59
+ features?: GuildFeature[];
60
+ /**
61
+ * Verification level required for the guild
62
+ *
63
+ * See https://discord.com/developers/docs/resources/guild#guild-object-verification-level
64
+ */
65
+ verification_level?: GuildVerificationLevel;
66
+ /**
67
+ * The vanity url code for the guild
68
+ */
69
+ vanity_url_code?: string | null;
70
+ }
71
+ /**
72
+ * https://discord.com/developers/docs/resources/guild#guild-object-guild-structure
73
+ */
74
+ export interface APIGuild extends APIPartialGuild {
75
+ /**
76
+ * Icon hash, returned when in the template object
77
+ *
78
+ * See https://discord.com/developers/docs/reference#image-formatting
79
+ */
80
+ icon_hash?: string | null;
81
+ /**
82
+ * Discovery splash hash; only present for guilds with the "DISCOVERABLE" feature
83
+ *
84
+ * See https://discord.com/developers/docs/reference#image-formatting
85
+ */
86
+ discovery_splash: string | null;
87
+ /**
88
+ * `true` if the user is the owner of the guild
89
+ *
90
+ * **This field is only received from https://discord.com/developers/docs/resources/user#get-current-user-guilds**
91
+ */
92
+ owner?: boolean;
93
+ /**
94
+ * ID of owner
95
+ */
96
+ owner_id: Snowflake;
97
+ /**
98
+ * Total permissions for the user in the guild (excludes overrides)
99
+ *
100
+ * **This field is only received from https://discord.com/developers/docs/resources/user#get-current-user-guilds**
101
+ *
102
+ * See https://en.wikipedia.org/wiki/Bit_field
103
+ */
104
+ permissions?: Permissions;
105
+ /**
106
+ * Voice region id for the guild
107
+ *
108
+ * See https://discord.com/developers/docs/resources/voice#voice-region-object
109
+ *
110
+ * @deprecated This field has been deprecated in favor of `rtc_region` on the channel.
111
+ */
112
+ region: string;
113
+ /**
114
+ * ID of afk channel
115
+ */
116
+ afk_channel_id: Snowflake | null;
117
+ /**
118
+ * afk timeout in seconds, can be set to: `60`, `300`, `900`, `1800`, `3600`
119
+ */
120
+ afk_timeout: 1_800 | 3_600 | 60 | 300 | 900;
121
+ /**
122
+ * `true` if the guild widget is enabled
123
+ */
124
+ widget_enabled?: boolean;
125
+ /**
126
+ * The channel id that the widget will generate an invite to, or `null` if set to no invite
127
+ */
128
+ widget_channel_id?: Snowflake | null;
129
+ /**
130
+ * Verification level required for the guild
131
+ *
132
+ * See https://discord.com/developers/docs/resources/guild#guild-object-verification-level
133
+ */
134
+ verification_level: GuildVerificationLevel;
135
+ /**
136
+ * Default message notifications level
137
+ *
138
+ * See https://discord.com/developers/docs/resources/guild#guild-object-default-message-notification-level
139
+ */
140
+ default_message_notifications: GuildDefaultMessageNotifications;
141
+ /**
142
+ * Explicit content filter level
143
+ *
144
+ * See https://discord.com/developers/docs/resources/guild#guild-object-explicit-content-filter-level
145
+ */
146
+ explicit_content_filter: GuildExplicitContentFilter;
147
+ /**
148
+ * Roles in the guild
149
+ *
150
+ * See https://discord.com/developers/docs/topics/permissions#role-object
151
+ */
152
+ roles: APIRole[];
153
+ /**
154
+ * Custom guild emojis
155
+ *
156
+ * See https://discord.com/developers/docs/resources/emoji#emoji-object
157
+ */
158
+ emojis: APIEmoji[];
159
+ /**
160
+ * Enabled guild features
161
+ *
162
+ * See https://discord.com/developers/docs/resources/guild#guild-object-guild-features
163
+ */
164
+ features: GuildFeature[];
165
+ /**
166
+ * Required MFA level for the guild
167
+ *
168
+ * See https://discord.com/developers/docs/resources/guild#guild-object-mfa-level
169
+ */
170
+ mfa_level: GuildMFALevel;
171
+ /**
172
+ * Application id of the guild creator if it is bot-created
173
+ */
174
+ application_id: Snowflake | null;
175
+ /**
176
+ * The id of the channel where guild notices such as welcome messages and boost events are posted
177
+ */
178
+ system_channel_id: Snowflake | null;
179
+ /**
180
+ * System channel flags
181
+ *
182
+ * See https://discord.com/developers/docs/resources/guild#guild-object-system-channel-flags
183
+ */
184
+ system_channel_flags: GuildSystemChannelFlags;
185
+ /**
186
+ * The id of the channel where Community guilds can display rules and/or guidelines
187
+ */
188
+ rules_channel_id: Snowflake | null;
189
+ /**
190
+ * The maximum number of presences for the guild (`null` is always returned, apart from the largest of guilds)
191
+ */
192
+ max_presences?: number | null;
193
+ /**
194
+ * The maximum number of members for the guild
195
+ */
196
+ max_members?: number;
197
+ /**
198
+ * The vanity url code for the guild
199
+ */
200
+ vanity_url_code: string | null;
201
+ /**
202
+ * The description for the guild
203
+ */
204
+ description: string | null;
205
+ /**
206
+ * Banner hash
207
+ *
208
+ * See https://discord.com/developers/docs/reference#image-formatting
209
+ */
210
+ banner: string | null;
211
+ /**
212
+ * Premium tier (Server Boost level)
213
+ *
214
+ * See https://discord.com/developers/docs/resources/guild#guild-object-premium-tier
215
+ */
216
+ premium_tier: GuildPremiumTier;
217
+ /**
218
+ * The number of boosts this guild currently has
219
+ */
220
+ premium_subscription_count?: number;
221
+ /**
222
+ * The preferred locale of a Community guild; used in guild discovery and notices from Discord; defaults to "en-US"
223
+ *
224
+ * @default "en-US"
225
+ */
226
+ preferred_locale: string;
227
+ /**
228
+ * The id of the channel where admins and moderators of Community guilds receive notices from Discord
229
+ */
230
+ public_updates_channel_id: Snowflake | null;
231
+ /**
232
+ * The maximum amount of users in a video channel
233
+ */
234
+ max_video_channel_users?: number;
235
+ /**
236
+ * The maximum amount of users in a stage video channel
237
+ */
238
+ max_stage_video_channel_users?: number;
239
+ /**
240
+ * Approximate number of members in this guild,
241
+ * returned from the `GET /guilds/<id>` and `/users/@me/guilds` (OAuth2) endpoints when `with_counts` is `true`
242
+ */
243
+ approximate_member_count?: number;
244
+ /**
245
+ * Approximate number of non-offline members in this guild,
246
+ * returned from the `GET /guilds/<id>` and `/users/@me/guilds` (OAuth2) endpoints when `with_counts` is `true`
247
+ */
248
+ approximate_presence_count?: number;
249
+ /**
250
+ * The welcome screen of a Community guild, shown to new members
251
+ *
252
+ * Returned in the invite object
253
+ */
254
+ welcome_screen?: APIGuildWelcomeScreen;
255
+ /**
256
+ * The nsfw level of the guild
257
+ *
258
+ * See https://discord.com/developers/docs/resources/guild#guild-object-guild-nsfw-level
259
+ */
260
+ nsfw_level: GuildNSFWLevel;
261
+ /**
262
+ * Custom guild stickers
263
+ *
264
+ * See https://discord.com/developers/docs/resources/sticker#sticker-object
265
+ */
266
+ stickers: APISticker[];
267
+ /**
268
+ * Whether the guild has the boost progress bar enabled.
269
+ */
270
+ premium_progress_bar_enabled: boolean;
271
+ /**
272
+ * The type of Student Hub the guild is
273
+ */
274
+ hub_type: GuildHubType | null;
275
+ /**
276
+ * The id of the channel where admins and moderators of Community guilds receive safety alerts from Discord
277
+ */
278
+ safety_alerts_channel_id: Snowflake | null;
279
+ }
280
+ /**
281
+ * https://discord.com/developers/docs/resources/guild#guild-object-default-message-notification-level
282
+ */
283
+ export declare enum GuildDefaultMessageNotifications {
284
+ AllMessages = 0,
285
+ OnlyMentions = 1
286
+ }
287
+ /**
288
+ * https://discord.com/developers/docs/resources/guild#guild-object-explicit-content-filter-level
289
+ */
290
+ export declare enum GuildExplicitContentFilter {
291
+ Disabled = 0,
292
+ MembersWithoutRoles = 1,
293
+ AllMembers = 2
294
+ }
295
+ /**
296
+ * https://discord.com/developers/docs/resources/guild#guild-object-mfa-level
297
+ */
298
+ export declare enum GuildMFALevel {
299
+ None = 0,
300
+ Elevated = 1
301
+ }
302
+ /**
303
+ * https://discord.com/developers/docs/resources/guild#guild-object-guild-nsfw-level
304
+ */
305
+ export declare enum GuildNSFWLevel {
306
+ Default = 0,
307
+ Explicit = 1,
308
+ Safe = 2,
309
+ AgeRestricted = 3
310
+ }
311
+ /**
312
+ * https://discord.com/developers/docs/resources/guild#guild-object-verification-level
313
+ */
314
+ export declare enum GuildVerificationLevel {
315
+ /**
316
+ * Unrestricted
317
+ */
318
+ None = 0,
319
+ /**
320
+ * Must have verified email on account
321
+ */
322
+ Low = 1,
323
+ /**
324
+ * Must be registered on Discord for longer than 5 minutes
325
+ */
326
+ Medium = 2,
327
+ /**
328
+ * Must be a member of the guild for longer than 10 minutes
329
+ */
330
+ High = 3,
331
+ /**
332
+ * Must have a verified phone number
333
+ */
334
+ VeryHigh = 4
335
+ }
336
+ /**
337
+ * https://discord.com/developers/docs/resources/guild#guild-object-premium-tier
338
+ */
339
+ export declare enum GuildPremiumTier {
340
+ None = 0,
341
+ Tier1 = 1,
342
+ Tier2 = 2,
343
+ Tier3 = 3
344
+ }
345
+ export declare enum GuildHubType {
346
+ Default = 0,
347
+ HighSchool = 1,
348
+ College = 2
349
+ }
350
+ /**
351
+ * https://discord.com/developers/docs/resources/guild#guild-object-system-channel-flags
352
+ */
353
+ export declare enum GuildSystemChannelFlags {
354
+ /**
355
+ * Suppress member join notifications
356
+ */
357
+ SuppressJoinNotifications = 1,
358
+ /**
359
+ * Suppress server boost notifications
360
+ */
361
+ SuppressPremiumSubscriptions = 2,
362
+ /**
363
+ * Suppress server setup tips
364
+ */
365
+ SuppressGuildReminderNotifications = 4,
366
+ /**
367
+ * Hide member join sticker reply buttons
368
+ */
369
+ SuppressJoinNotificationReplies = 8,
370
+ /**
371
+ * Suppress role subscription purchase and renewal notifications
372
+ */
373
+ SuppressRoleSubscriptionPurchaseNotifications = 16,
374
+ /**
375
+ * Hide role subscription sticker reply buttons
376
+ */
377
+ SuppressRoleSubscriptionPurchaseNotificationReplies = 32
378
+ }
379
+ /**
380
+ * https://discord.com/developers/docs/resources/guild#guild-object-guild-features
381
+ */
382
+ export declare enum GuildFeature {
383
+ /**
384
+ * Guild has access to set an animated guild banner image
385
+ */
386
+ AnimatedBanner = "ANIMATED_BANNER",
387
+ /**
388
+ * Guild has access to set an animated guild icon
389
+ */
390
+ AnimatedIcon = "ANIMATED_ICON",
391
+ /**
392
+ * Guild is using the old permissions configuration behavior
393
+ *
394
+ * See https://discord.com/developers/docs/change-log#upcoming-application-command-permission-changes
395
+ */
396
+ ApplicationCommandPermissionsV2 = "APPLICATION_COMMAND_PERMISSIONS_V2",
397
+ /**
398
+ * Guild has set up auto moderation rules
399
+ */
400
+ AutoModeration = "AUTO_MODERATION",
401
+ /**
402
+ * Guild has access to set a guild banner image
403
+ */
404
+ Banner = "BANNER",
405
+ /**
406
+ * Guild can enable welcome screen, Membership Screening and discovery, and receives community updates
407
+ */
408
+ Community = "COMMUNITY",
409
+ /**
410
+ * Guild has enabled monetization
411
+ */
412
+ CreatorMonetizableProvisional = "CREATOR_MONETIZABLE_PROVISIONAL",
413
+ /**
414
+ * Guild has enabled the role subscription promo page
415
+ */
416
+ CreatorStorePage = "CREATOR_STORE_PAGE",
417
+ /**
418
+ * Guild has been set as a support server on the App Directory
419
+ */
420
+ DeveloperSupportServer = "DEVELOPER_SUPPORT_SERVER",
421
+ /**
422
+ * Guild is able to be discovered in the directory
423
+ */
424
+ Discoverable = "DISCOVERABLE",
425
+ /**
426
+ * Guild is able to be featured in the directory
427
+ */
428
+ Featurable = "FEATURABLE",
429
+ /**
430
+ * Guild is listed in a directory channel
431
+ */
432
+ HasDirectoryEntry = "HAS_DIRECTORY_ENTRY",
433
+ /**
434
+ * Guild is a Student Hub
435
+ *
436
+ * See https://support.discord.com/hc/articles/4406046651927
437
+ *
438
+ * @unstable This feature is currently not documented by Discord, but has known value
439
+ */
440
+ Hub = "HUB",
441
+ /**
442
+ * Guild has disabled invite usage, preventing users from joining
443
+ */
444
+ InvitesDisabled = "INVITES_DISABLED",
445
+ /**
446
+ * Guild has access to set an invite splash background
447
+ */
448
+ InviteSplash = "INVITE_SPLASH",
449
+ /**
450
+ * Guild is in a Student Hub
451
+ *
452
+ * See https://support.discord.com/hc/articles/4406046651927
453
+ *
454
+ * @unstable This feature is currently not documented by Discord, but has known value
455
+ */
456
+ LinkedToHub = "LINKED_TO_HUB",
457
+ /**
458
+ * Guild has enabled Membership Screening
459
+ */
460
+ MemberVerificationGateEnabled = "MEMBER_VERIFICATION_GATE_ENABLED",
461
+ /**
462
+ * Guild has enabled monetization
463
+ *
464
+ * @unstable This feature is no longer documented by Discord
465
+ */
466
+ MonetizationEnabled = "MONETIZATION_ENABLED",
467
+ /**
468
+ * Guild has increased custom sticker slots
469
+ */
470
+ MoreStickers = "MORE_STICKERS",
471
+ /**
472
+ * Guild has access to create news channels
473
+ */
474
+ News = "NEWS",
475
+ /**
476
+ * Guild is partnered
477
+ */
478
+ Partnered = "PARTNERED",
479
+ /**
480
+ * Guild can be previewed before joining via Membership Screening or the directory
481
+ */
482
+ PreviewEnabled = "PREVIEW_ENABLED",
483
+ /**
484
+ * Guild has access to create private threads
485
+ */
486
+ PrivateThreads = "PRIVATE_THREADS",
487
+ /**
488
+ * Guild has disabled alerts for join raids in the configured safety alerts channel
489
+ */
490
+ RaidAlertsDisabled = "RAID_ALERTS_DISABLED",
491
+ RelayEnabled = "RELAY_ENABLED",
492
+ /**
493
+ * Guild is able to set role icons
494
+ */
495
+ RoleIcons = "ROLE_ICONS",
496
+ /**
497
+ * Guild has role subscriptions that can be purchased
498
+ */
499
+ RoleSubscriptionsAvailableForPurchase = "ROLE_SUBSCRIPTIONS_AVAILABLE_FOR_PURCHASE",
500
+ /**
501
+ * Guild has enabled role subscriptions
502
+ */
503
+ RoleSubscriptionsEnabled = "ROLE_SUBSCRIPTIONS_ENABLED",
504
+ /**
505
+ * Guild has enabled ticketed events
506
+ */
507
+ TicketedEventsEnabled = "TICKETED_EVENTS_ENABLED",
508
+ /**
509
+ * Guild has access to set a vanity URL
510
+ */
511
+ VanityURL = "VANITY_URL",
512
+ /**
513
+ * Guild is verified
514
+ */
515
+ Verified = "VERIFIED",
516
+ /**
517
+ * Guild has access to set 384kbps bitrate in voice (previously VIP voice servers)
518
+ */
519
+ VIPRegions = "VIP_REGIONS",
520
+ /**
521
+ * Guild has enabled the welcome screen
522
+ */
523
+ WelcomeScreenEnabled = "WELCOME_SCREEN_ENABLED"
524
+ }
525
+ /**
526
+ * https://discord.com/developers/docs/resources/guild#guild-preview-object
527
+ */
528
+ export interface APIGuildPreview {
529
+ /**
530
+ * Guild id
531
+ */
532
+ id: Snowflake;
533
+ /**
534
+ * Guild name (2-100 characters)
535
+ */
536
+ name: string;
537
+ /**
538
+ * Icon hash
539
+ *
540
+ * See https://discord.com/developers/docs/reference#image-formatting
541
+ */
542
+ icon: string | null;
543
+ /**
544
+ * Splash hash
545
+ *
546
+ * See https://discord.com/developers/docs/reference#image-formatting
547
+ */
548
+ splash: string | null;
549
+ /**
550
+ * Discovery splash hash; only present for guilds with the "DISCOVERABLE" feature
551
+ *
552
+ * See https://discord.com/developers/docs/reference#image-formatting
553
+ */
554
+ discovery_splash: string | null;
555
+ /**
556
+ * Custom guild emojis
557
+ *
558
+ * See https://discord.com/developers/docs/resources/emoji#emoji-object
559
+ */
560
+ emojis: APIEmoji[];
561
+ /**
562
+ * Enabled guild features
563
+ *
564
+ * See https://discord.com/developers/docs/resources/guild#guild-object-guild-features
565
+ */
566
+ features: GuildFeature[];
567
+ /**
568
+ * Approximate number of members in this guild
569
+ */
570
+ approximate_member_count: number;
571
+ /**
572
+ * Approximate number of online members in this guild
573
+ */
574
+ approximate_presence_count: number;
575
+ /**
576
+ * The description for the guild
577
+ */
578
+ description: string;
579
+ /**
580
+ * Custom guild stickers
581
+ */
582
+ stickers: APISticker[];
583
+ }
584
+ /**
585
+ * https://discord.com/developers/docs/resources/guild#guild-widget-object
586
+ */
587
+ export interface APIGuildWidgetSettings {
588
+ /**
589
+ * Whether the widget is enabled
590
+ */
591
+ enabled: boolean;
592
+ /**
593
+ * The widget channel id
594
+ */
595
+ channel_id: Snowflake | null;
596
+ }
597
+ /**
598
+ * https://discord.com/developers/docs/resources/guild#guild-member-object
599
+ */
600
+ export interface APIGuildMember {
601
+ /**
602
+ * The user this guild member represents
603
+ *
604
+ * **This field won't be included in the member object attached to `MESSAGE_CREATE` and `MESSAGE_UPDATE` gateway events.**
605
+ *
606
+ * See https://discord.com/developers/docs/resources/user#user-object
607
+ */
608
+ user: APIUser;
609
+ /**
610
+ * This users guild nickname
611
+ */
612
+ nick?: string | null;
613
+ /**
614
+ * The member's guild avatar hash
615
+ */
616
+ avatar?: string | null;
617
+ /**
618
+ * Array of role object ids
619
+ *
620
+ * See https://discord.com/developers/docs/topics/permissions#role-object
621
+ */
622
+ roles: Snowflake[];
623
+ /**
624
+ * When the user joined the guild
625
+ */
626
+ joined_at: string;
627
+ /**
628
+ * When the user started boosting the guild
629
+ *
630
+ * See https://support.discord.com/hc/articles/360028038352
631
+ */
632
+ premium_since?: string | null;
633
+ /**
634
+ * Whether the user is deafened in voice channels
635
+ */
636
+ deaf: boolean;
637
+ /**
638
+ * Whether the user is muted in voice channels
639
+ */
640
+ mute: boolean;
641
+ /**
642
+ * Guild member flags represented as a bit set, defaults to `0`
643
+ */
644
+ flags: GuildMemberFlags;
645
+ /**
646
+ * Whether the user has not yet passed the guild's Membership Screening requirements
647
+ *
648
+ * @remarks If this field is not present, it can be assumed as `false`.
649
+ */
650
+ pending?: boolean;
651
+ /**
652
+ * Timestamp of when the time out will be removed; until then, they cannot interact with the guild
653
+ */
654
+ communication_disabled_until?: string | null;
655
+ /**
656
+ * The data for the member's guild avatar decoration
657
+ *
658
+ * See https://discord.com/developers/docs/resources/user#avatar-decoration-data-object
659
+ */
660
+ avatar_decoration_data?: APIAvatarDecorationData | null;
661
+ /**
662
+ * The data for the member's guild banner
663
+ *
664
+ * See https://github.com/discord/discord-api-docs/discussions/4217
665
+ */
666
+ banner: null | string;
667
+ }
668
+ /**
669
+ * https://discord.com/developers/docs/resources/guild#integration-object
670
+ */
671
+ export interface APIGuildIntegration {
672
+ /**
673
+ * Integration id
674
+ */
675
+ id: Snowflake;
676
+ /**
677
+ * Integration name
678
+ */
679
+ name: string;
680
+ /**
681
+ * Integration type
682
+ */
683
+ type: APIGuildIntegrationType;
684
+ /**
685
+ * Is this integration enabled
686
+ */
687
+ enabled: boolean;
688
+ /**
689
+ * Is this integration syncing
690
+ *
691
+ * **This field is not provided for `discord` bot integrations.**
692
+ */
693
+ syncing?: boolean;
694
+ /**
695
+ * ID that this integration uses for "subscribers"
696
+ *
697
+ * **This field is not provided for `discord` bot integrations.**
698
+ */
699
+ role_id?: Snowflake;
700
+ /**
701
+ * Whether emoticons should be synced for this integration (`twitch` only currently)
702
+ *
703
+ * **This field is not provided for `discord` bot integrations.**
704
+ */
705
+ enable_emoticons?: boolean;
706
+ /**
707
+ * The behavior of expiring subscribers
708
+ *
709
+ * **This field is not provided for `discord` bot integrations.**
710
+ *
711
+ * See https://discord.com/developers/docs/resources/guild#integration-object-integration-expire-behaviors
712
+ */
713
+ expire_behavior?: IntegrationExpireBehavior;
714
+ /**
715
+ * The grace period (in days) before expiring subscribers
716
+ *
717
+ * **This field is not provided for `discord` bot integrations.**
718
+ */
719
+ expire_grace_period?: number;
720
+ /**
721
+ * User for this integration
722
+ *
723
+ * **Some older integrations may not have an attached user.**
724
+ *
725
+ * See https://discord.com/developers/docs/resources/user#user-object
726
+ */
727
+ user?: APIUser;
728
+ /**
729
+ * Integration account information
730
+ *
731
+ * See https://discord.com/developers/docs/resources/guild#integration-account-object
732
+ */
733
+ account: APIIntegrationAccount;
734
+ /**
735
+ * When this integration was last synced
736
+ *
737
+ * **This field is not provided for `discord` bot integrations.**
738
+ */
739
+ synced_at?: string;
740
+ /**
741
+ * How many subscribers this integration has
742
+ *
743
+ * **This field is not provided for `discord` bot integrations.**
744
+ */
745
+ subscriber_count?: number;
746
+ /**
747
+ * Has this integration been revoked
748
+ *
749
+ * **This field is not provided for `discord` bot integrations.**
750
+ */
751
+ revoked?: boolean;
752
+ /**
753
+ * The bot/OAuth2 application for discord integrations
754
+ *
755
+ * See https://discord.com/developers/docs/resources/guild#integration-application-object
756
+ *
757
+ * **This field is not provided for `discord` bot integrations.**
758
+ */
759
+ application?: APIGuildIntegrationApplication;
760
+ /**
761
+ * The scopes the application has been authorized for
762
+ */
763
+ scopes?: OAuth2Scopes[];
764
+ }
765
+ export type APIGuildIntegrationType = 'discord' | 'guild_subscription' | 'twitch' | 'youtube';
766
+ /**
767
+ * https://discord.com/developers/docs/resources/guild#integration-object-integration-expire-behaviors
768
+ */
769
+ export declare enum IntegrationExpireBehavior {
770
+ RemoveRole = 0,
771
+ Kick = 1
772
+ }
773
+ /**
774
+ * https://discord.com/developers/docs/resources/guild#integration-account-object
775
+ */
776
+ export interface APIIntegrationAccount {
777
+ /**
778
+ * ID of the account
779
+ */
780
+ id: string;
781
+ /**
782
+ * Name of the account
783
+ */
784
+ name: string;
785
+ }
786
+ /**
787
+ * https://discord.com/developers/docs/resources/guild#integration-application-object
788
+ */
789
+ export interface APIGuildIntegrationApplication {
790
+ /**
791
+ * The id of the app
792
+ */
793
+ id: Snowflake;
794
+ /**
795
+ * The name of the app
796
+ */
797
+ name: string;
798
+ /**
799
+ * The icon hash of the app
800
+ *
801
+ * See https://discord.com/developers/docs/reference#image-formatting
802
+ */
803
+ icon: string | null;
804
+ /**
805
+ * The description of the app
806
+ */
807
+ description: string;
808
+ /**
809
+ * The bot associated with this application
810
+ *
811
+ * See https://discord.com/developers/docs/resources/user#user-object
812
+ */
813
+ bot?: APIUser;
814
+ }
815
+ /**
816
+ * https://discord.com/developers/docs/resources/guild#ban-object
817
+ */
818
+ export interface APIBan {
819
+ /**
820
+ * The reason for the ban
821
+ */
822
+ reason: string | null;
823
+ /**
824
+ * The banned user
825
+ */
826
+ user: APIUser;
827
+ }
828
+ /**
829
+ * https://discord.com/developers/docs/resources/guild#guild-widget-object
830
+ */
831
+ export interface APIGuildWidget {
832
+ id: Snowflake;
833
+ name: string;
834
+ instant_invite: string | null;
835
+ channels: APIGuildWidgetChannel[];
836
+ members: APIGuildWidgetMember[];
837
+ presence_count: number;
838
+ }
839
+ /**
840
+ * https://discord.com/developers/docs/resources/guild#guild-widget-object-example-guild-widget
841
+ */
842
+ export interface APIGuildWidgetChannel {
843
+ id: Snowflake;
844
+ name: string;
845
+ position: number;
846
+ }
847
+ /**
848
+ * https://discord.com/developers/docs/resources/guild#guild-widget-object-example-guild-widget
849
+ */
850
+ export interface APIGuildWidgetMember {
851
+ id: string;
852
+ username: string;
853
+ discriminator: string;
854
+ avatar: string | null;
855
+ status: PresenceUpdateReceiveStatus;
856
+ activity?: {
857
+ name: string;
858
+ };
859
+ avatar_url: string;
860
+ }
861
+ /**
862
+ * https://discord.com/developers/docs/resources/guild#get-guild-widget-image-widget-style-options
863
+ */
864
+ export declare enum GuildWidgetStyle {
865
+ /**
866
+ * Shield style widget with Discord icon and guild members online count
867
+ */
868
+ Shield = "shield",
869
+ /**
870
+ * Large image with guild icon, name and online count. "POWERED BY DISCORD" as the footer of the widget
871
+ */
872
+ Banner1 = "banner1",
873
+ /**
874
+ * Smaller widget style with guild icon, name and online count. Split on the right with Discord logo
875
+ */
876
+ Banner2 = "banner2",
877
+ /**
878
+ * Large image with guild icon, name and online count. In the footer, Discord logo on the left and "Chat Now" on the right
879
+ */
880
+ Banner3 = "banner3",
881
+ /**
882
+ * Large Discord logo at the top of the widget. Guild icon, name and online count in the middle portion of the widget
883
+ * and a "JOIN MY SERVER" button at the bottom
884
+ */
885
+ Banner4 = "banner4"
886
+ }
887
+ export interface APIGuildWelcomeScreen {
888
+ /**
889
+ * The welcome screen short message
890
+ */
891
+ description: string | null;
892
+ /**
893
+ * Array of suggested channels
894
+ */
895
+ welcome_channels: APIGuildWelcomeScreenChannel[];
896
+ }
897
+ export interface APIGuildWelcomeScreenChannel {
898
+ /**
899
+ * The channel id that is suggested
900
+ */
901
+ channel_id: Snowflake;
902
+ /**
903
+ * The description shown for the channel
904
+ */
905
+ description: string;
906
+ /**
907
+ * The emoji id of the emoji that is shown on the left of the channel
908
+ */
909
+ emoji_id: Snowflake | null;
910
+ /**
911
+ * The emoji name of the emoji that is shown on the left of the channel
912
+ */
913
+ emoji_name: string | null;
914
+ }
915
+ export interface APIGuildMembershipScreening {
916
+ /**
917
+ * When the fields were last updated
918
+ */
919
+ version: string;
920
+ /**
921
+ * The steps in the screening form
922
+ */
923
+ form_fields: APIGuildMembershipScreeningField[];
924
+ /**
925
+ * The server description shown in the screening form
926
+ */
927
+ description: string | null;
928
+ }
929
+ export interface APIGuildMembershipScreeningField {
930
+ /**
931
+ * The type of field
932
+ */
933
+ field_type: MembershipScreeningFieldType;
934
+ /**
935
+ * The title of the field
936
+ */
937
+ label: string;
938
+ /**
939
+ * The list of rules
940
+ */
941
+ values?: string[];
942
+ /**
943
+ * Whether the user has to fill out this field
944
+ */
945
+ required: boolean;
946
+ }
947
+ export declare enum MembershipScreeningFieldType {
948
+ /**
949
+ * Server Rules
950
+ */
951
+ Terms = "TERMS"
952
+ }
953
+ /**
954
+ * https://discord.com/developers/docs/resources/guild#guild-onboarding-object-guild-onboarding-structure
955
+ */
956
+ export interface APIGuildOnboarding {
957
+ /**
958
+ * Id of the guild this onboarding is part of
959
+ */
960
+ guild_id: Snowflake;
961
+ /**
962
+ * Prompts shown during onboarding and in customize community
963
+ */
964
+ prompts: APIGuildOnboardingPrompt[];
965
+ /**
966
+ * Channel ids that members get opted into automatically
967
+ */
968
+ default_channel_ids: Snowflake[];
969
+ /**
970
+ * Whether onboarding is enabled in the guild
971
+ */
972
+ enabled: boolean;
973
+ /**
974
+ * Current mode of onboarding
975
+ */
976
+ mode: GuildOnboardingMode;
977
+ }
978
+ /**
979
+ * https://discord.com/developers/docs/resources/guild#guild-onboarding-object-onboarding-prompt-structure
980
+ */
981
+ export interface APIGuildOnboardingPrompt {
982
+ /**
983
+ * Id of the prompt
984
+ */
985
+ id: Snowflake;
986
+ /**
987
+ * Options available within the prompt
988
+ */
989
+ options: APIGuildOnboardingPromptOption[];
990
+ /**
991
+ * Title of the prompt
992
+ */
993
+ title: string;
994
+ /**
995
+ * Indicates whether users are limited to selecting one option for the prompt
996
+ */
997
+ single_select: boolean;
998
+ /**
999
+ * Indicates whether the prompt is required before a user completes the onboarding flow
1000
+ */
1001
+ required: boolean;
1002
+ /**
1003
+ * Indicates whether the prompt is present in the onboarding flow.
1004
+ * If `false`, the prompt will only appear in the Channels & Roles tab
1005
+ */
1006
+ in_onboarding: boolean;
1007
+ /**
1008
+ * Type of prompt
1009
+ */
1010
+ type: GuildOnboardingPromptType;
1011
+ }
1012
+ /**
1013
+ * https://discord.com/developers/docs/resources/guild#guild-onboarding-object-prompt-option-structure
1014
+ */
1015
+ export interface APIGuildOnboardingPromptOption {
1016
+ /**
1017
+ * Id of the prompt option
1018
+ */
1019
+ id: Snowflake;
1020
+ /**
1021
+ * Ids for channels a member is added to when the option is selected
1022
+ */
1023
+ channel_ids: Snowflake[];
1024
+ /**
1025
+ * Ids for roles assigned to a member when the option is selected
1026
+ */
1027
+ role_ids: Snowflake[];
1028
+ /**
1029
+ * Emoji of the option
1030
+ */
1031
+ emoji: APIPartialEmoji;
1032
+ /**
1033
+ * Title of the option
1034
+ */
1035
+ title: string;
1036
+ /**
1037
+ * Description of the option
1038
+ */
1039
+ description: string | null;
1040
+ }
1041
+ /**
1042
+ * https://discord.com/developers/docs/resources/guild#guild-onboarding-object-onboarding-mode
1043
+ */
1044
+ export declare enum GuildOnboardingMode {
1045
+ /**
1046
+ * Counts only Default Channels towards constraints
1047
+ */
1048
+ OnboardingDefault = 0,
1049
+ /**
1050
+ * Counts Default Channels and Questions towards constraints
1051
+ */
1052
+ OnboardingAdvanced = 1
1053
+ }
1054
+ /**
1055
+ * https://discord.com/developers/docs/resources/guild#guild-onboarding-object-prompt-types
1056
+ */
1057
+ export declare enum GuildOnboardingPromptType {
1058
+ MultipleChoice = 0,
1059
+ Dropdown = 1
1060
+ }