revbot.js 0.0.13 → 0.0.15-build-test

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 (523) hide show
  1. package/dist/chunk-35BYGFDX.js +25 -0
  2. package/dist/chunk-35BYGFDX.js.map +1 -0
  3. package/dist/chunk-3ANNOYXY.js +30 -0
  4. package/dist/chunk-3ANNOYXY.js.map +1 -0
  5. package/dist/chunk-3GLQHMWL.js +39 -0
  6. package/dist/chunk-3GLQHMWL.js.map +1 -0
  7. package/dist/chunk-43CUB3NP.js +30 -0
  8. package/dist/chunk-43CUB3NP.js.map +1 -0
  9. package/dist/chunk-55PAATU6.js +101 -0
  10. package/dist/chunk-55PAATU6.js.map +1 -0
  11. package/dist/chunk-5RK7FEID.js +47 -0
  12. package/dist/chunk-5RK7FEID.js.map +1 -0
  13. package/dist/chunk-6V6HPZ33.js +27 -0
  14. package/dist/chunk-6V6HPZ33.js.map +1 -0
  15. package/dist/chunk-6WJXGICC.js +25 -0
  16. package/dist/chunk-6WJXGICC.js.map +1 -0
  17. package/dist/chunk-7PA5MDKS.js +157 -0
  18. package/dist/chunk-7PA5MDKS.js.map +1 -0
  19. package/dist/chunk-7XUN3OQT.js +1 -0
  20. package/dist/chunk-7XUN3OQT.js.map +1 -0
  21. package/dist/chunk-AOKM5TCP.js +37 -0
  22. package/dist/chunk-AOKM5TCP.js.map +1 -0
  23. package/dist/chunk-BQS6ZLNY.js +80 -0
  24. package/dist/chunk-BQS6ZLNY.js.map +1 -0
  25. package/dist/chunk-CQ4AJZQD.js +51 -0
  26. package/dist/chunk-CQ4AJZQD.js.map +1 -0
  27. package/dist/chunk-DSM44DGO.js +156 -0
  28. package/dist/chunk-DSM44DGO.js.map +1 -0
  29. package/dist/chunk-E2P4PIDH.js +35 -0
  30. package/dist/chunk-E2P4PIDH.js.map +1 -0
  31. package/dist/chunk-EOZ7QHOH.js +151 -0
  32. package/dist/chunk-EOZ7QHOH.js.map +1 -0
  33. package/dist/chunk-FKNQEJE7.js +20 -0
  34. package/dist/chunk-FKNQEJE7.js.map +1 -0
  35. package/dist/chunk-G7DLVJKH.js +34 -0
  36. package/dist/chunk-G7DLVJKH.js.map +1 -0
  37. package/dist/chunk-GCIV7PRI.js +30 -0
  38. package/dist/chunk-GCIV7PRI.js.map +1 -0
  39. package/dist/chunk-GNQQG7EP.js +88 -0
  40. package/dist/chunk-GNQQG7EP.js.map +1 -0
  41. package/dist/chunk-H4SZEZP2.js +38 -0
  42. package/dist/chunk-H4SZEZP2.js.map +1 -0
  43. package/dist/chunk-HETUKFLM.js +7 -0
  44. package/dist/chunk-HETUKFLM.js.map +1 -0
  45. package/dist/chunk-HKLTWZSB.js +112 -0
  46. package/dist/chunk-HKLTWZSB.js.map +1 -0
  47. package/dist/chunk-ICANLKGX.js +97 -0
  48. package/dist/chunk-ICANLKGX.js.map +1 -0
  49. package/dist/chunk-J2RF7D67.js +105 -0
  50. package/dist/chunk-J2RF7D67.js.map +1 -0
  51. package/dist/chunk-K4VAG5ZU.js +16 -0
  52. package/dist/chunk-K4VAG5ZU.js.map +1 -0
  53. package/dist/chunk-LAL23AQK.js +105 -0
  54. package/dist/chunk-LAL23AQK.js.map +1 -0
  55. package/dist/chunk-LQUZ7Q7D.js +29 -0
  56. package/dist/chunk-LQUZ7Q7D.js.map +1 -0
  57. package/dist/chunk-LUDTY3LL.js +103 -0
  58. package/dist/chunk-LUDTY3LL.js.map +1 -0
  59. package/dist/chunk-LY7OFI25.js +26 -0
  60. package/dist/chunk-LY7OFI25.js.map +1 -0
  61. package/dist/chunk-MLKHJGSQ.js +68 -0
  62. package/dist/chunk-MLKHJGSQ.js.map +1 -0
  63. package/dist/chunk-MSJCRRXO.js +32 -0
  64. package/dist/chunk-MSJCRRXO.js.map +1 -0
  65. package/dist/chunk-O2IN5OZI.js +27 -0
  66. package/dist/chunk-O2IN5OZI.js.map +1 -0
  67. package/dist/chunk-OETI5C5L.js +30 -0
  68. package/dist/chunk-OETI5C5L.js.map +1 -0
  69. package/dist/chunk-OK227BBS.js +38 -0
  70. package/dist/chunk-OK227BBS.js.map +1 -0
  71. package/dist/chunk-R2PF552K.js +67 -0
  72. package/dist/chunk-R2PF552K.js.map +1 -0
  73. package/dist/chunk-RMACMP4R.js +26 -0
  74. package/dist/chunk-RMACMP4R.js.map +1 -0
  75. package/dist/chunk-SYXHGCHU.js +26 -0
  76. package/dist/chunk-SYXHGCHU.js.map +1 -0
  77. package/dist/chunk-VELIOWTX.js +25 -0
  78. package/dist/chunk-VELIOWTX.js.map +1 -0
  79. package/dist/chunk-VU3XNPDE.js +37 -0
  80. package/dist/chunk-VU3XNPDE.js.map +1 -0
  81. package/dist/chunk-W4XDXSOK.js +32 -0
  82. package/dist/chunk-W4XDXSOK.js.map +1 -0
  83. package/dist/chunk-WMWOEYVA.js +26 -0
  84. package/dist/chunk-WMWOEYVA.js.map +1 -0
  85. package/dist/chunk-X7VEORVS.js +43 -0
  86. package/dist/chunk-X7VEORVS.js.map +1 -0
  87. package/dist/chunk-XMS4UTPG.js +49 -0
  88. package/dist/chunk-XMS4UTPG.js.map +1 -0
  89. package/dist/chunk-XQEYCTYC.js +2601 -0
  90. package/dist/chunk-XQEYCTYC.js.map +1 -0
  91. package/dist/chunk-YLSAAPO4.js +79 -0
  92. package/dist/chunk-YLSAAPO4.js.map +1 -0
  93. package/dist/chunk-YXX4DJB3.js +27 -0
  94. package/dist/chunk-YXX4DJB3.js.map +1 -0
  95. package/dist/client/baseClient.cjs +799 -0
  96. package/dist/client/baseClient.cjs.map +1 -0
  97. package/dist/client/baseClient.d.cts +10 -0
  98. package/dist/client/baseClient.d.ts +10 -0
  99. package/dist/client/baseClient.js +18 -0
  100. package/dist/client/baseClient.js.map +1 -0
  101. package/dist/client/client.cjs +4286 -0
  102. package/dist/client/client.cjs.map +1 -0
  103. package/dist/client/client.d.cts +10 -0
  104. package/dist/client/client.d.ts +10 -0
  105. package/dist/client/client.js +53 -0
  106. package/dist/client/client.js.map +1 -0
  107. package/dist/client/events/bulkMessageDelete.cjs +104 -0
  108. package/dist/client/events/bulkMessageDelete.cjs.map +1 -0
  109. package/dist/client/events/bulkMessageDelete.d.cts +28 -0
  110. package/dist/client/events/bulkMessageDelete.d.ts +28 -0
  111. package/dist/client/events/bulkMessageDelete.js +11 -0
  112. package/dist/client/events/bulkMessageDelete.js.map +1 -0
  113. package/dist/client/events/channelCreate.cjs +136 -0
  114. package/dist/client/events/channelCreate.cjs.map +1 -0
  115. package/dist/client/events/channelCreate.d.cts +27 -0
  116. package/dist/client/events/channelCreate.d.ts +27 -0
  117. package/dist/client/events/channelCreate.js +11 -0
  118. package/dist/client/events/channelCreate.js.map +1 -0
  119. package/dist/client/events/channelDelete.cjs +113 -0
  120. package/dist/client/events/channelDelete.cjs.map +1 -0
  121. package/dist/client/events/channelDelete.d.cts +29 -0
  122. package/dist/client/events/channelDelete.d.ts +29 -0
  123. package/dist/client/events/channelDelete.js +11 -0
  124. package/dist/client/events/channelDelete.js.map +1 -0
  125. package/dist/client/events/channelGroupJoin.cjs +133 -0
  126. package/dist/client/events/channelGroupJoin.cjs.map +1 -0
  127. package/dist/client/events/channelGroupJoin.d.cts +30 -0
  128. package/dist/client/events/channelGroupJoin.d.ts +30 -0
  129. package/dist/client/events/channelGroupJoin.js +11 -0
  130. package/dist/client/events/channelGroupJoin.js.map +1 -0
  131. package/dist/client/events/channelGroupLeave.cjs +133 -0
  132. package/dist/client/events/channelGroupLeave.cjs.map +1 -0
  133. package/dist/client/events/channelGroupLeave.d.cts +30 -0
  134. package/dist/client/events/channelGroupLeave.d.ts +30 -0
  135. package/dist/client/events/channelGroupLeave.js +11 -0
  136. package/dist/client/events/channelGroupLeave.js.map +1 -0
  137. package/dist/client/events/channelStarttyping.cjs +110 -0
  138. package/dist/client/events/channelStarttyping.cjs.map +1 -0
  139. package/dist/client/events/channelStarttyping.d.cts +30 -0
  140. package/dist/client/events/channelStarttyping.d.ts +30 -0
  141. package/dist/client/events/channelStarttyping.js +11 -0
  142. package/dist/client/events/channelStarttyping.js.map +1 -0
  143. package/dist/client/events/channelStopTyping.cjs +110 -0
  144. package/dist/client/events/channelStopTyping.cjs.map +1 -0
  145. package/dist/client/events/channelStopTyping.d.cts +30 -0
  146. package/dist/client/events/channelStopTyping.d.ts +30 -0
  147. package/dist/client/events/channelStopTyping.js +11 -0
  148. package/dist/client/events/channelStopTyping.js.map +1 -0
  149. package/dist/client/events/channelUpdate.cjs +109 -0
  150. package/dist/client/events/channelUpdate.cjs.map +1 -0
  151. package/dist/client/events/channelUpdate.d.cts +31 -0
  152. package/dist/client/events/channelUpdate.d.ts +31 -0
  153. package/dist/client/events/channelUpdate.js +11 -0
  154. package/dist/client/events/channelUpdate.js.map +1 -0
  155. package/dist/client/events/event.cjs +124 -0
  156. package/dist/client/events/event.cjs.map +1 -0
  157. package/dist/client/events/event.d.cts +11 -0
  158. package/dist/client/events/event.d.ts +11 -0
  159. package/dist/client/events/event.js +13 -0
  160. package/dist/client/events/event.js.map +1 -0
  161. package/dist/client/events/eventManager.cjs +657 -0
  162. package/dist/client/events/eventManager.cjs.map +1 -0
  163. package/dist/client/events/eventManager.d.cts +10 -0
  164. package/dist/client/events/eventManager.d.ts +10 -0
  165. package/dist/client/events/eventManager.js +34 -0
  166. package/dist/client/events/eventManager.js.map +1 -0
  167. package/dist/client/events/index.cjs +629 -0
  168. package/dist/client/events/index.cjs.map +1 -0
  169. package/dist/client/events/index.d.cts +32 -0
  170. package/dist/client/events/index.d.ts +32 -0
  171. package/dist/client/events/index.js +96 -0
  172. package/dist/client/events/index.js.map +1 -0
  173. package/dist/client/events/message.cjs +136 -0
  174. package/dist/client/events/message.cjs.map +1 -0
  175. package/dist/client/events/message.d.cts +27 -0
  176. package/dist/client/events/message.d.ts +27 -0
  177. package/dist/client/events/message.js +11 -0
  178. package/dist/client/events/message.js.map +1 -0
  179. package/dist/client/events/messageDelete.cjs +114 -0
  180. package/dist/client/events/messageDelete.cjs.map +1 -0
  181. package/dist/client/events/messageDelete.d.cts +30 -0
  182. package/dist/client/events/messageDelete.d.ts +30 -0
  183. package/dist/client/events/messageDelete.js +11 -0
  184. package/dist/client/events/messageDelete.js.map +1 -0
  185. package/dist/client/events/messageReact.cjs +138 -0
  186. package/dist/client/events/messageReact.cjs.map +1 -0
  187. package/dist/client/events/messageReact.d.cts +40 -0
  188. package/dist/client/events/messageReact.d.ts +40 -0
  189. package/dist/client/events/messageReact.js +11 -0
  190. package/dist/client/events/messageReact.js.map +1 -0
  191. package/dist/client/events/messageUnreact.cjs +144 -0
  192. package/dist/client/events/messageUnreact.cjs.map +1 -0
  193. package/dist/client/events/messageUnreact.d.cts +28 -0
  194. package/dist/client/events/messageUnreact.d.ts +28 -0
  195. package/dist/client/events/messageUnreact.js +11 -0
  196. package/dist/client/events/messageUnreact.js.map +1 -0
  197. package/dist/client/events/messageUpdate.cjs +111 -0
  198. package/dist/client/events/messageUpdate.cjs.map +1 -0
  199. package/dist/client/events/messageUpdate.d.cts +31 -0
  200. package/dist/client/events/messageUpdate.d.ts +31 -0
  201. package/dist/client/events/messageUpdate.js +11 -0
  202. package/dist/client/events/messageUpdate.js.map +1 -0
  203. package/dist/client/events/serverCreate.cjs +131 -0
  204. package/dist/client/events/serverCreate.cjs.map +1 -0
  205. package/dist/client/events/serverCreate.d.cts +27 -0
  206. package/dist/client/events/serverCreate.d.ts +27 -0
  207. package/dist/client/events/serverCreate.js +11 -0
  208. package/dist/client/events/serverCreate.js.map +1 -0
  209. package/dist/client/events/serverDelete.cjs +110 -0
  210. package/dist/client/events/serverDelete.cjs.map +1 -0
  211. package/dist/client/events/serverDelete.d.cts +27 -0
  212. package/dist/client/events/serverDelete.d.ts +27 -0
  213. package/dist/client/events/serverDelete.js +11 -0
  214. package/dist/client/events/serverDelete.js.map +1 -0
  215. package/dist/client/events/serverMemberJoin.cjs +135 -0
  216. package/dist/client/events/serverMemberJoin.cjs.map +1 -0
  217. package/dist/client/events/serverMemberJoin.d.cts +30 -0
  218. package/dist/client/events/serverMemberJoin.d.ts +30 -0
  219. package/dist/client/events/serverMemberJoin.js +11 -0
  220. package/dist/client/events/serverMemberJoin.js.map +1 -0
  221. package/dist/client/events/serverMemberLeave.cjs +114 -0
  222. package/dist/client/events/serverMemberLeave.cjs.map +1 -0
  223. package/dist/client/events/serverMemberLeave.d.cts +30 -0
  224. package/dist/client/events/serverMemberLeave.d.ts +30 -0
  225. package/dist/client/events/serverMemberLeave.js +11 -0
  226. package/dist/client/events/serverMemberLeave.js.map +1 -0
  227. package/dist/client/events/serverMemberUpdate.cjs +135 -0
  228. package/dist/client/events/serverMemberUpdate.cjs.map +1 -0
  229. package/dist/client/events/serverMemberUpdate.d.cts +33 -0
  230. package/dist/client/events/serverMemberUpdate.d.ts +33 -0
  231. package/dist/client/events/serverMemberUpdate.js +11 -0
  232. package/dist/client/events/serverMemberUpdate.js.map +1 -0
  233. package/dist/client/events/serverRoleDelete.cjs +114 -0
  234. package/dist/client/events/serverRoleDelete.cjs.map +1 -0
  235. package/dist/client/events/serverRoleDelete.d.cts +30 -0
  236. package/dist/client/events/serverRoleDelete.d.ts +30 -0
  237. package/dist/client/events/serverRoleDelete.js +11 -0
  238. package/dist/client/events/serverRoleDelete.js.map +1 -0
  239. package/dist/client/events/serverRoleUpdate.cjs +111 -0
  240. package/dist/client/events/serverRoleUpdate.cjs.map +1 -0
  241. package/dist/client/events/serverRoleUpdate.d.cts +34 -0
  242. package/dist/client/events/serverRoleUpdate.d.ts +34 -0
  243. package/dist/client/events/serverRoleUpdate.js +11 -0
  244. package/dist/client/events/serverRoleUpdate.js.map +1 -0
  245. package/dist/client/events/serverupdate.cjs +109 -0
  246. package/dist/client/events/serverupdate.cjs.map +1 -0
  247. package/dist/client/events/serverupdate.d.cts +31 -0
  248. package/dist/client/events/serverupdate.d.ts +31 -0
  249. package/dist/client/events/serverupdate.js +11 -0
  250. package/dist/client/events/serverupdate.js.map +1 -0
  251. package/dist/client/events/userUpdate.cjs +109 -0
  252. package/dist/client/events/userUpdate.cjs.map +1 -0
  253. package/dist/client/events/userUpdate.d.cts +31 -0
  254. package/dist/client/events/userUpdate.d.ts +31 -0
  255. package/dist/client/events/userUpdate.js +11 -0
  256. package/dist/client/events/userUpdate.js.map +1 -0
  257. package/dist/client/webSocket.cjs +1018 -0
  258. package/dist/client/webSocket.cjs.map +1 -0
  259. package/dist/client/webSocket.d.cts +10 -0
  260. package/dist/client/webSocket.d.ts +10 -0
  261. package/dist/client/webSocket.js +53 -0
  262. package/dist/client/webSocket.js.map +1 -0
  263. package/dist/{index.d.mts → index-D44PqKGb.d.ts} +4 -242
  264. package/dist/index-XkxTx7UU.d.cts +2386 -0
  265. package/dist/{index.mjs → index.cjs} +112 -36
  266. package/dist/index.cjs.map +1 -0
  267. package/dist/index.d.cts +11 -0
  268. package/dist/index.d.ts +11 -2624
  269. package/dist/index.js +111 -4535
  270. package/dist/index.js.map +1 -0
  271. package/dist/managers/baseManager.cjs +63 -0
  272. package/dist/managers/baseManager.cjs.map +1 -0
  273. package/dist/managers/baseManager.d.cts +10 -0
  274. package/dist/managers/baseManager.d.ts +10 -0
  275. package/dist/managers/baseManager.js +8 -0
  276. package/dist/managers/baseManager.js.map +1 -0
  277. package/dist/managers/channelManager.cjs +1978 -0
  278. package/dist/managers/channelManager.cjs.map +1 -0
  279. package/dist/managers/channelManager.d.cts +10 -0
  280. package/dist/managers/channelManager.d.ts +10 -0
  281. package/dist/managers/channelManager.js +53 -0
  282. package/dist/managers/channelManager.js.map +1 -0
  283. package/dist/managers/index.cjs +2992 -0
  284. package/dist/managers/index.cjs.map +1 -0
  285. package/dist/managers/index.d.cts +10 -0
  286. package/dist/managers/index.d.ts +10 -0
  287. package/dist/managers/index.js +68 -0
  288. package/dist/managers/index.js.map +1 -0
  289. package/dist/managers/messageManager.cjs +1153 -0
  290. package/dist/managers/messageManager.cjs.map +1 -0
  291. package/dist/managers/messageManager.d.cts +10 -0
  292. package/dist/managers/messageManager.d.ts +10 -0
  293. package/dist/managers/messageManager.js +53 -0
  294. package/dist/managers/messageManager.js.map +1 -0
  295. package/dist/managers/roleManager.cjs +700 -0
  296. package/dist/managers/roleManager.cjs.map +1 -0
  297. package/dist/managers/roleManager.d.cts +10 -0
  298. package/dist/managers/roleManager.d.ts +10 -0
  299. package/dist/managers/roleManager.js +53 -0
  300. package/dist/managers/roleManager.js.map +1 -0
  301. package/dist/managers/serverChannelManager.cjs +1622 -0
  302. package/dist/managers/serverChannelManager.cjs.map +1 -0
  303. package/dist/managers/serverChannelManager.d.cts +10 -0
  304. package/dist/managers/serverChannelManager.d.ts +10 -0
  305. package/dist/managers/serverChannelManager.js +53 -0
  306. package/dist/managers/serverChannelManager.js.map +1 -0
  307. package/dist/managers/serverManager.cjs +2508 -0
  308. package/dist/managers/serverManager.cjs.map +1 -0
  309. package/dist/managers/serverManager.d.cts +10 -0
  310. package/dist/managers/serverManager.d.ts +10 -0
  311. package/dist/managers/serverManager.js +53 -0
  312. package/dist/managers/serverManager.js.map +1 -0
  313. package/dist/managers/serverMemberManager.cjs +1037 -0
  314. package/dist/managers/serverMemberManager.cjs.map +1 -0
  315. package/dist/managers/serverMemberManager.d.cts +10 -0
  316. package/dist/managers/serverMemberManager.d.ts +10 -0
  317. package/dist/managers/serverMemberManager.js +53 -0
  318. package/dist/managers/serverMemberManager.js.map +1 -0
  319. package/dist/managers/userManager.cjs +1103 -0
  320. package/dist/managers/userManager.cjs.map +1 -0
  321. package/dist/managers/userManager.d.cts +10 -0
  322. package/dist/managers/userManager.d.ts +10 -0
  323. package/dist/managers/userManager.js +53 -0
  324. package/dist/managers/userManager.js.map +1 -0
  325. package/dist/rest/CDNClient.cjs +608 -0
  326. package/dist/rest/CDNClient.cjs.map +1 -0
  327. package/dist/rest/CDNClient.d.cts +10 -0
  328. package/dist/rest/CDNClient.d.ts +10 -0
  329. package/dist/rest/CDNClient.js +16 -0
  330. package/dist/rest/CDNClient.js.map +1 -0
  331. package/dist/rest/restClient.cjs +652 -0
  332. package/dist/rest/restClient.cjs.map +1 -0
  333. package/dist/rest/restClient.d.cts +10 -0
  334. package/dist/rest/restClient.d.ts +10 -0
  335. package/dist/rest/restClient.js +16 -0
  336. package/dist/rest/restClient.js.map +1 -0
  337. package/dist/rest/restUtils/rateLimitQueue.cjs +138 -0
  338. package/dist/rest/restUtils/rateLimitQueue.cjs.map +1 -0
  339. package/dist/rest/restUtils/rateLimitQueue.d.cts +13 -0
  340. package/dist/rest/restUtils/rateLimitQueue.d.ts +13 -0
  341. package/dist/rest/restUtils/rateLimitQueue.js +8 -0
  342. package/dist/rest/restUtils/rateLimitQueue.js.map +1 -0
  343. package/dist/struct/attachment.cjs +263 -0
  344. package/dist/struct/attachment.cjs.map +1 -0
  345. package/dist/struct/attachment.d.cts +10 -0
  346. package/dist/struct/attachment.d.ts +10 -0
  347. package/dist/struct/attachment.js +10 -0
  348. package/dist/struct/attachment.js.map +1 -0
  349. package/dist/struct/base.cjs +234 -0
  350. package/dist/struct/base.cjs.map +1 -0
  351. package/dist/struct/base.d.cts +10 -0
  352. package/dist/struct/base.d.ts +10 -0
  353. package/dist/struct/base.js +9 -0
  354. package/dist/struct/base.js.map +1 -0
  355. package/dist/struct/category.cjs +532 -0
  356. package/dist/struct/category.cjs.map +1 -0
  357. package/dist/struct/category.d.cts +10 -0
  358. package/dist/struct/category.d.ts +10 -0
  359. package/dist/struct/category.js +53 -0
  360. package/dist/struct/category.js.map +1 -0
  361. package/dist/struct/channel.cjs +539 -0
  362. package/dist/struct/channel.cjs.map +1 -0
  363. package/dist/struct/channel.d.cts +10 -0
  364. package/dist/struct/channel.d.ts +10 -0
  365. package/dist/struct/channel.js +15 -0
  366. package/dist/struct/channel.js.map +1 -0
  367. package/dist/struct/clientUser.cjs +741 -0
  368. package/dist/struct/clientUser.cjs.map +1 -0
  369. package/dist/struct/clientUser.d.cts +10 -0
  370. package/dist/struct/clientUser.d.ts +10 -0
  371. package/dist/struct/clientUser.js +53 -0
  372. package/dist/struct/clientUser.js.map +1 -0
  373. package/dist/struct/dmChannel.cjs +1320 -0
  374. package/dist/struct/dmChannel.cjs.map +1 -0
  375. package/dist/struct/dmChannel.d.cts +10 -0
  376. package/dist/struct/dmChannel.d.ts +10 -0
  377. package/dist/struct/dmChannel.js +53 -0
  378. package/dist/struct/dmChannel.js.map +1 -0
  379. package/dist/struct/emoji.cjs +273 -0
  380. package/dist/struct/emoji.cjs.map +1 -0
  381. package/dist/struct/emoji.d.cts +10 -0
  382. package/dist/struct/emoji.d.ts +10 -0
  383. package/dist/struct/emoji.js +10 -0
  384. package/dist/struct/emoji.js.map +1 -0
  385. package/dist/struct/groupChannel.cjs +1519 -0
  386. package/dist/struct/groupChannel.cjs.map +1 -0
  387. package/dist/struct/groupChannel.d.cts +10 -0
  388. package/dist/struct/groupChannel.d.ts +10 -0
  389. package/dist/struct/groupChannel.js +53 -0
  390. package/dist/struct/groupChannel.js.map +1 -0
  391. package/dist/struct/index.cjs +2970 -0
  392. package/dist/struct/index.cjs.map +1 -0
  393. package/dist/struct/index.d.cts +10 -0
  394. package/dist/struct/index.d.ts +10 -0
  395. package/dist/struct/index.js +101 -0
  396. package/dist/struct/index.js.map +1 -0
  397. package/dist/struct/interfaces/baseChannel.cjs +19 -0
  398. package/dist/struct/interfaces/baseChannel.cjs.map +1 -0
  399. package/dist/struct/interfaces/baseChannel.d.cts +10 -0
  400. package/dist/struct/interfaces/baseChannel.d.ts +10 -0
  401. package/dist/struct/interfaces/baseChannel.js +1 -0
  402. package/dist/struct/interfaces/baseChannel.js.map +1 -0
  403. package/dist/struct/invite.cjs +293 -0
  404. package/dist/struct/invite.cjs.map +1 -0
  405. package/dist/struct/invite.d.cts +10 -0
  406. package/dist/struct/invite.d.ts +10 -0
  407. package/dist/struct/invite.js +10 -0
  408. package/dist/struct/invite.js.map +1 -0
  409. package/dist/struct/mentions.cjs +104 -0
  410. package/dist/struct/mentions.cjs.map +1 -0
  411. package/dist/struct/mentions.d.cts +10 -0
  412. package/dist/struct/mentions.d.ts +10 -0
  413. package/dist/struct/mentions.js +8 -0
  414. package/dist/struct/mentions.js.map +1 -0
  415. package/dist/struct/message.cjs +817 -0
  416. package/dist/struct/message.cjs.map +1 -0
  417. package/dist/struct/message.d.cts +10 -0
  418. package/dist/struct/message.d.ts +10 -0
  419. package/dist/struct/message.js +53 -0
  420. package/dist/struct/message.js.map +1 -0
  421. package/dist/struct/messageEmbed.cjs +205 -0
  422. package/dist/struct/messageEmbed.cjs.map +1 -0
  423. package/dist/struct/messageEmbed.d.cts +10 -0
  424. package/dist/struct/messageEmbed.d.ts +10 -0
  425. package/dist/struct/messageEmbed.js +8 -0
  426. package/dist/struct/messageEmbed.js.map +1 -0
  427. package/dist/struct/notesChannel.cjs +1327 -0
  428. package/dist/struct/notesChannel.cjs.map +1 -0
  429. package/dist/struct/notesChannel.d.cts +10 -0
  430. package/dist/struct/notesChannel.d.ts +10 -0
  431. package/dist/struct/notesChannel.js +53 -0
  432. package/dist/struct/notesChannel.js.map +1 -0
  433. package/dist/struct/presence.cjs +254 -0
  434. package/dist/struct/presence.cjs.map +1 -0
  435. package/dist/struct/presence.d.cts +10 -0
  436. package/dist/struct/presence.d.ts +10 -0
  437. package/dist/struct/presence.js +12 -0
  438. package/dist/struct/presence.js.map +1 -0
  439. package/dist/struct/role.cjs +572 -0
  440. package/dist/struct/role.cjs.map +1 -0
  441. package/dist/struct/role.d.cts +10 -0
  442. package/dist/struct/role.d.ts +10 -0
  443. package/dist/struct/role.js +53 -0
  444. package/dist/struct/role.js.map +1 -0
  445. package/dist/struct/server.cjs +2454 -0
  446. package/dist/struct/server.cjs.map +1 -0
  447. package/dist/struct/server.d.cts +10 -0
  448. package/dist/struct/server.d.ts +10 -0
  449. package/dist/struct/server.js +53 -0
  450. package/dist/struct/server.js.map +1 -0
  451. package/dist/struct/serverChannel.cjs +776 -0
  452. package/dist/struct/serverChannel.cjs.map +1 -0
  453. package/dist/struct/serverChannel.d.cts +10 -0
  454. package/dist/struct/serverChannel.d.ts +10 -0
  455. package/dist/struct/serverChannel.js +53 -0
  456. package/dist/struct/serverChannel.js.map +1 -0
  457. package/dist/struct/serverMember.cjs +711 -0
  458. package/dist/struct/serverMember.cjs.map +1 -0
  459. package/dist/struct/serverMember.d.cts +10 -0
  460. package/dist/struct/serverMember.d.ts +10 -0
  461. package/dist/struct/serverMember.js +53 -0
  462. package/dist/struct/serverMember.js.map +1 -0
  463. package/dist/struct/textChannel.cjs +1502 -0
  464. package/dist/struct/textChannel.cjs.map +1 -0
  465. package/dist/struct/textChannel.d.cts +10 -0
  466. package/dist/struct/textChannel.d.ts +10 -0
  467. package/dist/struct/textChannel.js +53 -0
  468. package/dist/struct/textChannel.js.map +1 -0
  469. package/dist/struct/user.cjs +690 -0
  470. package/dist/struct/user.cjs.map +1 -0
  471. package/dist/struct/user.d.cts +10 -0
  472. package/dist/struct/user.d.ts +10 -0
  473. package/dist/struct/user.js +53 -0
  474. package/dist/struct/user.js.map +1 -0
  475. package/dist/struct/voiceChannels.cjs +820 -0
  476. package/dist/struct/voiceChannels.cjs.map +1 -0
  477. package/dist/struct/voiceChannels.d.cts +10 -0
  478. package/dist/struct/voiceChannels.d.ts +10 -0
  479. package/dist/struct/voiceChannels.js +53 -0
  480. package/dist/struct/voiceChannels.js.map +1 -0
  481. package/dist/utils/UUID.cjs +75 -0
  482. package/dist/utils/UUID.cjs.map +1 -0
  483. package/dist/utils/UUID.d.cts +14 -0
  484. package/dist/utils/UUID.d.ts +14 -0
  485. package/dist/utils/UUID.js +8 -0
  486. package/dist/utils/UUID.js.map +1 -0
  487. package/dist/utils/badges.cjs +181 -0
  488. package/dist/utils/badges.cjs.map +1 -0
  489. package/dist/utils/badges.d.cts +25 -0
  490. package/dist/utils/badges.d.ts +25 -0
  491. package/dist/utils/badges.js +9 -0
  492. package/dist/utils/badges.js.map +1 -0
  493. package/dist/utils/bitField.cjs +161 -0
  494. package/dist/utils/bitField.cjs.map +1 -0
  495. package/dist/utils/bitField.d.cts +51 -0
  496. package/dist/utils/bitField.d.ts +51 -0
  497. package/dist/utils/bitField.js +8 -0
  498. package/dist/utils/bitField.js.map +1 -0
  499. package/dist/utils/constants.cjs +179 -0
  500. package/dist/utils/constants.cjs.map +1 -0
  501. package/dist/utils/constants.d.cts +10 -0
  502. package/dist/utils/constants.d.ts +10 -0
  503. package/dist/utils/constants.js +23 -0
  504. package/dist/utils/constants.js.map +1 -0
  505. package/dist/utils/index.cjs +489 -0
  506. package/dist/utils/index.cjs.map +1 -0
  507. package/dist/utils/index.d.cts +11 -0
  508. package/dist/utils/index.d.ts +11 -0
  509. package/dist/utils/index.js +47 -0
  510. package/dist/utils/index.js.map +1 -0
  511. package/dist/utils/permissions.cjs +314 -0
  512. package/dist/utils/permissions.cjs.map +1 -0
  513. package/dist/utils/permissions.d.cts +110 -0
  514. package/dist/utils/permissions.d.ts +110 -0
  515. package/dist/utils/permissions.js +17 -0
  516. package/dist/utils/permissions.js.map +1 -0
  517. package/dist/utils/types.cjs +19 -0
  518. package/dist/utils/types.cjs.map +1 -0
  519. package/dist/utils/types.d.cts +60 -0
  520. package/dist/utils/types.d.ts +60 -0
  521. package/dist/utils/types.js +1 -0
  522. package/dist/utils/types.js.map +1 -0
  523. package/package.json +16 -5
@@ -0,0 +1,820 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __knownSymbol = (name, symbol) => (symbol = Symbol[name]) ? symbol : Symbol.for("Symbol." + name);
9
+ var __typeError = (msg) => {
10
+ throw TypeError(msg);
11
+ };
12
+ var __pow = Math.pow;
13
+ var __export = (target, all) => {
14
+ for (var name in all)
15
+ __defProp(target, name, { get: all[name], enumerable: true });
16
+ };
17
+ var __copyProps = (to, from, except, desc) => {
18
+ if (from && typeof from === "object" || typeof from === "function") {
19
+ for (let key of __getOwnPropNames(from))
20
+ if (!__hasOwnProp.call(to, key) && key !== except)
21
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
22
+ }
23
+ return to;
24
+ };
25
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
26
+ // If the importer is in node compatibility mode or this is not an ESM
27
+ // file that has been converted to a CommonJS file using a Babel-
28
+ // compatible transform (i.e. "__esModule" has not been set), then set
29
+ // "default" to the CommonJS "module.exports" for node compatibility.
30
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
31
+ mod
32
+ ));
33
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
34
+ var __async = (__this, __arguments, generator) => {
35
+ return new Promise((resolve, reject) => {
36
+ var fulfilled = (value) => {
37
+ try {
38
+ step(generator.next(value));
39
+ } catch (e) {
40
+ reject(e);
41
+ }
42
+ };
43
+ var rejected = (value) => {
44
+ try {
45
+ step(generator.throw(value));
46
+ } catch (e) {
47
+ reject(e);
48
+ }
49
+ };
50
+ var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
51
+ step((generator = generator.apply(__this, __arguments)).next());
52
+ });
53
+ };
54
+ var __await = function(promise, isYieldStar) {
55
+ this[0] = promise;
56
+ this[1] = isYieldStar;
57
+ };
58
+ var __yieldStar = (value) => {
59
+ var obj = value[__knownSymbol("asyncIterator")], isAwait = false, method, it = {};
60
+ if (obj == null) {
61
+ obj = value[__knownSymbol("iterator")]();
62
+ method = (k) => it[k] = (x) => obj[k](x);
63
+ } else {
64
+ obj = obj.call(value);
65
+ method = (k) => it[k] = (v) => {
66
+ if (isAwait) {
67
+ isAwait = false;
68
+ if (k === "throw") throw v;
69
+ return v;
70
+ }
71
+ isAwait = true;
72
+ return {
73
+ done: false,
74
+ value: new __await(new Promise((resolve) => {
75
+ var x = obj[k](v);
76
+ if (!(x instanceof Object)) __typeError("Object expected");
77
+ resolve(x);
78
+ }), 1)
79
+ };
80
+ };
81
+ }
82
+ return it[__knownSymbol("iterator")] = () => it, method("next"), "throw" in obj ? method("throw") : it.throw = (x) => {
83
+ throw x;
84
+ }, "return" in obj && method("return"), it;
85
+ };
86
+
87
+ // src/struct/voiceChannels.ts
88
+ var voiceChannels_exports = {};
89
+ __export(voiceChannels_exports, {
90
+ VoiceChannel: () => VoiceChannel
91
+ });
92
+ module.exports = __toCommonJS(voiceChannels_exports);
93
+
94
+ // src/utils/bitField.ts
95
+ var DEFAULT_BIT = 0;
96
+ var _BitField = class _BitField {
97
+ constructor(bits = DEFAULT_BIT) {
98
+ this.bitfield = DEFAULT_BIT;
99
+ this.bitfield = this.self.resolve(bits);
100
+ }
101
+ /**
102
+ * Resolves a bitfield or an array of bitfields into a single number.
103
+ * @param bit The bitfield or array of bitfields to resolve.
104
+ * @returns The resolved bitfield as a number.
105
+ */
106
+ static resolve(bit) {
107
+ if (bit instanceof _BitField) return bit.bitfield;
108
+ if (typeof bit === "number" && bit >= DEFAULT_BIT) return bit;
109
+ if (Array.isArray(bit)) {
110
+ return bit.map((p) => this.resolve(p)).reduce((prev, p) => prev | p, DEFAULT_BIT);
111
+ }
112
+ if (typeof this.FLAGS[bit] !== "undefined") return this.FLAGS[bit];
113
+ throw new Error("BITFIELD_INVALID");
114
+ }
115
+ /**
116
+ * Returns the class that this instance belongs to.
117
+ * @returns The class of the bitfield.
118
+ */
119
+ get self() {
120
+ return this.constructor;
121
+ }
122
+ /**
123
+ * Checks if any of the bits in the bitfield are set.
124
+ * @param bit The bitfield or array of bitfields to check.
125
+ * @returns True if any bits are set, false otherwise.
126
+ */
127
+ any(bit) {
128
+ bit = this.self.resolve(bit);
129
+ return (this.bitfield & bit) !== DEFAULT_BIT;
130
+ }
131
+ /**
132
+ * checks if a specific permission is set.
133
+ */
134
+ has(bit) {
135
+ bit = this.self.resolve(bit);
136
+ return (this.bitfield & bit) === bit;
137
+ }
138
+ /**
139
+ * Returns an array of all the Permissions that are set in the bitfield.
140
+ * @returns An array of flag names.
141
+ */
142
+ toArray() {
143
+ return Object.keys(this.self.FLAGS).filter((bit) => this.has(bit));
144
+ }
145
+ add(...bits) {
146
+ let total = 0;
147
+ for (const bit of bits) {
148
+ total |= this.self.resolve(bit);
149
+ }
150
+ if (Object.isFrozen(this)) {
151
+ return new this.self(this.bitfield | total);
152
+ }
153
+ this.bitfield |= total;
154
+ return this;
155
+ }
156
+ remove(...bits) {
157
+ let total = 0;
158
+ for (const bit of bits) {
159
+ total |= this.self.resolve(bit);
160
+ }
161
+ if (Object.isFrozen(this)) {
162
+ return new this.self(this.bitfield & ~total);
163
+ }
164
+ this.bitfield &= ~total;
165
+ return this;
166
+ }
167
+ freeze() {
168
+ return Object.freeze(this);
169
+ }
170
+ valueOf() {
171
+ return this.bitfield;
172
+ }
173
+ /**
174
+ *
175
+ * @returns A record of all flags and their boolean values indicating whether they are set.
176
+ */
177
+ serialize() {
178
+ const serialized = {};
179
+ for (const [flag, bit] of Object.entries(this.self.FLAGS)) {
180
+ serialized[flag] = this.has(bit);
181
+ }
182
+ return serialized;
183
+ }
184
+ *[Symbol.iterator]() {
185
+ yield* __yieldStar(this.toArray());
186
+ }
187
+ };
188
+ _BitField.FLAGS = {};
189
+ var BitField = _BitField;
190
+
191
+ // src/struct/base.ts
192
+ var Base = class _Base {
193
+ /**
194
+ * Creates a new Base instance.
195
+ *
196
+ * @param {client} client - The client instance.
197
+ */
198
+ constructor(client3) {
199
+ this.client = client3;
200
+ }
201
+ /**
202
+ * Compares this object with another to determine if they are equal.
203
+ *
204
+ * @param {this | null} [obj] - The object to compare with.
205
+ * @returns {boolean} `true` if the objects are equal, otherwise `false`.
206
+ */
207
+ equals(obj) {
208
+ if (!obj) return false;
209
+ for (const key in obj) {
210
+ const a = obj[key], b = this[key];
211
+ if (a instanceof _Base && !a.equals(b)) return false;
212
+ if (a instanceof BitField && a.bitfield !== b.bitfield)
213
+ return false;
214
+ if (typeof a === "object" && a !== null) continue;
215
+ if (a !== b) return false;
216
+ }
217
+ return true;
218
+ }
219
+ /**
220
+ * Updates the object with new data and returns a clone of the object.
221
+ *
222
+ * @param {PartialObject} data - The data to update the object with.
223
+ * @param {string[]} [clear] - Fields to clear in the object.
224
+ * @returns {this} A clone of the updated object.
225
+ */
226
+ _update(data, clear) {
227
+ const clone = this._clone();
228
+ this._patch(data, clear);
229
+ return clone;
230
+ }
231
+ /**
232
+ * Patches the object with new data.
233
+ *
234
+ * @param {PartialObject} data - The data to patch the object with.
235
+ * @param {string[]} [_clear] - Fields to clear in the object.
236
+ * @returns {this} The updated object.
237
+ * @protected
238
+ */
239
+ _patch(data, _clear) {
240
+ if ("id" in data) this.id = data.id;
241
+ if ("_id" in data) {
242
+ if (typeof data._id === "string") this.id = data._id;
243
+ if (typeof data._id === "object") this.id = data._id.user;
244
+ }
245
+ return this;
246
+ }
247
+ /**
248
+ * Creates a deep clone of the object.
249
+ *
250
+ * @returns {this} A clone of the object.
251
+ */
252
+ _clone() {
253
+ const clone = Object.assign(Object.create(this), this);
254
+ for (const key in clone) {
255
+ const prop = clone[key];
256
+ if (prop instanceof _Base) clone[key] = prop._clone();
257
+ }
258
+ return clone;
259
+ }
260
+ };
261
+
262
+ // src/utils/UUID.ts
263
+ var import_crypto = require("crypto");
264
+ var _UUID = class _UUID extends null {
265
+ static get PROG() {
266
+ return (0, import_crypto.randomBytes)(1).readUInt8() / 255;
267
+ }
268
+ static time(now = Date.now()) {
269
+ let mod, result = "";
270
+ for (let i = this.TIME_LENGTH; i > 0; i--) {
271
+ mod = now % this.ENCODING_LENGTH;
272
+ result = this.ENCODING.charAt(mod) + result;
273
+ now = (now - mod) / this.ENCODING_LENGTH;
274
+ }
275
+ return result;
276
+ }
277
+ static hash() {
278
+ let result = "";
279
+ for (let i = this.RANDOM_LENGTH; i > 0; i--) {
280
+ let random = Math.floor(this.PROG * this.ENCODING_LENGTH);
281
+ if (random === this.ENCODING_LENGTH) {
282
+ random = this.ENCODING_LENGTH - 1;
283
+ }
284
+ result = this.ENCODING.charAt(random) + result;
285
+ }
286
+ return result;
287
+ }
288
+ static generate(timestamp = Date.now()) {
289
+ return this.time(timestamp) + this.hash();
290
+ }
291
+ static timestampOf(id) {
292
+ const timestamp = id.slice(0, this.TIME_LENGTH).split("").reverse().reduce((carry, char, index) => {
293
+ const encodingIndex = this.ENCODING.indexOf(char);
294
+ if (encodingIndex === -1) {
295
+ throw new Error("invalid character found: " + char);
296
+ }
297
+ return carry += encodingIndex * Math.pow(this.ENCODING_LENGTH, index);
298
+ }, 0);
299
+ return new Date(timestamp);
300
+ }
301
+ };
302
+ _UUID.ENCODING = "0123456789ABCDEFGHJKMNPQRSTVWXYZ";
303
+ _UUID.ENCODING_LENGTH = _UUID.ENCODING.length;
304
+ _UUID.RANDOM_LENGTH = 16;
305
+ _UUID.TIME_LENGTH = 10;
306
+ _UUID.TIME_MAX = Math.pow(2, 48) - 1;
307
+ var UUID = _UUID;
308
+
309
+ // src/utils/constants.ts
310
+ var SYSTEM_USER_ID = "0".repeat(UUID.TIME_LENGTH + UUID.RANDOM_LENGTH);
311
+
312
+ // src/utils/permissions.ts
313
+ var ChannelPermissions = class extends BitField {
314
+ constructor(bits) {
315
+ super(bits);
316
+ }
317
+ static resolve(bit) {
318
+ return super.resolve(bit);
319
+ }
320
+ };
321
+ ChannelPermissions.FLAGS = {
322
+ VIEW_CHANNEL: __pow(1, 0),
323
+ SEND_MESSAGE: __pow(1, 22),
324
+ MANAGE_MESSAGE: __pow(1, 2),
325
+ MANAGE_CHANNEL: __pow(1, 3),
326
+ VOICE_CALL: __pow(1, 4),
327
+ INVITE_OTHERS: __pow(1, 5),
328
+ EMBED_LINKS: __pow(1, 6),
329
+ UPLOAD_FILES: __pow(1, 7)
330
+ };
331
+ var UserPermissions = class extends BitField {
332
+ constructor(bits) {
333
+ super(bits);
334
+ }
335
+ static resolve(bit) {
336
+ return super.resolve(bit);
337
+ }
338
+ };
339
+ UserPermissions.FLAGS = {
340
+ ACCESS: __pow(1, 0),
341
+ VIEW_PROFILE: __pow(1, 1),
342
+ SEND_MESSAGES: __pow(1, 2),
343
+ INVITE: __pow(1, 3)
344
+ };
345
+ var ServerPermissions = class extends BitField {
346
+ constructor(bits) {
347
+ super(bits);
348
+ }
349
+ static resolve(bit) {
350
+ return super.resolve(bit);
351
+ }
352
+ };
353
+ ServerPermissions.FLAGS = {
354
+ VIEW_SERVER: __pow(1, 0),
355
+ MANAGE_ROLES: __pow(1, 1),
356
+ MANAGE_CHANNELS: __pow(1, 2),
357
+ MANAGE_SERVER: __pow(1, 3),
358
+ KICK_MEMBERS: __pow(1, 4),
359
+ BAN_MEMBERS: __pow(1, 5),
360
+ CHANGE_NICKNAME: __pow(1, 12),
361
+ MANAGE_NICKNAMES: __pow(1, 13),
362
+ CHANGE_AVATAR: __pow(1, 14),
363
+ REMOVE_AVATARS: __pow(1, 15)
364
+ };
365
+ var FullPermissions = class extends BitField {
366
+ constructor(bits) {
367
+ super(bits);
368
+ }
369
+ static resolve(bit) {
370
+ return super.resolve(bit);
371
+ }
372
+ };
373
+ FullPermissions.FLAGS = {
374
+ // * Generic permissions
375
+ /// Manage the channel or channels on the server
376
+ ManageChannel: __pow(2, 0),
377
+ /// Manage the server
378
+ ManageServer: __pow(2, 1),
379
+ /// Manage permissions on servers or channels
380
+ ManagePermissions: __pow(2, 2),
381
+ /// Manage roles on server
382
+ ManageRole: __pow(2, 3),
383
+ /// Manage server customisation (includes emoji)
384
+ ManageCustomisation: __pow(2, 4),
385
+ // * Member permissions
386
+ /// Kick other members below their ranking
387
+ KickMembers: __pow(2, 6),
388
+ /// Ban other members below their ranking
389
+ BanMembers: __pow(2, 7),
390
+ /// Timeout other members below their ranking
391
+ TimeoutMembers: __pow(2, 8),
392
+ /// Assign roles to members below their ranking
393
+ AssignRoles: __pow(2, 9),
394
+ /// Change own nickname
395
+ ChangeNickname: __pow(2, 10),
396
+ /// Change or remove other's nicknames below their ranking
397
+ ManageNicknames: __pow(2, 11),
398
+ /// Change own avatar
399
+ ChangeAvatar: __pow(2, 12),
400
+ /// Remove other's avatars below their ranking
401
+ RemoveAvatars: __pow(2, 13),
402
+ // * Channel permissions
403
+ /// View a channel
404
+ ViewChannel: __pow(2, 20),
405
+ /// Read a channel's past message history
406
+ ReadMessageHistory: __pow(2, 21),
407
+ /// Send a message in a channel
408
+ SendMessage: __pow(2, 22),
409
+ /// Delete messages in a channel
410
+ ManageMessages: __pow(2, 23),
411
+ /// Manage webhook entries on a channel
412
+ ManageWebhooks: __pow(2, 24),
413
+ /// Create invites to this channel
414
+ InviteOthers: __pow(2, 25),
415
+ /// Send embedded content in this channel
416
+ SendEmbeds: __pow(2, 26),
417
+ /// Send attachments and media in this channel
418
+ UploadFiles: __pow(2, 27),
419
+ /// Masquerade messages using custom nickname and avatar
420
+ Masquerade: __pow(2, 28),
421
+ /// React to messages with emoji
422
+ React: __pow(2, 29),
423
+ // * Voice permissions
424
+ /// Connect to a voice channel
425
+ Connect: __pow(2, 30),
426
+ /// Speak in a voice call
427
+ Speak: __pow(2, 31),
428
+ /// Share video in a voice call
429
+ Video: __pow(2, 32),
430
+ /// Mute other members with lower ranking in a voice call
431
+ MuteMembers: __pow(2, 33),
432
+ /// Deafen other members with lower ranking in a voice call
433
+ DeafenMembers: __pow(2, 34),
434
+ /// Move members between voice channels
435
+ MoveMembers: __pow(2, 35),
436
+ // * Mention permissions
437
+ /// Mention @everyone or @online
438
+ MentionEveryone: __pow(2, 37),
439
+ /// Mention a role
440
+ MentionRoles: __pow(2, 38),
441
+ // * Grant all permissions
442
+ /// Safely grant all permissions
443
+ GrantAll: 4503599627370495
444
+ };
445
+ var DEFAULT_PERMISSION_DM = new ChannelPermissions([
446
+ "VIEW_CHANNEL",
447
+ "VIEW_CHANNEL",
448
+ "MANAGE_CHANNEL",
449
+ "VOICE_CALL",
450
+ "EMBED_LINKS",
451
+ "UPLOAD_FILES"
452
+ ]).freeze();
453
+
454
+ // src/utils/badges.ts
455
+ var Badges = class extends BitField {
456
+ constructor(bits) {
457
+ super(bits);
458
+ }
459
+ static resolve(bit) {
460
+ return super.resolve(bit);
461
+ }
462
+ };
463
+ Badges.FLAGS = {
464
+ DEVELOPER: 1 << 0,
465
+ TRANSLATOR: 1 << 1,
466
+ SUPPORTER: 1 << 2,
467
+ RESPONSIBLE_DISCLOSURE: 1 << 3,
468
+ REVOLT_TEAM: 1 << 4,
469
+ EARLY_ADOPTER: 1 << 8
470
+ };
471
+
472
+ // src/struct/attachment.ts
473
+ var Attachment = class extends Base {
474
+ /**
475
+ * Creates a new Attachment instance.
476
+ *
477
+ * @param {client} client - The client instance.
478
+ * @param {File} data - The raw data for the attachment from the API.
479
+ */
480
+ constructor(client3, data) {
481
+ super(client3);
482
+ this._patch(data);
483
+ }
484
+ /**
485
+ * Updates the attachment instance with new data from the API.
486
+ *
487
+ * @param {File} data - The raw data for the attachment from the API.
488
+ * @returns {this} The updated attachment instance.
489
+ * @protected
490
+ */
491
+ _patch(data) {
492
+ super._patch(data);
493
+ if (data.filename) this.filename = data.filename;
494
+ if (data.content_type) this.type = data.content_type;
495
+ if (typeof data.size === "number") this.size = data.size;
496
+ if (data.metadata) this.metadata = data.metadata;
497
+ return this;
498
+ }
499
+ };
500
+
501
+ // src/managers/messageManager.ts
502
+ var import_node_buffer = require("buffer");
503
+ var import_form_data = __toESM(require("form-data"), 1);
504
+ var import_axios = __toESM(require("axios"), 1);
505
+
506
+ // src/struct/channel.ts
507
+ var Channel = class extends Base {
508
+ constructor() {
509
+ super(...arguments);
510
+ this.type = "UNKNOWN";
511
+ }
512
+ /**
513
+ * Gets the timestamp (in milliseconds) when the channel was created.
514
+ *
515
+ * @returns {number} The timestamp of the channel's creation.
516
+ */
517
+ get createdTimestamp() {
518
+ return this.createdAt.getTime();
519
+ }
520
+ /**
521
+ * Gets the date and time when the channel was created.
522
+ *
523
+ * @returns {Date} The creation date of the channel.
524
+ */
525
+ get createdAt() {
526
+ return UUID.timestampOf(this.id);
527
+ }
528
+ /**
529
+ * Deletes the current channel instance from the client's channel collection.
530
+ *
531
+ * This method interacts with the client's channel management system to remove
532
+ * the channel. Once deleted, the channel will no longer be accessible through
533
+ * the client.
534
+ *
535
+ * @returns {Promise<void>} A promise that resolves when the channel has been successfully deleted.
536
+ *
537
+ * @example
538
+ * ```typescript
539
+ * const channel = client.channels.get('1234567890');
540
+ * if (channel) {
541
+ * await channel.delete();
542
+ * console.log('Channel deleted successfully.');
543
+ * }
544
+ * ```
545
+ */
546
+ delete() {
547
+ return this.client.channels.delete(this);
548
+ }
549
+ /**
550
+ * Checks if the channel is a text-based channel.
551
+ *
552
+ * @returns {boolean} True if the channel is a text-based channel, otherwise false.
553
+ */
554
+ isText() {
555
+ return "messages" in this;
556
+ }
557
+ /**
558
+ * Checks if the channel is a voice channel.
559
+ *
560
+ * @returns {boolean} True if the channel is a voice channel, otherwise false.
561
+ */
562
+ isVoice() {
563
+ return this.type === "VOICE" /* VOICE */;
564
+ }
565
+ /**
566
+ * Checks if the channel is a group channel.
567
+ *
568
+ * @returns {boolean} True if the channel is a group channel, otherwise false.
569
+ */
570
+ isGroup() {
571
+ return this.type === "GROUP" /* GROUP */;
572
+ }
573
+ /**
574
+ * Checks if the channel is part of a server.
575
+ *
576
+ * @returns {boolean} True if the channel is a server channel, otherwise false.
577
+ */
578
+ inServer() {
579
+ return "serverId" in this;
580
+ }
581
+ /**
582
+ * Converts the channel to a string representation.
583
+ *
584
+ * @returns {string} A string representation of the channel in the format `<#channelId>`.
585
+ */
586
+ toString() {
587
+ return `<#${this.id}>`;
588
+ }
589
+ /**
590
+ * Fetches the latest data for the channel from the client's channel collection.
591
+ *
592
+ * @param {boolean} [force=true] - Whether to force a fetch even if the channel is cached.
593
+ * @returns {Promise<Channel>} A promise that resolves with the updated channel instance.
594
+ */
595
+ fetch(force = true) {
596
+ return this.client.channels.fetch(this, { force });
597
+ }
598
+ };
599
+
600
+ // src/client/baseClient.ts
601
+ var import_node_events = require("events");
602
+
603
+ // src/rest/restClient.ts
604
+ var import_axios3 = require("axios");
605
+
606
+ // src/rest/restUtils/rateLimitQueue.ts
607
+ var import_axios2 = __toESM(require("axios"), 1);
608
+
609
+ // src/rest/CDNClient.ts
610
+ var import_axios4 = require("axios");
611
+
612
+ // src/struct/invite.ts
613
+ var Invite = class extends Base {
614
+ /**
615
+ * Creates a new Invite instance.
616
+ *
617
+ * @param {client} client - The client instance.
618
+ * @param {APIInvite} data - The raw data for the invite from the API.
619
+ */
620
+ constructor(client3, data) {
621
+ super(client3);
622
+ /** The ID of the server associated with the invite, if any. */
623
+ this.serverId = null;
624
+ this._patch(data);
625
+ }
626
+ /**
627
+ * Updates the invite instance with new data from the API.
628
+ *
629
+ * @param {APIInvite} data - The raw data for the invite from the API.
630
+ * @returns {this} The updated invite instance.
631
+ * @protected
632
+ */
633
+ _patch(data) {
634
+ super._patch(data);
635
+ if (data.channel) this.channelId = data.channel;
636
+ if (data.creator) this.inviterId = data.channel;
637
+ return this;
638
+ }
639
+ /**
640
+ * Retrieves the server associated with the invite.
641
+ *
642
+ * @returns {Server | null} The server associated with the invite, or `null` if not found.
643
+ */
644
+ get server() {
645
+ var _a;
646
+ return (_a = this.client.servers.cache.get(this.serverId)) != null ? _a : null;
647
+ }
648
+ /**
649
+ * Retrieves the channel associated with the invite.
650
+ *
651
+ * @returns {Channel | null} The channel associated with the invite, or `null` if not found.
652
+ */
653
+ get channel() {
654
+ var _a;
655
+ return (_a = this.client.channels.cache.get(this.channelId)) != null ? _a : null;
656
+ }
657
+ /**
658
+ * Retrieves the user who created the invite.
659
+ *
660
+ * @returns {User | null} The user who created the invite, or `null` if not found.
661
+ */
662
+ get inviter() {
663
+ var _a;
664
+ return (_a = this.client.users.cache.get(this.inviterId)) != null ? _a : null;
665
+ }
666
+ // toString(): string {
667
+ // return this.client.api.cdn.invite(this.id);
668
+ // }
669
+ };
670
+
671
+ // src/struct/messageEmbed.ts
672
+ var import_axios5 = __toESM(require("axios"), 1);
673
+ var import_form_data2 = __toESM(require("form-data"), 1);
674
+ var import_node_buffer2 = require("buffer");
675
+
676
+ // src/struct/serverChannel.ts
677
+ var ServerChannel = class extends Channel {
678
+ /**
679
+ * Creates a new ServerChannel instance.
680
+ *
681
+ * @param {client} client - The client instance.
682
+ * @param {APIServerChannel} data - The raw data for the server channel from the API.
683
+ */
684
+ constructor(client3, data) {
685
+ super(client3);
686
+ /** The description of the channel, or `null` if none is set. */
687
+ this.description = null;
688
+ /** The icon of the channel, or `null` if none is set. */
689
+ this.icon = null;
690
+ /** The permission overwrites for the channel. */
691
+ this.overwrites = /* @__PURE__ */ new Map();
692
+ /** Whether the channel is marked as NSFW (Not Safe For Work). */
693
+ this.nsfw = false;
694
+ this._patch(data);
695
+ }
696
+ /**
697
+ * Updates the server channel instance with new data from the API.
698
+ *
699
+ * @param {APIServerChannel} data - The raw data for the server channel from the API.
700
+ * @param {FieldsChannel[]} [clear=[]] - Fields to clear in the channel.
701
+ * @returns {this} The updated server channel instance.
702
+ * @protected
703
+ */
704
+ _patch(data, clear = []) {
705
+ var _a;
706
+ super._patch(data);
707
+ if (data.name) this.name = data.name;
708
+ if (data.server) this.serverId = data.server;
709
+ if ("description" in data) this.description = (_a = data.description) != null ? _a : null;
710
+ if (data.icon) this.icon = new Attachment(this.client, data.icon);
711
+ if (typeof data.nsfw === "boolean") this.nsfw = data.nsfw;
712
+ if (data.role_permissions) {
713
+ this.overwrites.clear();
714
+ for (const [id, { a, d }] of Object.entries(data.role_permissions)) {
715
+ this.overwrites.set(id, {
716
+ allow: new FullPermissions(a),
717
+ deny: new FullPermissions(d)
718
+ });
719
+ }
720
+ }
721
+ for (const field of clear) {
722
+ if (field === "Icon") this.icon = null;
723
+ if (field === "Description") this.description = null;
724
+ }
725
+ return this;
726
+ }
727
+ /**
728
+ * Creates an invite for the server channel.
729
+ *
730
+ * @returns {Promise<Invite>} A promise that resolves with the created invite.
731
+ *
732
+ * @example
733
+ * ```typescript
734
+ * const invite = await serverChannel.createInvite();
735
+ * console.log(`Invite created: ${invite}`);
736
+ * ```
737
+ */
738
+ createInvite() {
739
+ return __async(this, null, function* () {
740
+ const data = yield this.client.api.post(`/channels/${this.id}/invites`, {});
741
+ return new Invite(
742
+ this.client,
743
+ data
744
+ );
745
+ });
746
+ }
747
+ // iconURL(options?: { size: number }): string | null {
748
+ // return this.icon
749
+ // ? this.client.api.cdn.icon(this.icon.id, options?.size)
750
+ // : null;
751
+ // }
752
+ /**
753
+ * Retrieves the server this channel belongs to.
754
+ *
755
+ * @returns {Server} The server instance.
756
+ */
757
+ get server() {
758
+ return this.client.servers.cache.get(this.serverId);
759
+ }
760
+ /**
761
+ * Retrieves the category this channel belongs to, if any.
762
+ *
763
+ * @returns {Category | null} The category instance, or `null` if the channel is not in a category.
764
+ */
765
+ get category() {
766
+ var _a;
767
+ return (_a = Array.from(this.server.categories.values()).find(
768
+ (cat) => cat.children.has(this.id)
769
+ )) != null ? _a : null;
770
+ }
771
+ };
772
+
773
+ // src/struct/voiceChannels.ts
774
+ var VoiceChannel = class extends ServerChannel {
775
+ /**
776
+ * Creates a new VoiceChannel instance.
777
+ *
778
+ * @param {client} client - The client instance.
779
+ * @param {APIVoiceChannel} data - The raw data for the voice channel from the API.
780
+ */
781
+ constructor(client3, data) {
782
+ super(client3, data);
783
+ /** The type of the channel, which is always `VOICE` for voice channels. */
784
+ this.type = "VOICE" /* VOICE */;
785
+ this._patch(data);
786
+ }
787
+ /**
788
+ * Updates the voice channel instance with new data from the API.
789
+ *
790
+ * @param {APIVoiceChannel} data - The raw data for the voice channel from the API.
791
+ * @returns {this} The updated voice channel instance.
792
+ * @protected
793
+ */
794
+ _patch(data) {
795
+ super._patch(data);
796
+ return this;
797
+ }
798
+ /**
799
+ * Acknowledges the voice channel.
800
+ *
801
+ * @throws {TypeError} Throws an error because voice channels cannot be acknowledged.
802
+ *
803
+ * @example
804
+ * ```typescript
805
+ * try {
806
+ * await voiceChannel.ack();
807
+ * } catch (error) {
808
+ * console.error(error.message); // "Cannot ack voice channel"
809
+ * }
810
+ * ```
811
+ */
812
+ ack() {
813
+ throw new TypeError("Cannot ack voice channel");
814
+ }
815
+ };
816
+ // Annotate the CommonJS export names for ESM import in node:
817
+ 0 && (module.exports = {
818
+ VoiceChannel
819
+ });
820
+ //# sourceMappingURL=voiceChannels.cjs.map