@buape/carbon 0.7.0 → 0.9.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 (390) hide show
  1. package/dist/package.json +8 -7
  2. package/dist/src/abstracts/AnySelectMenu.d.ts +4 -3
  3. package/dist/src/abstracts/AnySelectMenu.d.ts.map +1 -1
  4. package/dist/src/abstracts/AnySelectMenu.js +8 -2
  5. package/dist/src/abstracts/AnySelectMenu.js.map +1 -1
  6. package/dist/src/abstracts/AnySelectMenuInteraction.d.ts +0 -1
  7. package/dist/src/abstracts/AnySelectMenuInteraction.d.ts.map +1 -1
  8. package/dist/src/abstracts/AnySelectMenuInteraction.js +0 -2
  9. package/dist/src/abstracts/AnySelectMenuInteraction.js.map +1 -1
  10. package/dist/src/abstracts/BaseChannel.d.ts +12 -3
  11. package/dist/src/abstracts/BaseChannel.d.ts.map +1 -1
  12. package/dist/src/abstracts/BaseChannel.js +15 -1
  13. package/dist/src/abstracts/BaseChannel.js.map +1 -1
  14. package/dist/src/abstracts/BaseCommand.d.ts +18 -8
  15. package/dist/src/abstracts/BaseCommand.d.ts.map +1 -1
  16. package/dist/src/abstracts/BaseCommand.js +24 -7
  17. package/dist/src/abstracts/BaseCommand.js.map +1 -1
  18. package/dist/src/abstracts/BaseComponent.d.ts +10 -24
  19. package/dist/src/abstracts/BaseComponent.d.ts.map +1 -1
  20. package/dist/src/abstracts/BaseComponent.js +5 -25
  21. package/dist/src/abstracts/BaseComponent.js.map +1 -1
  22. package/dist/src/abstracts/BaseComponentInteraction.d.ts +3 -4
  23. package/dist/src/abstracts/BaseComponentInteraction.d.ts.map +1 -1
  24. package/dist/src/abstracts/BaseComponentInteraction.js +3 -6
  25. package/dist/src/abstracts/BaseComponentInteraction.js.map +1 -1
  26. package/dist/src/abstracts/BaseGuildChannel.d.ts +4 -3
  27. package/dist/src/abstracts/BaseGuildChannel.d.ts.map +1 -1
  28. package/dist/src/abstracts/BaseGuildChannel.js +5 -3
  29. package/dist/src/abstracts/BaseGuildChannel.js.map +1 -1
  30. package/dist/src/abstracts/BaseGuildTextChannel.d.ts +1 -1
  31. package/dist/src/abstracts/BaseGuildTextChannel.d.ts.map +1 -1
  32. package/dist/src/abstracts/BaseInteraction.d.ts +49 -36
  33. package/dist/src/abstracts/BaseInteraction.d.ts.map +1 -1
  34. package/dist/src/abstracts/BaseInteraction.js +105 -34
  35. package/dist/src/abstracts/BaseInteraction.js.map +1 -1
  36. package/dist/src/abstracts/BaseListener.d.ts +13 -0
  37. package/dist/src/abstracts/BaseListener.d.ts.map +1 -0
  38. package/dist/src/abstracts/BaseListener.js +8 -0
  39. package/dist/src/abstracts/BaseListener.js.map +1 -0
  40. package/dist/src/abstracts/BaseMessageInteractiveComponent.d.ts +39 -0
  41. package/dist/src/abstracts/BaseMessageInteractiveComponent.d.ts.map +1 -0
  42. package/dist/src/abstracts/BaseMessageInteractiveComponent.js +33 -0
  43. package/dist/src/abstracts/BaseMessageInteractiveComponent.js.map +1 -0
  44. package/dist/src/abstracts/BaseModalComponent.d.ts +29 -0
  45. package/dist/src/abstracts/BaseModalComponent.d.ts.map +1 -0
  46. package/dist/src/abstracts/BaseModalComponent.js +33 -0
  47. package/dist/src/abstracts/BaseModalComponent.js.map +1 -0
  48. package/dist/src/abstracts/GuildThreadOnlyChannel.d.ts +5 -4
  49. package/dist/src/abstracts/GuildThreadOnlyChannel.d.ts.map +1 -1
  50. package/dist/src/abstracts/GuildThreadOnlyChannel.js +1 -1
  51. package/dist/src/abstracts/GuildThreadOnlyChannel.js.map +1 -1
  52. package/dist/src/abstracts/Plugin.d.ts +6 -2
  53. package/dist/src/abstracts/Plugin.d.ts.map +1 -1
  54. package/dist/src/abstracts/Plugin.js.map +1 -1
  55. package/dist/src/classes/Client.d.ts +42 -12
  56. package/dist/src/classes/Client.d.ts.map +1 -1
  57. package/dist/src/classes/Client.js +98 -25
  58. package/dist/src/classes/Client.js.map +1 -1
  59. package/dist/src/classes/Command.d.ts +10 -2
  60. package/dist/src/classes/Command.d.ts.map +1 -1
  61. package/dist/src/classes/Command.js +12 -1
  62. package/dist/src/classes/Command.js.map +1 -1
  63. package/dist/src/classes/Listener.d.ts +376 -5
  64. package/dist/src/classes/Listener.d.ts.map +1 -1
  65. package/dist/src/classes/Listener.js +1011 -1
  66. package/dist/src/classes/Listener.js.map +1 -1
  67. package/dist/src/classes/Modal.d.ts +22 -5
  68. package/dist/src/classes/Modal.d.ts.map +1 -1
  69. package/dist/src/classes/Modal.js +14 -0
  70. package/dist/src/classes/Modal.js.map +1 -1
  71. package/dist/src/classes/RequestClient.d.ts +79 -0
  72. package/dist/src/classes/RequestClient.d.ts.map +1 -0
  73. package/dist/src/classes/RequestClient.js +225 -0
  74. package/dist/src/classes/RequestClient.js.map +1 -0
  75. package/dist/src/classes/{Button.d.ts → components/Button.d.ts} +8 -5
  76. package/dist/src/classes/components/Button.d.ts.map +1 -0
  77. package/dist/src/classes/{Button.js → components/Button.js} +13 -3
  78. package/dist/src/classes/components/Button.js.map +1 -0
  79. package/dist/src/classes/{ChannelSelectMenu.d.ts → components/ChannelSelectMenu.d.ts} +6 -4
  80. package/dist/src/classes/components/ChannelSelectMenu.d.ts.map +1 -0
  81. package/dist/src/classes/{ChannelSelectMenu.js → components/ChannelSelectMenu.js} +8 -1
  82. package/dist/src/classes/components/ChannelSelectMenu.js.map +1 -0
  83. package/dist/src/classes/components/Container.d.ts +23 -0
  84. package/dist/src/classes/components/Container.d.ts.map +1 -0
  85. package/dist/src/classes/components/Container.js +27 -0
  86. package/dist/src/classes/components/Container.js.map +1 -0
  87. package/dist/src/classes/components/File.d.ts +21 -0
  88. package/dist/src/classes/components/File.d.ts.map +1 -0
  89. package/dist/src/classes/components/File.js +33 -0
  90. package/dist/src/classes/components/File.js.map +1 -0
  91. package/dist/src/classes/components/MediaGallery.d.ts +27 -0
  92. package/dist/src/classes/components/MediaGallery.d.ts.map +1 -0
  93. package/dist/src/classes/components/MediaGallery.js +27 -0
  94. package/dist/src/classes/components/MediaGallery.js.map +1 -0
  95. package/dist/src/classes/{MentionableSelectMenu.d.ts → components/MentionableSelectMenu.d.ts} +6 -4
  96. package/dist/src/classes/components/MentionableSelectMenu.d.ts.map +1 -0
  97. package/dist/src/classes/{MentionableSelectMenu.js → components/MentionableSelectMenu.js} +8 -1
  98. package/dist/src/classes/components/MentionableSelectMenu.js.map +1 -0
  99. package/dist/src/classes/{RoleSelectMenu.d.ts → components/RoleSelectMenu.d.ts} +6 -4
  100. package/dist/src/classes/components/RoleSelectMenu.d.ts.map +1 -0
  101. package/dist/src/classes/components/RoleSelectMenu.js +20 -0
  102. package/dist/src/classes/components/RoleSelectMenu.js.map +1 -0
  103. package/dist/src/classes/components/Row.d.ts +29 -0
  104. package/dist/src/classes/components/Row.d.ts.map +1 -0
  105. package/dist/src/classes/{Row.js → components/Row.js} +8 -2
  106. package/dist/src/classes/components/Row.js.map +1 -0
  107. package/dist/src/classes/components/Section.d.ts +22 -0
  108. package/dist/src/classes/components/Section.d.ts.map +1 -0
  109. package/dist/src/classes/components/Section.js +15 -0
  110. package/dist/src/classes/components/Section.js.map +1 -0
  111. package/dist/src/classes/components/Separator.d.ts +22 -0
  112. package/dist/src/classes/components/Separator.d.ts.map +1 -0
  113. package/dist/src/classes/components/Separator.js +33 -0
  114. package/dist/src/classes/components/Separator.js.map +1 -0
  115. package/dist/src/classes/components/StringSelectMenu.d.ts +15 -0
  116. package/dist/src/classes/components/StringSelectMenu.d.ts.map +1 -0
  117. package/dist/src/classes/components/StringSelectMenu.js +19 -0
  118. package/dist/src/classes/components/StringSelectMenu.js.map +1 -0
  119. package/dist/src/classes/components/TextDisplay.d.ts +10 -0
  120. package/dist/src/classes/components/TextDisplay.d.ts.map +1 -0
  121. package/dist/src/classes/components/TextDisplay.js +19 -0
  122. package/dist/src/classes/components/TextDisplay.js.map +1 -0
  123. package/dist/src/classes/{TextInput.d.ts → components/TextInput.d.ts} +4 -3
  124. package/dist/src/classes/components/TextInput.d.ts.map +1 -0
  125. package/dist/src/classes/{TextInput.js → components/TextInput.js} +3 -2
  126. package/dist/src/classes/components/TextInput.js.map +1 -0
  127. package/dist/src/classes/components/Thumbnail.d.ts +13 -0
  128. package/dist/src/classes/components/Thumbnail.d.ts.map +1 -0
  129. package/dist/src/classes/components/Thumbnail.js +16 -0
  130. package/dist/src/classes/components/Thumbnail.js.map +1 -0
  131. package/dist/src/classes/{UserSelectMenu.d.ts → components/UserSelectMenu.d.ts} +6 -4
  132. package/dist/src/classes/components/UserSelectMenu.d.ts.map +1 -0
  133. package/dist/src/classes/components/UserSelectMenu.js +20 -0
  134. package/dist/src/classes/components/UserSelectMenu.js.map +1 -0
  135. package/dist/src/errors/BaseError.d.ts +3 -0
  136. package/dist/src/errors/BaseError.d.ts.map +1 -0
  137. package/dist/src/errors/BaseError.js +3 -0
  138. package/dist/src/errors/BaseError.js.map +1 -0
  139. package/dist/src/errors/DiscordError.d.ts +25 -0
  140. package/dist/src/errors/DiscordError.d.ts.map +1 -0
  141. package/dist/src/errors/DiscordError.js +31 -0
  142. package/dist/src/errors/DiscordError.js.map +1 -0
  143. package/dist/src/errors/RatelimitError.d.ts +15 -0
  144. package/dist/src/errors/RatelimitError.d.ts.map +1 -0
  145. package/dist/src/errors/RatelimitError.js +18 -0
  146. package/dist/src/errors/RatelimitError.js.map +1 -0
  147. package/dist/src/{factories → functions}/channelFactory.d.ts +3 -2
  148. package/dist/src/functions/channelFactory.d.ts.map +1 -0
  149. package/dist/src/functions/channelFactory.js.map +1 -0
  150. package/dist/src/functions/enforceChoicesLimit.d.ts +3 -0
  151. package/dist/src/functions/enforceChoicesLimit.d.ts.map +1 -0
  152. package/dist/src/functions/enforceChoicesLimit.js +17 -0
  153. package/dist/src/functions/enforceChoicesLimit.js.map +1 -0
  154. package/dist/src/functions/errorsMapper.d.ts +14 -0
  155. package/dist/src/functions/errorsMapper.d.ts.map +1 -0
  156. package/dist/src/functions/errorsMapper.js +46 -0
  157. package/dist/src/functions/errorsMapper.js.map +1 -0
  158. package/dist/src/index.d.ts +29 -63
  159. package/dist/src/index.d.ts.map +1 -1
  160. package/dist/src/index.js +31 -15
  161. package/dist/src/index.js.map +1 -1
  162. package/dist/src/internals/AutocompleteInteraction.d.ts +15 -5
  163. package/dist/src/internals/AutocompleteInteraction.d.ts.map +1 -1
  164. package/dist/src/internals/AutocompleteInteraction.js +27 -15
  165. package/dist/src/internals/AutocompleteInteraction.js.map +1 -1
  166. package/dist/src/internals/ButtonInteraction.d.ts +0 -1
  167. package/dist/src/internals/ButtonInteraction.d.ts.map +1 -1
  168. package/dist/src/internals/ButtonInteraction.js +0 -2
  169. package/dist/src/internals/ButtonInteraction.js.map +1 -1
  170. package/dist/src/internals/CommandHandler.d.ts +1 -1
  171. package/dist/src/internals/CommandHandler.d.ts.map +1 -1
  172. package/dist/src/internals/CommandHandler.js +25 -3
  173. package/dist/src/internals/CommandHandler.js.map +1 -1
  174. package/dist/src/internals/CommandInteraction.d.ts +7 -1
  175. package/dist/src/internals/CommandInteraction.d.ts.map +1 -1
  176. package/dist/src/internals/CommandInteraction.js +10 -4
  177. package/dist/src/internals/CommandInteraction.js.map +1 -1
  178. package/dist/src/internals/ComponentHandler.d.ts +8 -5
  179. package/dist/src/internals/ComponentHandler.d.ts.map +1 -1
  180. package/dist/src/internals/ComponentHandler.js +40 -16
  181. package/dist/src/internals/ComponentHandler.js.map +1 -1
  182. package/dist/src/internals/EventHandler.d.ts +7 -5
  183. package/dist/src/internals/EventHandler.d.ts.map +1 -1
  184. package/dist/src/internals/EventHandler.js +13 -11
  185. package/dist/src/internals/EventHandler.js.map +1 -1
  186. package/dist/src/internals/ModalHandler.d.ts +1 -1
  187. package/dist/src/internals/ModalHandler.d.ts.map +1 -1
  188. package/dist/src/internals/ModalHandler.js +6 -2
  189. package/dist/src/internals/ModalHandler.js.map +1 -1
  190. package/dist/src/internals/ModalInteraction.d.ts +2 -3
  191. package/dist/src/internals/ModalInteraction.d.ts.map +1 -1
  192. package/dist/src/internals/ModalInteraction.js +3 -4
  193. package/dist/src/internals/ModalInteraction.js.map +1 -1
  194. package/dist/src/internals/OptionsHandler.d.ts +13 -3
  195. package/dist/src/internals/OptionsHandler.d.ts.map +1 -1
  196. package/dist/src/internals/OptionsHandler.js +51 -1
  197. package/dist/src/internals/OptionsHandler.js.map +1 -1
  198. package/dist/src/permissions.d.ts +54 -0
  199. package/dist/src/permissions.d.ts.map +1 -0
  200. package/dist/src/permissions.js +4 -0
  201. package/dist/src/permissions.js.map +1 -0
  202. package/dist/src/plugins/command-data/CommandDataPlugin.d.ts +16 -0
  203. package/dist/src/plugins/command-data/CommandDataPlugin.d.ts.map +1 -0
  204. package/dist/src/plugins/command-data/CommandDataPlugin.js +46 -0
  205. package/dist/src/plugins/command-data/CommandDataPlugin.js.map +1 -0
  206. package/dist/src/plugins/command-data/index.d.ts +2 -0
  207. package/dist/src/plugins/command-data/index.d.ts.map +1 -0
  208. package/dist/src/plugins/command-data/index.js +2 -0
  209. package/dist/src/plugins/command-data/index.js.map +1 -0
  210. package/dist/src/plugins/gateway/GatewayPlugin.d.ts +41 -0
  211. package/dist/src/plugins/gateway/GatewayPlugin.d.ts.map +1 -0
  212. package/dist/src/plugins/gateway/GatewayPlugin.js +282 -0
  213. package/dist/src/plugins/gateway/GatewayPlugin.js.map +1 -0
  214. package/dist/src/plugins/gateway/index.d.ts +6 -0
  215. package/dist/src/plugins/gateway/index.d.ts.map +1 -0
  216. package/dist/src/plugins/gateway/index.js +6 -0
  217. package/dist/src/plugins/gateway/index.js.map +1 -0
  218. package/dist/src/plugins/gateway/types.d.ts +62 -0
  219. package/dist/src/plugins/gateway/types.d.ts.map +1 -0
  220. package/dist/src/plugins/gateway/types.js +5 -0
  221. package/dist/src/plugins/gateway/types.js.map +1 -0
  222. package/dist/src/plugins/gateway/utils/heartbeat.d.ts +17 -0
  223. package/dist/src/plugins/gateway/utils/heartbeat.d.ts.map +1 -0
  224. package/dist/src/plugins/gateway/utils/heartbeat.js +28 -0
  225. package/dist/src/plugins/gateway/utils/heartbeat.js.map +1 -0
  226. package/dist/src/plugins/gateway/utils/monitor.d.ts +37 -0
  227. package/dist/src/plugins/gateway/utils/monitor.d.ts.map +1 -0
  228. package/dist/src/plugins/gateway/utils/monitor.js +88 -0
  229. package/dist/src/plugins/gateway/utils/monitor.js.map +1 -0
  230. package/dist/src/plugins/gateway/utils/payload.d.ts +22 -0
  231. package/dist/src/plugins/gateway/utils/payload.d.ts.map +1 -0
  232. package/dist/src/plugins/gateway/utils/payload.js +47 -0
  233. package/dist/src/plugins/gateway/utils/payload.js.map +1 -0
  234. package/dist/src/plugins/gateway-forwarder/GatewayForwarderPlugin.d.ts +26 -0
  235. package/dist/src/plugins/gateway-forwarder/GatewayForwarderPlugin.d.ts.map +1 -0
  236. package/dist/src/plugins/gateway-forwarder/GatewayForwarderPlugin.js +74 -0
  237. package/dist/src/plugins/gateway-forwarder/GatewayForwarderPlugin.js.map +1 -0
  238. package/dist/src/plugins/gateway-forwarder/ShardedGatewayForwarderPlugin.d.ts +9 -0
  239. package/dist/src/plugins/gateway-forwarder/ShardedGatewayForwarderPlugin.d.ts.map +1 -0
  240. package/dist/src/plugins/gateway-forwarder/ShardedGatewayForwarderPlugin.js +10 -0
  241. package/dist/src/plugins/gateway-forwarder/ShardedGatewayForwarderPlugin.js.map +1 -0
  242. package/dist/src/plugins/gateway-forwarder/index.d.ts +4 -0
  243. package/dist/src/plugins/gateway-forwarder/index.d.ts.map +1 -0
  244. package/dist/src/plugins/gateway-forwarder/index.js +4 -0
  245. package/dist/src/plugins/gateway-forwarder/index.js.map +1 -0
  246. package/dist/src/plugins/linked-roles/LinkedRoles.d.ts +1 -0
  247. package/dist/src/plugins/linked-roles/LinkedRoles.d.ts.map +1 -1
  248. package/dist/src/plugins/linked-roles/LinkedRoles.js +1 -0
  249. package/dist/src/plugins/linked-roles/LinkedRoles.js.map +1 -1
  250. package/dist/src/plugins/paginator/Paginator.d.ts +51 -0
  251. package/dist/src/plugins/paginator/Paginator.d.ts.map +1 -0
  252. package/dist/src/plugins/paginator/Paginator.js +155 -0
  253. package/dist/src/plugins/paginator/Paginator.js.map +1 -0
  254. package/dist/src/plugins/paginator/index.d.ts +8 -0
  255. package/dist/src/plugins/paginator/index.d.ts.map +1 -0
  256. package/dist/src/plugins/paginator/index.js +8 -0
  257. package/dist/src/plugins/paginator/index.js.map +1 -0
  258. package/dist/src/plugins/sharding/ShardingPlugin.d.ts +43 -0
  259. package/dist/src/plugins/sharding/ShardingPlugin.d.ts.map +1 -0
  260. package/dist/src/plugins/sharding/ShardingPlugin.js +111 -0
  261. package/dist/src/plugins/sharding/ShardingPlugin.js.map +1 -0
  262. package/dist/src/plugins/sharding/index.d.ts +3 -0
  263. package/dist/src/plugins/sharding/index.d.ts.map +1 -0
  264. package/dist/src/plugins/sharding/index.js +3 -0
  265. package/dist/src/plugins/sharding/index.js.map +1 -0
  266. package/dist/src/structures/DmChannel.d.ts +3 -3
  267. package/dist/src/structures/DmChannel.d.ts.map +1 -1
  268. package/dist/src/structures/DmChannel.js +5 -3
  269. package/dist/src/structures/DmChannel.js.map +1 -1
  270. package/dist/src/structures/GroupDmChannel.d.ts +1 -1
  271. package/dist/src/structures/GroupDmChannel.d.ts.map +1 -1
  272. package/dist/src/structures/Guild.d.ts +186 -6
  273. package/dist/src/structures/Guild.d.ts.map +1 -1
  274. package/dist/src/structures/Guild.js +409 -13
  275. package/dist/src/structures/Guild.js.map +1 -1
  276. package/dist/src/structures/GuildCategoryChannel.d.ts +1 -1
  277. package/dist/src/structures/GuildCategoryChannel.d.ts.map +1 -1
  278. package/dist/src/structures/GuildForumChannel.d.ts +1 -1
  279. package/dist/src/structures/GuildForumChannel.d.ts.map +1 -1
  280. package/dist/src/structures/GuildMember.d.ts +15 -12
  281. package/dist/src/structures/GuildMember.d.ts.map +1 -1
  282. package/dist/src/structures/GuildMember.js +78 -19
  283. package/dist/src/structures/GuildMember.js.map +1 -1
  284. package/dist/src/structures/GuildStageOrVoiceChannel.d.ts +1 -1
  285. package/dist/src/structures/GuildStageOrVoiceChannel.d.ts.map +1 -1
  286. package/dist/src/structures/GuildTextChannel.d.ts +1 -1
  287. package/dist/src/structures/GuildTextChannel.d.ts.map +1 -1
  288. package/dist/src/structures/GuildThreadChannel.d.ts +1 -1
  289. package/dist/src/structures/GuildThreadChannel.d.ts.map +1 -1
  290. package/dist/src/structures/Message.d.ts +31 -14
  291. package/dist/src/structures/Message.d.ts.map +1 -1
  292. package/dist/src/structures/Message.js +126 -17
  293. package/dist/src/structures/Message.js.map +1 -1
  294. package/dist/src/structures/Poll.d.ts +25 -0
  295. package/dist/src/structures/Poll.d.ts.map +1 -0
  296. package/dist/src/structures/Poll.js +45 -0
  297. package/dist/src/structures/Poll.js.map +1 -0
  298. package/dist/src/structures/Role.d.ts +31 -13
  299. package/dist/src/structures/Role.d.ts.map +1 -1
  300. package/dist/src/structures/Role.js +50 -21
  301. package/dist/src/structures/Role.js.map +1 -1
  302. package/dist/src/structures/ThreadMember.d.ts +36 -0
  303. package/dist/src/structures/ThreadMember.d.ts.map +1 -0
  304. package/dist/src/structures/ThreadMember.js +72 -0
  305. package/dist/src/structures/ThreadMember.js.map +1 -0
  306. package/dist/src/structures/User.d.ts +10 -4
  307. package/dist/src/structures/User.d.ts.map +1 -1
  308. package/dist/src/structures/User.js +10 -1
  309. package/dist/src/structures/User.js.map +1 -1
  310. package/dist/src/structures/Webhook.d.ts +135 -0
  311. package/dist/src/structures/Webhook.d.ts.map +1 -0
  312. package/dist/src/structures/Webhook.js +239 -0
  313. package/dist/src/structures/Webhook.js.map +1 -0
  314. package/dist/src/types/index.d.ts +132 -0
  315. package/dist/src/types/index.d.ts.map +1 -0
  316. package/dist/src/types/index.js +2 -0
  317. package/dist/src/types/index.js.map +1 -0
  318. package/dist/src/types/listeners.d.ts +566 -0
  319. package/dist/src/types/listeners.d.ts.map +1 -0
  320. package/dist/src/types/listeners.js +12 -0
  321. package/dist/src/types/listeners.js.map +1 -0
  322. package/dist/src/utils/customIdParser.d.ts +3 -0
  323. package/dist/src/utils/customIdParser.d.ts.map +1 -0
  324. package/dist/src/utils/customIdParser.js +17 -0
  325. package/dist/src/utils/customIdParser.js.map +1 -0
  326. package/dist/src/utils/index.d.ts +4 -0
  327. package/dist/src/utils/index.d.ts.map +1 -0
  328. package/dist/src/utils/index.js +4 -0
  329. package/dist/src/utils/index.js.map +1 -0
  330. package/dist/src/utils/payload.d.ts +4 -0
  331. package/dist/src/utils/payload.d.ts.map +1 -0
  332. package/dist/src/utils/payload.js +45 -0
  333. package/dist/src/utils/payload.js.map +1 -0
  334. package/dist/src/utils/verification.d.ts +4 -0
  335. package/dist/src/utils/verification.d.ts.map +1 -0
  336. package/dist/src/{utils.js → utils/verification.js} +1 -26
  337. package/dist/src/utils/verification.js.map +1 -0
  338. package/dist/tsconfig.tsbuildinfo +1 -1
  339. package/package.json +8 -7
  340. package/dist/src/adapters/cloudflare/index.d.ts +0 -16
  341. package/dist/src/adapters/cloudflare/index.d.ts.map +0 -1
  342. package/dist/src/adapters/cloudflare/index.js +0 -17
  343. package/dist/src/adapters/cloudflare/index.js.map +0 -1
  344. package/dist/src/adapters/next/index.d.ts +0 -14
  345. package/dist/src/adapters/next/index.d.ts.map +0 -1
  346. package/dist/src/adapters/next/index.js +0 -17
  347. package/dist/src/adapters/next/index.js.map +0 -1
  348. package/dist/src/adapters/shared.d.ts +0 -10
  349. package/dist/src/adapters/shared.d.ts.map +0 -1
  350. package/dist/src/adapters/shared.js +0 -2
  351. package/dist/src/adapters/shared.js.map +0 -1
  352. package/dist/src/classes/Button.d.ts.map +0 -1
  353. package/dist/src/classes/Button.js.map +0 -1
  354. package/dist/src/classes/ChannelSelectMenu.d.ts.map +0 -1
  355. package/dist/src/classes/ChannelSelectMenu.js.map +0 -1
  356. package/dist/src/classes/MentionableSelectMenu.d.ts.map +0 -1
  357. package/dist/src/classes/MentionableSelectMenu.js.map +0 -1
  358. package/dist/src/classes/RoleSelectMenu.d.ts.map +0 -1
  359. package/dist/src/classes/RoleSelectMenu.js +0 -13
  360. package/dist/src/classes/RoleSelectMenu.js.map +0 -1
  361. package/dist/src/classes/Row.d.ts +0 -25
  362. package/dist/src/classes/Row.d.ts.map +0 -1
  363. package/dist/src/classes/Row.js.map +0 -1
  364. package/dist/src/classes/StringSelectMenu.d.ts +0 -13
  365. package/dist/src/classes/StringSelectMenu.d.ts.map +0 -1
  366. package/dist/src/classes/StringSelectMenu.js +0 -12
  367. package/dist/src/classes/StringSelectMenu.js.map +0 -1
  368. package/dist/src/classes/TextInput.d.ts.map +0 -1
  369. package/dist/src/classes/TextInput.js.map +0 -1
  370. package/dist/src/classes/UserSelectMenu.d.ts.map +0 -1
  371. package/dist/src/classes/UserSelectMenu.js +0 -13
  372. package/dist/src/classes/UserSelectMenu.js.map +0 -1
  373. package/dist/src/createHandle.d.ts +0 -20
  374. package/dist/src/createHandle.d.ts.map +0 -1
  375. package/dist/src/createHandle.js +0 -57
  376. package/dist/src/createHandle.js.map +0 -1
  377. package/dist/src/factories/channelFactory.d.ts.map +0 -1
  378. package/dist/src/factories/channelFactory.js.map +0 -1
  379. package/dist/src/types/messagePayload.d.ts +0 -37
  380. package/dist/src/types/messagePayload.d.ts.map +0 -1
  381. package/dist/src/types/messagePayload.js +0 -2
  382. package/dist/src/types/messagePayload.js.map +0 -1
  383. package/dist/src/types.d.ts +0 -38
  384. package/dist/src/types.d.ts.map +0 -1
  385. package/dist/src/types.js +0 -2
  386. package/dist/src/types.js.map +0 -1
  387. package/dist/src/utils.d.ts +0 -27
  388. package/dist/src/utils.d.ts.map +0 -1
  389. package/dist/src/utils.js.map +0 -1
  390. /package/dist/src/{factories → functions}/channelFactory.js +0 -0
@@ -0,0 +1,155 @@
1
+ import { ButtonStyle } from "discord-api-types/v10";
2
+ import { Button } from "../../classes/components/Button.js";
3
+ import { Row } from "../../classes/components/Row.js";
4
+ export class Paginator {
5
+ pages;
6
+ id;
7
+ currentPage = 0;
8
+ timeout = null;
9
+ timeoutDuration;
10
+ /**
11
+ * The user ID who is allowed to interact with the paginator
12
+ */
13
+ userId;
14
+ constructor(
15
+ /**
16
+ * The pages to display in the paginator, with no limit on the amount of pages
17
+ */
18
+ pages, {
19
+ /**
20
+ * The client to use for the paginator
21
+ */
22
+ client,
23
+ /**
24
+ * How long in milliseconds the paginator will wait before disabling the buttons
25
+ * @default 300000 (5 minutes)
26
+ */
27
+ timeoutDuration = 300000,
28
+ /**
29
+ * The user ID who is allowed to interact with the paginator
30
+ */
31
+ userId }) {
32
+ if (pages.length === 0) {
33
+ throw new Error("Paginator must have at least one page");
34
+ }
35
+ this.pages = pages;
36
+ this.timeoutDuration = timeoutDuration;
37
+ this.userId = userId;
38
+ const timestamp = Date.now().toString(36);
39
+ const random = Math.random().toString(36).slice(2, 5);
40
+ this.id = `${timestamp}-${random}`;
41
+ client.paginators.push(this);
42
+ this.startTimeout();
43
+ }
44
+ startTimeout() {
45
+ if (this.timeout) {
46
+ clearTimeout(this.timeout);
47
+ }
48
+ this.timeout = setTimeout(() => {
49
+ this.disableButtons();
50
+ }, this.timeoutDuration);
51
+ }
52
+ disableButtons() {
53
+ const page = this.getCurrentPage();
54
+ if (!page.components)
55
+ return;
56
+ const row = this.createNavigationButtons();
57
+ for (const component of row.components) {
58
+ if ("disabled" in component) {
59
+ component.disabled = true;
60
+ }
61
+ }
62
+ const otherComponents = page.components.slice(0, -1);
63
+ page.components = [...otherComponents, row];
64
+ }
65
+ destroy() {
66
+ if (this.timeout) {
67
+ clearTimeout(this.timeout);
68
+ this.timeout = null;
69
+ }
70
+ }
71
+ getCurrentPage() {
72
+ const page = this.pages[this.currentPage];
73
+ if (!page)
74
+ throw new Error("Invalid page index");
75
+ return page;
76
+ }
77
+ async goToPage(pageIndex, interaction) {
78
+ if (pageIndex < 0 || pageIndex >= this.pages.length) {
79
+ return interaction.reply({
80
+ content: "Invalid page number"
81
+ });
82
+ }
83
+ this.currentPage = pageIndex;
84
+ this.startTimeout();
85
+ await interaction.update(this.getCurrentPageWithButtons());
86
+ }
87
+ createNavigationButtons(disabled = false) {
88
+ const backButton = new DirectionButton({
89
+ paginatorId: this.id,
90
+ goToPage: this.currentPage - 1,
91
+ disabled: disabled || this.currentPage === 0,
92
+ label: "Back"
93
+ });
94
+ const pageNumber = new (class extends Button {
95
+ label;
96
+ customId = "x-pageNumber";
97
+ style = ButtonStyle.Secondary;
98
+ disabled = true;
99
+ constructor(currentPage, totalPages) {
100
+ super();
101
+ this.label = `${currentPage + 1} / ${totalPages}`;
102
+ }
103
+ async run() { }
104
+ })(this.currentPage, this.pages.length);
105
+ const nextButton = new DirectionButton({
106
+ paginatorId: this.id,
107
+ goToPage: this.currentPage + 1,
108
+ disabled: disabled || this.currentPage === this.pages.length - 1,
109
+ label: "Next"
110
+ });
111
+ return new Row([backButton, pageNumber, nextButton]);
112
+ }
113
+ getCurrentPageWithButtons() {
114
+ const page = this.getCurrentPage();
115
+ return {
116
+ ...page,
117
+ components: [...(page.components || []), this.createNavigationButtons()]
118
+ };
119
+ }
120
+ getInitialPage() {
121
+ return this.getCurrentPageWithButtons();
122
+ }
123
+ /**
124
+ * Sends the paginator message using the provided interaction
125
+ * @param interaction The interaction to use for sending the message
126
+ */
127
+ async send(interaction) {
128
+ await interaction.reply(this.getInitialPage());
129
+ }
130
+ }
131
+ class DirectionButton extends Button {
132
+ label;
133
+ customId;
134
+ style = ButtonStyle.Secondary;
135
+ disabled = false;
136
+ constructor({ paginatorId, goToPage, disabled, label }) {
137
+ super();
138
+ this.customId = `paginator:paginatorId=${paginatorId};goToPage=${goToPage}`;
139
+ this.label = label;
140
+ this.disabled = disabled;
141
+ }
142
+ async run(interaction, data) {
143
+ const paginatorId = data.paginatorId;
144
+ const goToPage = Number.parseInt(`${data.goToPage}`);
145
+ const paginator = interaction.client.paginators.find((p) => p.id === paginatorId);
146
+ if (!paginator)
147
+ return interaction.reply({
148
+ content: `Paginator ${paginatorId} not found in memory`
149
+ });
150
+ if (paginator.userId && paginator.userId !== interaction.user?.id)
151
+ return interaction.acknowledge();
152
+ await paginator.goToPage(goToPage, interaction);
153
+ }
154
+ }
155
+ //# sourceMappingURL=Paginator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Paginator.js","sourceRoot":"","sources":["../../../../src/plugins/paginator/Paginator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAEnD,OAAO,EAAE,MAAM,EAAE,MAAM,oCAAoC,CAAA;AAC3D,OAAO,EAAE,GAAG,EAAE,MAAM,iCAAiC,CAAA;AAMrD,MAAM,OAAO,SAAS;IACZ,KAAK,CAAwB;IAC7B,EAAE,CAAQ;IACT,WAAW,GAAG,CAAC,CAAA;IACjB,OAAO,GAA0B,IAAI,CAAA;IAC5B,eAAe,CAAQ;IAExC;;OAEG;IACM,MAAM,CAAS;IAExB;IACC;;OAEG;IACH,KAAwB,EACxB;IACC;;OAEG;IACH,MAAM;IACN;;;OAGG;IACH,eAAe,GAAG,MAAM;IACxB;;OAEG;IACH,MAAM,EACyD;QAEhE,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACxB,MAAM,IAAI,KAAK,CAAC,uCAAuC,CAAC,CAAA;QACzD,CAAC;QACD,IAAI,CAAC,KAAK,GAAG,KAAK,CAAA;QAClB,IAAI,CAAC,eAAe,GAAG,eAAe,CAAA;QACtC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;QACpB,MAAM,SAAS,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAA;QACzC,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;QACrD,IAAI,CAAC,EAAE,GAAG,GAAG,SAAS,IAAI,MAAM,EAAE,CAAA;QAClC,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,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GAAG,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAA;QACpD,MAAM,SAAS,GAAG,WAAW,CAAC,MAAM,CAAC,UAAU,CAAC,IAAI,CACnD,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,WAAW,CAC3B,CAAA;QACD,IAAI,CAAC,SAAS;YACb,OAAO,WAAW,CAAC,KAAK,CAAC;gBACxB,OAAO,EAAE,aAAa,WAAW,sBAAsB;aACvD,CAAC,CAAA;QACH,IAAI,SAAS,CAAC,MAAM,IAAI,SAAS,CAAC,MAAM,KAAK,WAAW,CAAC,IAAI,EAAE,EAAE;YAChE,OAAO,WAAW,CAAC,WAAW,EAAE,CAAA;QACjC,MAAM,SAAS,CAAC,QAAQ,CAAC,QAAQ,EAAE,WAAW,CAAC,CAAA;IAChD,CAAC;CACD"}
@@ -0,0 +1,8 @@
1
+ declare module "../../classes/Client.js" {
2
+ interface Client {
3
+ paginators: Paginator[];
4
+ }
5
+ }
6
+ import { Paginator } from "./Paginator.js";
7
+ export { Paginator };
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/plugins/paginator/index.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,yBAAyB,CAAC;IACxC,UAAU,MAAM;QACf,UAAU,EAAE,SAAS,EAAE,CAAA;KACvB;CACD;AAGD,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAO1C,OAAO,EAAE,SAAS,EAAE,CAAA"}
@@ -0,0 +1,8 @@
1
+ import { Client } from "../../classes/Client.js";
2
+ import { Paginator } from "./Paginator.js";
3
+ Object.assign(Client.prototype, {
4
+ Paginator,
5
+ paginators: []
6
+ });
7
+ export { Paginator };
8
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/plugins/paginator/index.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAA;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAE1C,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,SAAS,EAAE;IAC/B,SAAS;IACT,UAAU,EAAE,EAAiB;CAC7B,CAAC,CAAA;AAEF,OAAO,EAAE,SAAS,EAAE,CAAA"}
@@ -0,0 +1,43 @@
1
+ import type { APIGatewayBotInfo } from "discord-api-types/v10";
2
+ import { Plugin } from "../../abstracts/Plugin.js";
3
+ import type { Client } from "../../classes/Client.js";
4
+ import { GatewayPlugin } from "../gateway/GatewayPlugin.js";
5
+ import type { GatewayPluginOptions } from "../gateway/types.js";
6
+ export interface ShardingPluginOptions extends Omit<GatewayPluginOptions, "shard"> {
7
+ /**
8
+ * If not provided, will use Discord's recommended amount
9
+ */
10
+ totalShards?: number;
11
+ /**
12
+ * Specific shard IDs to spawn, if not provided will spawn all shards
13
+ */
14
+ shardIds?: number[];
15
+ /**
16
+ * Maximum number of shards to spawn concurrently
17
+ */
18
+ maxConcurrency?: number;
19
+ }
20
+ export declare class ShardingPlugin extends Plugin {
21
+ readonly id = "sharding";
22
+ protected client?: Client;
23
+ readonly shards: Map<number, GatewayPlugin>;
24
+ readonly config: ShardingPluginOptions;
25
+ protected maxConcurrency: number;
26
+ protected spawnQueue: number[];
27
+ protected spawning: boolean;
28
+ protected gatewayInfo?: APIGatewayBotInfo;
29
+ customGatewayPlugin: typeof GatewayPlugin;
30
+ constructor(options: ShardingPluginOptions);
31
+ registerClient(client: Client): Promise<void>;
32
+ protected processSpawnQueue(): Promise<void>;
33
+ disconnect(): void;
34
+ /**
35
+ * Calculate which shard a guild belongs to
36
+ */
37
+ getShardForGuild(guildId: string): GatewayPlugin | undefined;
38
+ /**
39
+ * Discord's sharding formula
40
+ */
41
+ protected calculateShardId(guildId: string, totalShards: number): number;
42
+ }
43
+ //# sourceMappingURL=ShardingPlugin.d.ts.map
@@ -0,0 +1 @@
1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C,OAAO,EAAE,MAAM,GAAG,aAAa,GAAG,SAAS;IAQnE;;OAEG;IACH,SAAS,CAAC,gBAAgB,CAAC,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,MAAM;CAMxE"}
@@ -0,0 +1,111 @@
1
+ import { Plugin } from "../../abstracts/Plugin.js";
2
+ import { GatewayPlugin } from "../gateway/GatewayPlugin.js";
3
+ export class ShardingPlugin extends Plugin {
4
+ id = "sharding";
5
+ client;
6
+ shards = new Map();
7
+ config;
8
+ maxConcurrency;
9
+ spawnQueue = [];
10
+ spawning = false;
11
+ gatewayInfo;
12
+ customGatewayPlugin = GatewayPlugin;
13
+ constructor(options) {
14
+ super();
15
+ this.config = options;
16
+ this.maxConcurrency = options.maxConcurrency ?? 1;
17
+ }
18
+ async registerClient(client) {
19
+ this.client = client;
20
+ // If totalShards not provided, get recommended amount from Discord
21
+ if (!this.config.totalShards) {
22
+ try {
23
+ const response = await fetch("https://discord.com/api/v10/gateway/bot", {
24
+ headers: {
25
+ Authorization: `Bot ${client.options.token}`
26
+ }
27
+ });
28
+ const gatewayInfo = (await response.json());
29
+ this.config.totalShards = gatewayInfo.shards;
30
+ if (!this.config.url) {
31
+ this.config.url = gatewayInfo.url;
32
+ }
33
+ this.maxConcurrency = gatewayInfo.session_start_limit.max_concurrency;
34
+ this.gatewayInfo = gatewayInfo;
35
+ }
36
+ catch {
37
+ throw new Error("Failed to get recommended shard count from Discord");
38
+ }
39
+ }
40
+ const totalShards = this.config.totalShards;
41
+ if (!totalShards) {
42
+ throw new Error("Total shards must be specified or retrievable from Discord");
43
+ }
44
+ // Determine which shards to spawn
45
+ const shardsToSpawn = this.config.shardIds ?? Array.from({ length: totalShards }, (_, i) => i);
46
+ // Queue all shards for spawning
47
+ this.spawnQueue = [...shardsToSpawn];
48
+ await this.processSpawnQueue();
49
+ }
50
+ async processSpawnQueue() {
51
+ if (this.spawning || this.spawnQueue.length === 0)
52
+ return;
53
+ this.spawning = true;
54
+ const currentBatch = [];
55
+ // Process shards in batches based on maxConcurrency
56
+ while (currentBatch.length < this.maxConcurrency &&
57
+ this.spawnQueue.length > 0) {
58
+ const shardId = this.spawnQueue.shift();
59
+ if (shardId !== undefined) {
60
+ currentBatch.push(shardId);
61
+ }
62
+ }
63
+ const totalShards = this.config.totalShards;
64
+ if (!totalShards)
65
+ return;
66
+ // Spawn the current batch of shards
67
+ await Promise.all(currentBatch.map(async (shardId) => {
68
+ const shard = new this.customGatewayPlugin({
69
+ ...this.config,
70
+ shard: [shardId, totalShards]
71
+ }, this.gatewayInfo);
72
+ if (this.client) {
73
+ shard.registerClient(this.client);
74
+ }
75
+ this.shards.set(shardId, shard);
76
+ }));
77
+ this.spawning = false;
78
+ // Continue processing if there are more shards to spawn
79
+ if (this.spawnQueue.length > 0) {
80
+ // Add a delay between batches to prevent rate limiting
81
+ setTimeout(() => this.processSpawnQueue(), 5000);
82
+ }
83
+ }
84
+ disconnect() {
85
+ for (const shard of this.shards.values()) {
86
+ shard.disconnect();
87
+ }
88
+ this.shards.clear();
89
+ this.spawnQueue = [];
90
+ }
91
+ /**
92
+ * Calculate which shard a guild belongs to
93
+ */
94
+ getShardForGuild(guildId) {
95
+ const totalShards = this.config.totalShards;
96
+ if (!totalShards)
97
+ return undefined;
98
+ const shardId = this.calculateShardId(guildId, totalShards);
99
+ return this.shards.get(shardId);
100
+ }
101
+ /**
102
+ * Discord's sharding formula
103
+ */
104
+ calculateShardId(guildId, totalShards) {
105
+ if (!/^\d+$/.test(guildId)) {
106
+ throw new Error("Invalid guild ID");
107
+ }
108
+ return Number((BigInt(guildId) >> 22n) % BigInt(totalShards));
109
+ }
110
+ }
111
+ //# sourceMappingURL=ShardingPlugin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ShardingPlugin.js","sourceRoot":"","sources":["../../../../src/plugins/sharding/ShardingPlugin.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAA;AAElD,OAAO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AChC,CAAC;IAED;;OAEG;IACO,gBAAgB,CAAC,OAAe,EAAE,WAAmB;QAC9D,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC;YAC5B,MAAM,IAAI,KAAK,CAAC,kBAAkB,CAAC,CAAA;QACpC,CAAC;QACD,OAAO,MAAM,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,GAAG,CAAC,GAAG,MAAM,CAAC,WAAW,CAAC,CAAC,CAAA;IAC9D,CAAC;CACD"}
@@ -0,0 +1,3 @@
1
+ export * from "./ShardingPlugin.js";
2
+ export * from "../gateway/types.js";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/plugins/sharding/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAA;AACnC,cAAc,qBAAqB,CAAA"}
@@ -0,0 +1,3 @@
1
+ export * from "./ShardingPlugin.js";
2
+ export * from "../gateway/types.js";
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/plugins/sharding/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAA;AACnC,cAAc,qBAAqB,CAAA"}
@@ -1,7 +1,7 @@
1
1
  import { type APIDMChannel, type ChannelType } from "discord-api-types/v10";
2
2
  import { BaseChannel } from "../abstracts/BaseChannel.js";
3
- import type { MessagePayload } from "../types.js";
4
- import { type IfPartial } from "../utils.js";
3
+ import type { IfPartial, MessagePayload } from "../types/index.js";
4
+ import { Message } from "./Message.js";
5
5
  /**
6
6
  * Represents a DM between two users.
7
7
  */
@@ -14,6 +14,6 @@ export declare class DmChannel<IsPartial extends boolean = false> extends BaseCh
14
14
  /**
15
15
  * Send a message to the channel
16
16
  */
17
- send(message: MessagePayload): Promise<void>;
17
+ send(message: MessagePayload): Promise<Message<false>>;
18
18
  }
19
19
  //# sourceMappingURL=DmChannel.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"DmChannel.d.ts","sourceRoot":"","sources":["../../../src/structures/DmChannel.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,KAAK,YAAY,EACjB,KAAK,WAAW,EAEhB,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAA;AACzD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AACjD,OAAO,EAAE,KAAK,SAAS,EAAoB,MAAM,aAAa,CAAA;AAE9D;;GAEG;AACH,qBAAa,SAAS,CAAC,SAAS,SAAS,OAAO,GAAG,KAAK,CAAE,SAAQ,WAAW,CAC5E,WAAW,CAAC,EAAE,EACd,SAAS,CACT;IACQ,OAAO,EAAE,YAAY,GAAG,IAAI,CAAA;IAEpC;;OAEG;IACH,IAAI,IAAI,IAAI,SAAS,CAAC,SAAS,EAAE,IAAI,CAAC,CAGrC;IAED;;OAEG;IACG,IAAI,CAAC,OAAO,EAAE,cAAc;CAKlC"}
1
+ {"version":3,"file":"DmChannel.d.ts","sourceRoot":"","sources":["../../../src/structures/DmChannel.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,KAAK,YAAY,EACjB,KAAK,WAAW,EAEhB,MAAM,uBAAuB,CAAA;AAE9B,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAA;AACzD,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAElE,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AACtC;;GAEG;AACH,qBAAa,SAAS,CAAC,SAAS,SAAS,OAAO,GAAG,KAAK,CAAE,SAAQ,WAAW,CAC5E,WAAW,CAAC,EAAE,EACd,SAAS,CACT;IACQ,OAAO,EAAE,YAAY,GAAG,IAAI,CAAA;IAEpC;;OAEG;IACH,IAAI,IAAI,IAAI,SAAS,CAAC,SAAS,EAAE,IAAI,CAAC,CAGrC;IAED;;OAEG;IACG,IAAI,CAAC,OAAO,EAAE,cAAc;CAMlC"}
@@ -1,6 +1,7 @@
1
1
  import { Routes } from "discord-api-types/v10";
2
2
  import { BaseChannel } from "../abstracts/BaseChannel.js";
3
- import { serializePayload } from "../utils.js";
3
+ import { serializePayload } from "../utils/index.js";
4
+ import { Message } from "./Message.js";
4
5
  /**
5
6
  * Represents a DM between two users.
6
7
  */
@@ -17,9 +18,10 @@ export class DmChannel extends BaseChannel {
17
18
  * Send a message to the channel
18
19
  */
19
20
  async send(message) {
20
- this.client.rest.post(Routes.channelMessages(this.id), {
21
+ const data = (await this.client.rest.post(Routes.channelMessages(this.id), {
21
22
  body: serializePayload(message)
22
- });
23
+ }));
24
+ return new Message(this.client, data);
23
25
  }
24
26
  }
25
27
  //# sourceMappingURL=DmChannel.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"DmChannel.js","sourceRoot":"","sources":["../../../src/structures/DmChannel.ts"],"names":[],"mappings":"AAAA,OAAO,EAGN,MAAM,EACN,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAA;AAEzD,OAAO,EAAkB,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAE9D;;GAEG;AACH,MAAM,OAAO,SAA6C,SAAQ,WAGjE;IAGA;;OAEG;IACH,IAAI,IAAI;QACP,IAAI,CAAC,IAAI,CAAC,OAAO;YAAE,OAAO,SAAkB,CAAA;QAC5C,OAAO,IAAI,CAAA;IACZ,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,IAAI,CAAC,OAAuB;QACjC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE;YACtD,IAAI,EAAE,gBAAgB,CAAC,OAAO,CAAC;SAC/B,CAAC,CAAA;IACH,CAAC;CACD"}
1
+ {"version":3,"file":"DmChannel.js","sourceRoot":"","sources":["../../../src/structures/DmChannel.ts"],"names":[],"mappings":"AAAA,OAAO,EAGN,MAAM,EACN,MAAM,uBAAuB,CAAA;AAE9B,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAA;AAEzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAA;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AACtC;;GAEG;AACH,MAAM,OAAO,SAA6C,SAAQ,WAGjE;IAGA;;OAEG;IACH,IAAI,IAAI;QACP,IAAI,CAAC,IAAI,CAAC,OAAO;YAAE,OAAO,SAAkB,CAAA;QAC5C,OAAO,IAAI,CAAA;IACZ,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,IAAI,CAAC,OAAuB;QACjC,MAAM,IAAI,GAAG,CAAC,MAAM,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE;YAC1E,IAAI,EAAE,gBAAgB,CAAC,OAAO,CAAC;SAC/B,CAAC,CAAe,CAAA;QACjB,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,CAAA;IACtC,CAAC;CACD"}
@@ -1,6 +1,6 @@
1
1
  import { type APIGroupDMChannel, type ChannelType } from "discord-api-types/v10";
2
2
  import { BaseChannel } from "../abstracts/BaseChannel.js";
3
- import type { IfPartial } from "../utils.js";
3
+ import type { IfPartial } from "../types/index.js";
4
4
  import { Message } from "./Message.js";
5
5
  import { User } from "./User.js";
6
6
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"GroupDmChannel.d.ts","sourceRoot":"","sources":["../../../src/structures/GroupDmChannel.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,KAAK,iBAAiB,EACtB,KAAK,WAAW,EAEhB,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAA;AACzD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM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