@fluxerjs/core 1.1.9 → 1.2.1

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 (535) hide show
  1. package/dist/index.d.mts +1149 -997
  2. package/dist/index.d.ts +1149 -997
  3. package/dist/index.js +2586 -2608
  4. package/dist/index.mjs +2721 -264
  5. package/package.json +8 -8
  6. package/dist/Channel-2WNJ445K.mjs +0 -17
  7. package/dist/Channel-3TAZVAC5.mjs +0 -21
  8. package/dist/Channel-4WVFDOCG.mjs +0 -22
  9. package/dist/Channel-ADRBK5JN.mjs +0 -19
  10. package/dist/Channel-AMX4IOLY.mjs +0 -20
  11. package/dist/Channel-BEZOW4VC.mjs +0 -17
  12. package/dist/Channel-BLJMK4T5.mjs +0 -19
  13. package/dist/Channel-DPLLHL7Y.mjs +0 -19
  14. package/dist/Channel-DTJWTA4N.mjs +0 -20
  15. package/dist/Channel-ELXWZIY4.mjs +0 -20
  16. package/dist/Channel-EYNPKHH2.mjs +0 -20
  17. package/dist/Channel-EZAKOCLZ.mjs +0 -19
  18. package/dist/Channel-EZSBZJTJ.mjs +0 -20
  19. package/dist/Channel-HBKXUNL5.mjs +0 -22
  20. package/dist/Channel-HK7VT35N.mjs +0 -22
  21. package/dist/Channel-HM2UY4DN.mjs +0 -17
  22. package/dist/Channel-ICWNKXBR.mjs +0 -19
  23. package/dist/Channel-IESEJJGP.mjs +0 -22
  24. package/dist/Channel-IGCIDQB3.mjs +0 -19
  25. package/dist/Channel-IKL3SJXN.mjs +0 -17
  26. package/dist/Channel-JFQXR7SZ.mjs +0 -22
  27. package/dist/Channel-KILNV5V3.mjs +0 -17
  28. package/dist/Channel-KOTARBSF.mjs +0 -17
  29. package/dist/Channel-L6UE2MAF.mjs +0 -22
  30. package/dist/Channel-LPAK4B5K.mjs +0 -20
  31. package/dist/Channel-LXEGJ3BH.mjs +0 -20
  32. package/dist/Channel-MGABB7NZ.mjs +0 -19
  33. package/dist/Channel-MS2XLT5H.mjs +0 -19
  34. package/dist/Channel-MXKULRP2.mjs +0 -19
  35. package/dist/Channel-NBJUUPIA.mjs +0 -22
  36. package/dist/Channel-NFVAR3VH.mjs +0 -19
  37. package/dist/Channel-NKQB7NPD.mjs +0 -20
  38. package/dist/Channel-ON7O3D3M.mjs +0 -17
  39. package/dist/Channel-OSOB6ELO.mjs +0 -19
  40. package/dist/Channel-PCUCLDOG.mjs +0 -22
  41. package/dist/Channel-QEJBBSOB.mjs +0 -20
  42. package/dist/Channel-RB4X65FA.mjs +0 -19
  43. package/dist/Channel-SM7NMKEO.mjs +0 -19
  44. package/dist/Channel-TOAQGSRX.mjs +0 -17
  45. package/dist/Channel-UHN4IOM5.mjs +0 -19
  46. package/dist/Channel-UNCURQZU.mjs +0 -19
  47. package/dist/Channel-VENHOL7S.mjs +0 -17
  48. package/dist/Channel-VFCLGG5D.mjs +0 -22
  49. package/dist/Channel-WDHLDQJC.mjs +0 -22
  50. package/dist/Channel-WJZZSNML.mjs +0 -21
  51. package/dist/Channel-XUJNTC3R.mjs +0 -21
  52. package/dist/Channel-YB3LWDHZ.mjs +0 -22
  53. package/dist/Channel-YVGPVOVB.mjs +0 -17
  54. package/dist/Channel-ZABU3K5W.mjs +0 -19
  55. package/dist/Channel-ZNYZSC7R.mjs +0 -20
  56. package/dist/ClientUser-2OHUFUV5.mjs +0 -9
  57. package/dist/ClientUser-35IVTH2S.mjs +0 -8
  58. package/dist/ClientUser-4MC4EFLT.mjs +0 -8
  59. package/dist/ClientUser-4TYNCHEP.mjs +0 -7
  60. package/dist/ClientUser-576UGSIO.mjs +0 -8
  61. package/dist/ClientUser-5DS73MJV.mjs +0 -8
  62. package/dist/ClientUser-5KQNQHUB.mjs +0 -8
  63. package/dist/ClientUser-5NZXMF6I.mjs +0 -8
  64. package/dist/ClientUser-6HBAPU6H.mjs +0 -8
  65. package/dist/ClientUser-76LLHLHL.mjs +0 -8
  66. package/dist/ClientUser-7CQO74QQ.mjs +0 -8
  67. package/dist/ClientUser-A73AHVOW.mjs +0 -8
  68. package/dist/ClientUser-AJLODDUV.mjs +0 -8
  69. package/dist/ClientUser-ALGC4FNY.mjs +0 -8
  70. package/dist/ClientUser-BKDGVNAY.mjs +0 -8
  71. package/dist/ClientUser-CDU2QEMV.mjs +0 -8
  72. package/dist/ClientUser-D3ZNDAJU.mjs +0 -8
  73. package/dist/ClientUser-DJO2FS7P.mjs +0 -8
  74. package/dist/ClientUser-GBD34QB5.mjs +0 -9
  75. package/dist/ClientUser-GISPHEM6.mjs +0 -8
  76. package/dist/ClientUser-ISZ3MTSZ.mjs +0 -8
  77. package/dist/ClientUser-J6HQVSDJ.mjs +0 -9
  78. package/dist/ClientUser-JCRVGIJL.mjs +0 -8
  79. package/dist/ClientUser-JG4EX6F4.mjs +0 -8
  80. package/dist/ClientUser-K2T5J3YS.mjs +0 -8
  81. package/dist/ClientUser-KWOQRQPD.mjs +0 -8
  82. package/dist/ClientUser-LBK6K4YD.mjs +0 -8
  83. package/dist/ClientUser-LLL6WX35.mjs +0 -8
  84. package/dist/ClientUser-MOMS7WLQ.mjs +0 -8
  85. package/dist/ClientUser-N7ZXYAQ3.mjs +0 -8
  86. package/dist/ClientUser-OGDA7D77.mjs +0 -8
  87. package/dist/ClientUser-PXAAKR2P.mjs +0 -8
  88. package/dist/ClientUser-QBJLDW5Y.mjs +0 -8
  89. package/dist/ClientUser-QQXLZ5WP.mjs +0 -8
  90. package/dist/ClientUser-RDGNVUVQ.mjs +0 -8
  91. package/dist/ClientUser-RNDKHQ3Z.mjs +0 -9
  92. package/dist/ClientUser-RXOB6K6C.mjs +0 -8
  93. package/dist/ClientUser-TN2LZ6NT.mjs +0 -8
  94. package/dist/ClientUser-TRA2WERQ.mjs +0 -8
  95. package/dist/ClientUser-U5TR5GIT.mjs +0 -8
  96. package/dist/ClientUser-UKG5K744.mjs +0 -8
  97. package/dist/ClientUser-V43WRWTN.mjs +0 -8
  98. package/dist/ClientUser-VZ2JS6RD.mjs +0 -8
  99. package/dist/ClientUser-WFID4IXD.mjs +0 -8
  100. package/dist/ClientUser-WWXUMO5O.mjs +0 -8
  101. package/dist/ClientUser-XX2PE3TB.mjs +0 -8
  102. package/dist/ClientUser-YEZNAK3W.mjs +0 -8
  103. package/dist/ClientUser-YQXVRO2A.mjs +0 -8
  104. package/dist/ClientUser-ZDE7A36W.mjs +0 -8
  105. package/dist/Guild-2LUH7U7B.mjs +0 -10
  106. package/dist/Guild-2OVJTJYO.mjs +0 -10
  107. package/dist/Guild-2P77HBQM.mjs +0 -11
  108. package/dist/Guild-36EGAAEW.mjs +0 -8
  109. package/dist/Guild-3ETPHHF5.mjs +0 -12
  110. package/dist/Guild-3PLQFT2I.mjs +0 -12
  111. package/dist/Guild-5UBZNIGD.mjs +0 -9
  112. package/dist/Guild-63VQBPKF.mjs +0 -11
  113. package/dist/Guild-AA7WOQRM.mjs +0 -12
  114. package/dist/Guild-AJNEG7LH.mjs +0 -10
  115. package/dist/Guild-ARMAVVJK.mjs +0 -10
  116. package/dist/Guild-AYHGH54T.mjs +0 -10
  117. package/dist/Guild-BRYNE2LO.mjs +0 -11
  118. package/dist/Guild-CA3W6DOD.mjs +0 -8
  119. package/dist/Guild-EATTLGFJ.mjs +0 -11
  120. package/dist/Guild-F6JU3UR6.mjs +0 -11
  121. package/dist/Guild-FE3A7REJ.mjs +0 -9
  122. package/dist/Guild-FMBCTAV4.mjs +0 -12
  123. package/dist/Guild-FSGTZATW.mjs +0 -12
  124. package/dist/Guild-FSIEY6C5.mjs +0 -11
  125. package/dist/Guild-FTMIT5T5.mjs +0 -10
  126. package/dist/Guild-GIXJJBFM.mjs +0 -9
  127. package/dist/Guild-GOQZ7XP4.mjs +0 -8
  128. package/dist/Guild-H7AUG7DI.mjs +0 -10
  129. package/dist/Guild-I4O63HEY.mjs +0 -12
  130. package/dist/Guild-IRBC63IR.mjs +0 -12
  131. package/dist/Guild-ITSZV3DE.mjs +0 -9
  132. package/dist/Guild-K5AJM2C7.mjs +0 -12
  133. package/dist/Guild-KKIQCGCV.mjs +0 -11
  134. package/dist/Guild-L6OWKAO6.mjs +0 -11
  135. package/dist/Guild-MDW7KF33.mjs +0 -12
  136. package/dist/Guild-NAD5F5DP.mjs +0 -12
  137. package/dist/Guild-NHNQ5TIA.mjs +0 -8
  138. package/dist/Guild-NNMSFIA6.mjs +0 -12
  139. package/dist/Guild-OKTDQS5K.mjs +0 -12
  140. package/dist/Guild-PO5D3NEA.mjs +0 -10
  141. package/dist/Guild-PS2BCXNB.mjs +0 -11
  142. package/dist/Guild-RPQGTXB7.mjs +0 -12
  143. package/dist/Guild-RSNXYHFM.mjs +0 -10
  144. package/dist/Guild-RXGLAN54.mjs +0 -12
  145. package/dist/Guild-S3AOK72T.mjs +0 -9
  146. package/dist/Guild-S3YWFZTC.mjs +0 -11
  147. package/dist/Guild-S436SLOP.mjs +0 -9
  148. package/dist/Guild-TM6YGJWB.mjs +0 -10
  149. package/dist/Guild-TZOCAXXV.mjs +0 -9
  150. package/dist/Guild-WAFXK2EX.mjs +0 -9
  151. package/dist/Guild-WGZEW2AP.mjs +0 -10
  152. package/dist/Guild-WNPS7DBT.mjs +0 -11
  153. package/dist/Guild-WQA4CPDE.mjs +0 -10
  154. package/dist/Guild-XPOMHZZG.mjs +0 -9
  155. package/dist/Guild-ZOFF5LFR.mjs +0 -8
  156. package/dist/GuildBan-7CXLTPKY.mjs +0 -7
  157. package/dist/GuildBan-M4PA3HAA.mjs +0 -7
  158. package/dist/GuildEmoji-LP55RVIV.mjs +0 -7
  159. package/dist/GuildEmoji-OCXBPS6I.mjs +0 -8
  160. package/dist/GuildEmoji-SOGQ4C32.mjs +0 -8
  161. package/dist/GuildMember-3PC5QAU4.mjs +0 -8
  162. package/dist/GuildMember-43B5E5CH.mjs +0 -9
  163. package/dist/GuildMember-B7IFPCWC.mjs +0 -9
  164. package/dist/GuildMember-BJJNCL6W.mjs +0 -8
  165. package/dist/GuildMember-DW2N6ITI.mjs +0 -7
  166. package/dist/GuildMember-E72JU6JE.mjs +0 -9
  167. package/dist/GuildMember-F5FZJOHD.mjs +0 -9
  168. package/dist/GuildMember-FSGDPKUU.mjs +0 -9
  169. package/dist/GuildMember-FX2JAWES.mjs +0 -8
  170. package/dist/GuildMember-GS72FCQD.mjs +0 -9
  171. package/dist/GuildMember-H7CP2HMW.mjs +0 -9
  172. package/dist/GuildMember-K5FLBNHV.mjs +0 -8
  173. package/dist/GuildMember-L35WIMIH.mjs +0 -9
  174. package/dist/GuildMember-OXTGJ3MF.mjs +0 -9
  175. package/dist/GuildMember-RGVPVUAG.mjs +0 -9
  176. package/dist/GuildMember-RZWZ3OCG.mjs +0 -7
  177. package/dist/GuildMember-UBNHZBCO.mjs +0 -8
  178. package/dist/GuildMember-UU26WJGN.mjs +0 -8
  179. package/dist/GuildMember-XF7K2R45.mjs +0 -9
  180. package/dist/GuildMember-YWXA2FVO.mjs +0 -8
  181. package/dist/GuildSticker-3QYT6ZIY.mjs +0 -8
  182. package/dist/GuildSticker-B7AZADJR.mjs +0 -8
  183. package/dist/GuildSticker-STHUU6RM.mjs +0 -7
  184. package/dist/Invite-4WSFNMH4.mjs +0 -7
  185. package/dist/Invite-UM5BU5A6.mjs +0 -7
  186. package/dist/Message-23Z3RPCZ.mjs +0 -9
  187. package/dist/Message-2MPW7ZWA.mjs +0 -7
  188. package/dist/Message-33APPS76.mjs +0 -9
  189. package/dist/Message-3XJH5D7I.mjs +0 -7
  190. package/dist/Message-43PACCS7.mjs +0 -8
  191. package/dist/Message-5RFJTHNU.mjs +0 -7
  192. package/dist/Message-6IYEYSV6.mjs +0 -7
  193. package/dist/Message-6RSAGIRP.mjs +0 -8
  194. package/dist/Message-6YRGUZSW.mjs +0 -9
  195. package/dist/Message-AKOXO3LZ.mjs +0 -7
  196. package/dist/Message-C4A23STA.mjs +0 -9
  197. package/dist/Message-DXBXIQIJ.mjs +0 -9
  198. package/dist/Message-E3WU3J2Q.mjs +0 -8
  199. package/dist/Message-EMJ3JUVX.mjs +0 -8
  200. package/dist/Message-F3K5GNIB.mjs +0 -8
  201. package/dist/Message-F4SCFNF5.mjs +0 -8
  202. package/dist/Message-G4KR7O2J.mjs +0 -7
  203. package/dist/Message-O4CXWR57.mjs +0 -7
  204. package/dist/Message-OFIVTTAZ.mjs +0 -9
  205. package/dist/Message-ONWLVMU7.mjs +0 -8
  206. package/dist/Message-OXTQHFCF.mjs +0 -8
  207. package/dist/Message-PZUU7ZFR.mjs +0 -9
  208. package/dist/Message-QNWAPT55.mjs +0 -9
  209. package/dist/Message-QSDAA2HG.mjs +0 -9
  210. package/dist/Message-QXPHQOVC.mjs +0 -8
  211. package/dist/Message-R7GZYIQQ.mjs +0 -8
  212. package/dist/Message-SHUOVKB5.mjs +0 -7
  213. package/dist/Message-U3UPCS7C.mjs +0 -7
  214. package/dist/Message-W624MHJF.mjs +0 -8
  215. package/dist/Message-XB5WNMHL.mjs +0 -9
  216. package/dist/Message-ZCS7IGJX.mjs +0 -8
  217. package/dist/Message-ZL2PJPQA.mjs +0 -8
  218. package/dist/MessageReaction-AYSOCOMX.mjs +0 -8
  219. package/dist/MessageReaction-FSX3HHRZ.mjs +0 -7
  220. package/dist/MessageReaction-GNM5YJ4V.mjs +0 -8
  221. package/dist/MessageReaction-ME5KGEG4.mjs +0 -8
  222. package/dist/MessageReaction-MFK2N3AD.mjs +0 -8
  223. package/dist/MessageReaction-MUBQ6GIN.mjs +0 -8
  224. package/dist/MessageReaction-NIAHV3EM.mjs +0 -8
  225. package/dist/MessageReaction-PZ53DNAW.mjs +0 -8
  226. package/dist/MessageReaction-TQFIS53C.mjs +0 -8
  227. package/dist/MessageReaction-V4UZ7OXE.mjs +0 -7
  228. package/dist/MessageReaction-XRPYZDSC.mjs +0 -7
  229. package/dist/Role-5MWSGL66.mjs +0 -7
  230. package/dist/Role-DWZ2YDFB.mjs +0 -7
  231. package/dist/Role-J7ENREP6.mjs +0 -7
  232. package/dist/Role-N2ZEMRUQ.mjs +0 -7
  233. package/dist/Role-SERSJFJC.mjs +0 -7
  234. package/dist/Role-SVLWIAMN.mjs +0 -7
  235. package/dist/Webhook-2MQESB7Z.mjs +0 -7
  236. package/dist/Webhook-2RHBXH7R.mjs +0 -7
  237. package/dist/Webhook-32VJD4AL.mjs +0 -7
  238. package/dist/Webhook-6BCEHBZ6.mjs +0 -8
  239. package/dist/Webhook-A5KZ4S4N.mjs +0 -10
  240. package/dist/Webhook-AG6QFM2I.mjs +0 -7
  241. package/dist/Webhook-EARQN5EG.mjs +0 -10
  242. package/dist/Webhook-GB77DXAF.mjs +0 -10
  243. package/dist/Webhook-H4IMADRQ.mjs +0 -10
  244. package/dist/Webhook-H7VKDOJX.mjs +0 -7
  245. package/dist/Webhook-IHLGW7NL.mjs +0 -8
  246. package/dist/Webhook-IWPKKMWD.mjs +0 -10
  247. package/dist/Webhook-L2D43K5N.mjs +0 -7
  248. package/dist/Webhook-LEYRYH23.mjs +0 -7
  249. package/dist/Webhook-NPIXOCEH.mjs +0 -10
  250. package/dist/Webhook-NUQCJAWZ.mjs +0 -7
  251. package/dist/Webhook-OXXVFNNU.mjs +0 -9
  252. package/dist/Webhook-RWDDYW2Q.mjs +0 -10
  253. package/dist/Webhook-SNLT45PN.mjs +0 -7
  254. package/dist/Webhook-TGAZZRQQ.mjs +0 -7
  255. package/dist/Webhook-WIF6OGPA.mjs +0 -10
  256. package/dist/Webhook-YL3NNZDI.mjs +0 -8
  257. package/dist/Webhook-ZL7A4766.mjs +0 -10
  258. package/dist/chunk-2245SAIA.mjs +0 -147
  259. package/dist/chunk-226TVUXE.mjs +0 -136
  260. package/dist/chunk-23KVLHIZ.mjs +0 -147
  261. package/dist/chunk-24E6OQID.mjs +0 -193
  262. package/dist/chunk-25Q2GMSK.mjs +0 -137
  263. package/dist/chunk-26GCIGHL.mjs +0 -52
  264. package/dist/chunk-2CIZJCEO.mjs +0 -132
  265. package/dist/chunk-2FIZRRSO.mjs +0 -88
  266. package/dist/chunk-2GXOBRSF.mjs +0 -184
  267. package/dist/chunk-2HH5NZT3.mjs +0 -137
  268. package/dist/chunk-2QU3TS4S.mjs +0 -496
  269. package/dist/chunk-2ZSMLDEI.mjs +0 -114
  270. package/dist/chunk-367NAOYQ.mjs +0 -127
  271. package/dist/chunk-3BJ4OOCQ.mjs +0 -86
  272. package/dist/chunk-3CNUPFDI.mjs +0 -59
  273. package/dist/chunk-3KOM5WYW.mjs +0 -502
  274. package/dist/chunk-3UJYRWDI.mjs +0 -132
  275. package/dist/chunk-4DBGMFOQ.mjs +0 -14
  276. package/dist/chunk-4F765HVV.mjs +0 -137
  277. package/dist/chunk-4OEOU7G7.mjs +0 -319
  278. package/dist/chunk-4OQ4XACY.mjs +0 -190
  279. package/dist/chunk-4PLHVYRY.mjs +0 -579
  280. package/dist/chunk-4QKSUNTV.mjs +0 -263
  281. package/dist/chunk-4S42USSG.mjs +0 -137
  282. package/dist/chunk-4SWR3ZEZ.mjs +0 -579
  283. package/dist/chunk-4XJIM6SC.mjs +0 -315
  284. package/dist/chunk-52L544OS.mjs +0 -259
  285. package/dist/chunk-53Y37KRG.mjs +0 -111
  286. package/dist/chunk-5APVDWQU.mjs +0 -184
  287. package/dist/chunk-5HQRX3KJ.mjs +0 -70
  288. package/dist/chunk-5I54OXBG.mjs +0 -111
  289. package/dist/chunk-5JEDVRKU.mjs +0 -193
  290. package/dist/chunk-5MPQG6OV.mjs +0 -120
  291. package/dist/chunk-5QRROWJS.mjs +0 -56
  292. package/dist/chunk-5RCTNYPY.mjs +0 -151
  293. package/dist/chunk-5VIV7EPG.mjs +0 -180
  294. package/dist/chunk-62S4AB2S.mjs +0 -54
  295. package/dist/chunk-6C3LYAUX.mjs +0 -496
  296. package/dist/chunk-6CEFV56Z.mjs +0 -142
  297. package/dist/chunk-6CEMF2LO.mjs +0 -14
  298. package/dist/chunk-6EBNOON4.mjs +0 -86
  299. package/dist/chunk-6GF5H3JH.mjs +0 -137
  300. package/dist/chunk-6IGR45JC.mjs +0 -137
  301. package/dist/chunk-6LREQZXU.mjs +0 -259
  302. package/dist/chunk-6S3BDHBI.mjs +0 -28
  303. package/dist/chunk-6VWXGTX2.mjs +0 -585
  304. package/dist/chunk-72OY7B3D.mjs +0 -72
  305. package/dist/chunk-737R7BFN.mjs +0 -112
  306. package/dist/chunk-7EPDZMZS.mjs +0 -264
  307. package/dist/chunk-7FYM4D2E.mjs +0 -50
  308. package/dist/chunk-7GZN6JXT.mjs +0 -50
  309. package/dist/chunk-7H3TKJUT.mjs +0 -53
  310. package/dist/chunk-7K35BCCD.mjs +0 -263
  311. package/dist/chunk-7SIS5CUA.mjs +0 -14
  312. package/dist/chunk-ABGLEIZG.mjs +0 -191
  313. package/dist/chunk-AC7PFILS.mjs +0 -107
  314. package/dist/chunk-AH7KYH2Z.mjs +0 -50
  315. package/dist/chunk-AI5E6LS5.mjs +0 -361
  316. package/dist/chunk-AK6Q62VE.mjs +0 -109
  317. package/dist/chunk-AKJZBSCE.mjs +0 -155
  318. package/dist/chunk-B6F5LWNS.mjs +0 -64
  319. package/dist/chunk-BAZBIWMG.mjs +0 -209
  320. package/dist/chunk-BF7OCTE6.mjs +0 -142
  321. package/dist/chunk-BFSGXVZ7.mjs +0 -148
  322. package/dist/chunk-BGJSL6JI.mjs +0 -14
  323. package/dist/chunk-BI2MRKB7.mjs +0 -150
  324. package/dist/chunk-BKPVGBOT.mjs +0 -8
  325. package/dist/chunk-BMAFJS7T.mjs +0 -575
  326. package/dist/chunk-BRIU4HGS.mjs +0 -579
  327. package/dist/chunk-BUEXP5SZ.mjs +0 -70
  328. package/dist/chunk-BUIHWKTK.mjs +0 -132
  329. package/dist/chunk-BYTAODAO.mjs +0 -70
  330. package/dist/chunk-CEABHTAF.mjs +0 -43
  331. package/dist/chunk-CJLJBBFO.mjs +0 -54
  332. package/dist/chunk-CJVQNARM.mjs +0 -145
  333. package/dist/chunk-CNCPVNXS.mjs +0 -160
  334. package/dist/chunk-CNXK6SYW.mjs +0 -220
  335. package/dist/chunk-CQ5ZVTLX.mjs +0 -71
  336. package/dist/chunk-CQ7MDBHD.mjs +0 -199
  337. package/dist/chunk-CREI4MOS.mjs +0 -406
  338. package/dist/chunk-DJBCSVZX.mjs +0 -102
  339. package/dist/chunk-DJQXAQLR.mjs +0 -496
  340. package/dist/chunk-DLROMCIJ.mjs +0 -50
  341. package/dist/chunk-DLVBAJTE.mjs +0 -52
  342. package/dist/chunk-DNDCNIN2.mjs +0 -263
  343. package/dist/chunk-DO7MLFT6.mjs +0 -579
  344. package/dist/chunk-DPZHAYCK.mjs +0 -71
  345. package/dist/chunk-DQ4TNBPG.mjs +0 -63
  346. package/dist/chunk-DSPSRPHF.mjs +0 -200
  347. package/dist/chunk-DUQAD7F6.mjs +0 -173
  348. package/dist/chunk-E27LKSSS.mjs +0 -142
  349. package/dist/chunk-E6SU3TR5.mjs +0 -64
  350. package/dist/chunk-E75ZVY3I.mjs +0 -14
  351. package/dist/chunk-EC4ES5VH.mjs +0 -171
  352. package/dist/chunk-EF32ILJL.mjs +0 -102
  353. package/dist/chunk-EI2LRVWJ.mjs +0 -207
  354. package/dist/chunk-EUKEYW72.mjs +0 -496
  355. package/dist/chunk-F2EEQP5O.mjs +0 -86
  356. package/dist/chunk-F3JU2ZCE.mjs +0 -575
  357. package/dist/chunk-FGFWZMUQ.mjs +0 -64
  358. package/dist/chunk-FH6ICLNP.mjs +0 -142
  359. package/dist/chunk-FHFXUKFP.mjs +0 -147
  360. package/dist/chunk-FJS5FBXO.mjs +0 -233
  361. package/dist/chunk-FK5X6HFL.mjs +0 -111
  362. package/dist/chunk-FNFID6QB.mjs +0 -45
  363. package/dist/chunk-FRVZ7D6D.mjs +0 -293
  364. package/dist/chunk-FSXTONUR.mjs +0 -147
  365. package/dist/chunk-FVZY7IZ4.mjs +0 -575
  366. package/dist/chunk-G2YVDCRB.mjs +0 -137
  367. package/dist/chunk-G4L7WAJS.mjs +0 -64
  368. package/dist/chunk-G6F6VL4O.mjs +0 -54
  369. package/dist/chunk-GCIJYVRC.mjs +0 -86
  370. package/dist/chunk-GEPISSKR.mjs +0 -263
  371. package/dist/chunk-GFUJVQ7L.mjs +0 -64
  372. package/dist/chunk-GIIJQKAV.mjs +0 -164
  373. package/dist/chunk-GUNWHOQO.mjs +0 -42
  374. package/dist/chunk-GWSLXZES.mjs +0 -263
  375. package/dist/chunk-H5KYMLLB.mjs +0 -14
  376. package/dist/chunk-HAUQAFOF.mjs +0 -97
  377. package/dist/chunk-HBF5QEDH.mjs +0 -42
  378. package/dist/chunk-HQMYRYMY.mjs +0 -6
  379. package/dist/chunk-I2MHQEEZ.mjs +0 -575
  380. package/dist/chunk-IE3V5VLN.mjs +0 -64
  381. package/dist/chunk-IHXSHE2Z.mjs +0 -56
  382. package/dist/chunk-IPHFDI2L.mjs +0 -68
  383. package/dist/chunk-J3EIGOXQ.mjs +0 -72
  384. package/dist/chunk-JHNKZIHY.mjs +0 -137
  385. package/dist/chunk-JJHZBWZM.mjs +0 -118
  386. package/dist/chunk-JOUNLDB6.mjs +0 -225
  387. package/dist/chunk-JS55BGBM.mjs +0 -157
  388. package/dist/chunk-JTL3CVFU.mjs +0 -114
  389. package/dist/chunk-JVEOQFUX.mjs +0 -52
  390. package/dist/chunk-JW4BRX5E.mjs +0 -140
  391. package/dist/chunk-K2ZJWUV6.mjs +0 -86
  392. package/dist/chunk-K6NLD6SB.mjs +0 -64
  393. package/dist/chunk-KALJBR6Z.mjs +0 -142
  394. package/dist/chunk-KBXXX7L4.mjs +0 -209
  395. package/dist/chunk-KHE3G7SG.mjs +0 -184
  396. package/dist/chunk-KOTF4TTZ.mjs +0 -403
  397. package/dist/chunk-KQNLUUBZ.mjs +0 -137
  398. package/dist/chunk-KQXR3GN2.mjs +0 -140
  399. package/dist/chunk-KR26CBFE.mjs +0 -58
  400. package/dist/chunk-KUMLJGXY.mjs +0 -58
  401. package/dist/chunk-KWA5TKXS.mjs +0 -574
  402. package/dist/chunk-KXI2IOJM.mjs +0 -97
  403. package/dist/chunk-KXJLNURI.mjs +0 -153
  404. package/dist/chunk-KXY2PTDQ.mjs +0 -263
  405. package/dist/chunk-L25ON7WB.mjs +0 -52
  406. package/dist/chunk-LBBIQOSH.mjs +0 -53
  407. package/dist/chunk-LD7ATCWW.mjs +0 -97
  408. package/dist/chunk-LDR7MZLX.mjs +0 -227
  409. package/dist/chunk-LRMB4VBU.mjs +0 -112
  410. package/dist/chunk-LTO3TVUW.mjs +0 -71
  411. package/dist/chunk-LU2SNC5G.mjs +0 -392
  412. package/dist/chunk-LVMFPATK.mjs +0 -54
  413. package/dist/chunk-MILMGDQ2.mjs +0 -15
  414. package/dist/chunk-MKEHOFA2.mjs +0 -43
  415. package/dist/chunk-MSMABD52.mjs +0 -72
  416. package/dist/chunk-MTGPR7WY.mjs +0 -142
  417. package/dist/chunk-MTMKXMB3.mjs +0 -496
  418. package/dist/chunk-MWRADLNP.mjs +0 -86
  419. package/dist/chunk-N65TF5SP.mjs +0 -184
  420. package/dist/chunk-NCBAWY7A.mjs +0 -139
  421. package/dist/chunk-ND223BOF.mjs +0 -256
  422. package/dist/chunk-NGJKJ4R2.mjs +0 -184
  423. package/dist/chunk-NISGA2YZ.mjs +0 -55
  424. package/dist/chunk-NM6PHRGO.mjs +0 -263
  425. package/dist/chunk-NMMHN5LB.mjs +0 -579
  426. package/dist/chunk-NNKU4OZY.mjs +0 -147
  427. package/dist/chunk-NNZUZLG3.mjs +0 -416
  428. package/dist/chunk-NOLYW3V4.mjs +0 -140
  429. package/dist/chunk-NYEWIYVQ.mjs +0 -86
  430. package/dist/chunk-NZJJ7FRK.mjs +0 -339
  431. package/dist/chunk-O77KTDMH.mjs +0 -44
  432. package/dist/chunk-OALSL7C2.mjs +0 -212
  433. package/dist/chunk-OGJSTE4A.mjs +0 -86
  434. package/dist/chunk-OHIHIQAS.mjs +0 -102
  435. package/dist/chunk-OJJADMUB.mjs +0 -71
  436. package/dist/chunk-OMFDQURC.mjs +0 -84
  437. package/dist/chunk-ORRPH43K.mjs +0 -127
  438. package/dist/chunk-OXO3HVCT.mjs +0 -124
  439. package/dist/chunk-P4IRDGB4.mjs +0 -43
  440. package/dist/chunk-PD42OYFT.mjs +0 -150
  441. package/dist/chunk-PJ62NB7Z.mjs +0 -319
  442. package/dist/chunk-PL26CDZN.mjs +0 -97
  443. package/dist/chunk-PM2IUGNR.mjs +0 -29
  444. package/dist/chunk-PO5JZQVN.mjs +0 -111
  445. package/dist/chunk-PQR6WIIY.mjs +0 -348
  446. package/dist/chunk-PS6PZL5W.mjs +0 -86
  447. package/dist/chunk-PTBV5DCB.mjs +0 -97
  448. package/dist/chunk-PU73YRKJ.mjs +0 -27
  449. package/dist/chunk-PXZCOEZ6.mjs +0 -184
  450. package/dist/chunk-PYYXC7US.mjs +0 -76
  451. package/dist/chunk-Q4W4ODBP.mjs +0 -319
  452. package/dist/chunk-QAJ4C5RT.mjs +0 -263
  453. package/dist/chunk-QDCFQF6J.mjs +0 -36
  454. package/dist/chunk-QDNFJVVE.mjs +0 -70
  455. package/dist/chunk-QEXIYXXU.mjs +0 -62
  456. package/dist/chunk-QG7OB5MD.mjs +0 -86
  457. package/dist/chunk-QM7TE5C3.mjs +0 -97
  458. package/dist/chunk-QRQG2BI2.mjs +0 -67
  459. package/dist/chunk-QXJNV5EJ.mjs +0 -110
  460. package/dist/chunk-QYAZXDXI.mjs +0 -142
  461. package/dist/chunk-RCP27MRC.mjs +0 -33
  462. package/dist/chunk-RGLEJWLU.mjs +0 -173
  463. package/dist/chunk-RIXU6NZ2.mjs +0 -122
  464. package/dist/chunk-RNDHAIPS.mjs +0 -64
  465. package/dist/chunk-RTSLRXJC.mjs +0 -122
  466. package/dist/chunk-RWFKZ3DF.mjs +0 -413
  467. package/dist/chunk-RWZ3ORIM.mjs +0 -136
  468. package/dist/chunk-RXHJYGSJ.mjs +0 -53
  469. package/dist/chunk-S25KNTHZ.mjs +0 -137
  470. package/dist/chunk-SCOVKXZ7.mjs +0 -223
  471. package/dist/chunk-SGIJ36LI.mjs +0 -259
  472. package/dist/chunk-SHYMRCLT.mjs +0 -221
  473. package/dist/chunk-SQVCCSNN.mjs +0 -41
  474. package/dist/chunk-SU26BEIK.mjs +0 -86
  475. package/dist/chunk-SW6KNICI.mjs +0 -52
  476. package/dist/chunk-SY6DVJKB.mjs +0 -184
  477. package/dist/chunk-T23OBCRC.mjs +0 -295
  478. package/dist/chunk-T2NSVWBH.mjs +0 -77
  479. package/dist/chunk-T3PPEX64.mjs +0 -164
  480. package/dist/chunk-TDQUAKUL.mjs +0 -64
  481. package/dist/chunk-TE5IC7IP.mjs +0 -36
  482. package/dist/chunk-TKASBGF7.mjs +0 -62
  483. package/dist/chunk-TMDZALIN.mjs +0 -110
  484. package/dist/chunk-TU4VVM34.mjs +0 -23
  485. package/dist/chunk-U2WETRQJ.mjs +0 -86
  486. package/dist/chunk-U3RZV7XO.mjs +0 -58
  487. package/dist/chunk-USHLLE7C.mjs +0 -137
  488. package/dist/chunk-UU6LVKA3.mjs +0 -112
  489. package/dist/chunk-UXIF75BV.mjs +0 -36
  490. package/dist/chunk-UXODHQZH.mjs +0 -41
  491. package/dist/chunk-V37YOE4P.mjs +0 -184
  492. package/dist/chunk-V6QVJWJR.mjs +0 -86
  493. package/dist/chunk-V6T5VMWD.mjs +0 -26
  494. package/dist/chunk-V72EJZDX.mjs +0 -137
  495. package/dist/chunk-V7LPVPGH.mjs +0 -305
  496. package/dist/chunk-VESIRBN4.mjs +0 -263
  497. package/dist/chunk-VGKL2ALO.mjs +0 -184
  498. package/dist/chunk-VJDH54HJ.mjs +0 -56
  499. package/dist/chunk-VPZEDAAB.mjs +0 -184
  500. package/dist/chunk-VQHHSD7C.mjs +0 -97
  501. package/dist/chunk-VZPN7FNH.mjs +0 -308
  502. package/dist/chunk-WB5BPM5Q.mjs +0 -55
  503. package/dist/chunk-WFONGZGK.mjs +0 -42
  504. package/dist/chunk-WKZ2ZIPO.mjs +0 -112
  505. package/dist/chunk-WVRHFGGB.mjs +0 -97
  506. package/dist/chunk-WYSHH4LR.mjs +0 -141
  507. package/dist/chunk-WZVY7DA6.mjs +0 -44
  508. package/dist/chunk-X3GPLJGD.mjs +0 -152
  509. package/dist/chunk-X6K3ZD62.mjs +0 -53
  510. package/dist/chunk-X77DFNE3.mjs +0 -136
  511. package/dist/chunk-XNS4O6QJ.mjs +0 -7
  512. package/dist/chunk-XRLFLKHG.mjs +0 -14
  513. package/dist/chunk-XTDZQD4A.mjs +0 -110
  514. package/dist/chunk-XTFNK6PX.mjs +0 -220
  515. package/dist/chunk-XXCBJJZE.mjs +0 -88
  516. package/dist/chunk-Y3PX242G.mjs +0 -225
  517. package/dist/chunk-Y57QWXS4.mjs +0 -122
  518. package/dist/chunk-YKP7JHV2.mjs +0 -102
  519. package/dist/chunk-YRCBBEPB.mjs +0 -142
  520. package/dist/chunk-YSKZR66G.mjs +0 -102
  521. package/dist/chunk-YUDOACNS.mjs +0 -184
  522. package/dist/chunk-YVNZMBZ6.mjs +0 -501
  523. package/dist/chunk-YWE5AILJ.mjs +0 -137
  524. package/dist/chunk-YYER5QOG.mjs +0 -44
  525. package/dist/chunk-Z6LVSACJ.mjs +0 -86
  526. package/dist/chunk-ZFLKX6WD.mjs +0 -97
  527. package/dist/chunk-ZGMM6IPQ.mjs +0 -79
  528. package/dist/chunk-ZHNFS3MK.mjs +0 -56
  529. package/dist/chunk-ZHRQQZ4X.mjs +0 -102
  530. package/dist/chunk-ZJCAKCMN.mjs +0 -89
  531. package/dist/chunk-ZKKBIQBA.mjs +0 -413
  532. package/dist/chunk-ZMIMAMO2.mjs +0 -14
  533. package/dist/chunk-ZR53XY37.mjs +0 -499
  534. package/dist/chunk-ZR6MFTT7.mjs +0 -142
  535. package/dist/chunk-ZVFZIZM2.mjs +0 -150
@@ -1,579 +0,0 @@
1
- import {
2
- ErrorCodes,
3
- FluxerError
4
- } from "./chunk-PU73YRKJ.mjs";
5
- import {
6
- GuildMember
7
- } from "./chunk-5JEDVRKU.mjs";
8
- import {
9
- CDN_URL
10
- } from "./chunk-HQMYRYMY.mjs";
11
- import {
12
- Role
13
- } from "./chunk-2ZSMLDEI.mjs";
14
- import {
15
- Base
16
- } from "./chunk-XNS4O6QJ.mjs";
17
-
18
- // src/structures/Guild.ts
19
- import {
20
- parseRoleMention,
21
- resolvePermissionsToBitfield
22
- } from "@fluxerjs/util";
23
- import { FluxerAPIError } from "@fluxerjs/rest";
24
- import { Collection as Collection2 } from "@fluxerjs/collection";
25
-
26
- // src/client/GuildMemberManager.ts
27
- import { Collection } from "@fluxerjs/collection";
28
- import { Routes } from "@fluxerjs/types";
29
- var GuildMemberManager = class extends Collection {
30
- constructor(guild) {
31
- super();
32
- this.guild = guild;
33
- }
34
- /**
35
- * The current bot user as a GuildMember in this guild.
36
- * Returns null if the bot's member is not cached or client.user is null.
37
- * Use fetchMe() to load the bot's member when not cached.
38
- *
39
- * @example
40
- * const perms = guild.members.me?.permissions;
41
- * if (perms?.has(PermissionFlags.BanMembers)) { ... }
42
- */
43
- get me() {
44
- const userId = this.guild.client.user?.id;
45
- return userId ? this.get(userId) ?? null : null;
46
- }
47
- /**
48
- * Fetch the current bot user as a GuildMember in this guild.
49
- * Caches the result in guild.members.
50
- *
51
- * @throws Error if client.user is null (client not ready)
52
- * @example
53
- * const me = await guild.members.fetchMe();
54
- * console.log(me.displayName);
55
- */
56
- async fetchMe() {
57
- const userId = this.guild.client.user?.id;
58
- if (!userId) {
59
- throw new Error("Cannot fetch me: client.user is null (client not ready)");
60
- }
61
- return this.guild.fetchMember(userId);
62
- }
63
- /**
64
- * Fetch guild members with pagination. GET /guilds/{id}/members.
65
- * @param options - limit (1-1000), after (user ID for pagination)
66
- * @returns Array of GuildMember objects (cached in guild.members)
67
- */
68
- async fetch(options) {
69
- const params = new URLSearchParams();
70
- if (options?.limit != null) params.set("limit", String(options.limit));
71
- if (options?.after) params.set("after", options.after);
72
- const qs = params.toString();
73
- const url = Routes.guildMembers(this.guild.id) + (qs ? `?${qs}` : "");
74
- const data = await this.guild.client.rest.get(url, { auth: true });
75
- const list = Array.isArray(data) ? data : data?.members ?? [];
76
- const { GuildMember: GuildMember2 } = await import("./GuildMember-F5FZJOHD.mjs");
77
- const members = [];
78
- for (const m of list) {
79
- const member = new GuildMember2(
80
- this.guild.client,
81
- { ...m, guild_id: this.guild.id },
82
- this.guild
83
- );
84
- this.set(member.id, member);
85
- members.push(member);
86
- }
87
- return members;
88
- }
89
- };
90
-
91
- // src/structures/Guild.ts
92
- import { Routes as Routes2 } from "@fluxerjs/types";
93
- var Guild = class extends Base {
94
- client;
95
- id;
96
- name;
97
- icon;
98
- banner;
99
- ownerId;
100
- /** Invite splash image hash. Null if none. */
101
- splash;
102
- /** Custom vanity URL code (e.g. fluxer.gg/code). Null if none. */
103
- vanityURLCode;
104
- /** Enabled guild features. */
105
- features;
106
- verificationLevel;
107
- defaultMessageNotifications;
108
- explicitContentFilter;
109
- /** AFK voice channel ID. Null if none. */
110
- afkChannelId;
111
- /** AFK timeout in seconds. */
112
- afkTimeout;
113
- /** System messages channel ID. Null if none. */
114
- systemChannelId;
115
- /** Rules/guidelines channel ID. Null if none. */
116
- rulesChannelId;
117
- nsfwLevel;
118
- mfaLevel;
119
- /** Banner image width. Optional. */
120
- bannerWidth;
121
- /** Banner image height. Optional. */
122
- bannerHeight;
123
- /** Splash image width. Optional. */
124
- splashWidth;
125
- /** Splash image height. Optional. */
126
- splashHeight;
127
- members;
128
- channels = new Collection2();
129
- roles = new Collection2();
130
- /** @param data - API guild from GET /guilds/{id} or gateway GUILD_CREATE */
131
- constructor(client, data) {
132
- super();
133
- this.client = client;
134
- this.id = data.id;
135
- this.members = new GuildMemberManager(this);
136
- this.name = data.name;
137
- this.icon = data.icon ?? null;
138
- this.banner = data.banner ?? null;
139
- this.ownerId = data.owner_id ?? data.ownerId ?? "";
140
- this.splash = data.splash ?? null;
141
- this.vanityURLCode = data.vanity_url_code ?? null;
142
- this.features = data.features ?? [];
143
- this.verificationLevel = data.verification_level ?? 0;
144
- this.defaultMessageNotifications = data.default_message_notifications ?? 0;
145
- this.explicitContentFilter = data.explicit_content_filter ?? 0;
146
- this.afkChannelId = data.afk_channel_id ?? null;
147
- this.afkTimeout = data.afk_timeout ?? 0;
148
- this.systemChannelId = data.system_channel_id ?? null;
149
- this.rulesChannelId = data.rules_channel_id ?? null;
150
- this.nsfwLevel = data.nsfw_level ?? 0;
151
- this.mfaLevel = data.mfa_level ?? 0;
152
- this.bannerWidth = data.banner_width ?? null;
153
- this.bannerHeight = data.banner_height ?? null;
154
- this.splashWidth = data.splash_width ?? null;
155
- this.splashHeight = data.splash_height ?? null;
156
- for (const r of data.roles ?? []) {
157
- this.roles.set(r.id, new Role(client, r, this.id));
158
- }
159
- }
160
- /** Get the guild icon URL, or null if no icon. */
161
- iconURL(options) {
162
- if (!this.icon) return null;
163
- const size = options?.size ? `?size=${options.size}` : "";
164
- return `${CDN_URL}/icons/${this.id}/${this.icon}.png${size}`;
165
- }
166
- /** Get the guild banner URL, or null if no banner. */
167
- bannerURL(options) {
168
- if (!this.banner) return null;
169
- const size = options?.size ? `?size=${options.size}` : "";
170
- return `${CDN_URL}/banners/${this.id}/${this.banner}.png${size}`;
171
- }
172
- /** Get the guild splash (invite background) URL, or null if no splash. */
173
- splashURL(options) {
174
- if (!this.splash) return null;
175
- const size = options?.size ? `?size=${options.size}` : "";
176
- return `${CDN_URL}/splashes/${this.id}/${this.splash}.png${size}`;
177
- }
178
- /**
179
- * Add a role to a member by user ID. Does not require fetching the member first.
180
- * @param userId - The user ID of the member
181
- * @param roleId - The role ID to add (or use guild.resolveRoleId for mention/name resolution)
182
- * Requires Manage Roles permission.
183
- */
184
- async addRoleToMember(userId, roleId) {
185
- await this.client.rest.put(Routes2.guildMemberRole(this.id, userId, roleId));
186
- }
187
- /**
188
- * Remove a role from a member by user ID. Does not require fetching the member first.
189
- * @param userId - The user ID of the member
190
- * @param roleId - The role ID to remove
191
- * Requires Manage Roles permission.
192
- */
193
- async removeRoleFromMember(userId, roleId) {
194
- await this.client.rest.delete(Routes2.guildMemberRole(this.id, userId, roleId));
195
- }
196
- /**
197
- * Create a role in this guild.
198
- * Requires Manage Roles permission.
199
- * @param options - Role data (permissions accepts PermissionResolvable for convenience)
200
- * @returns The created role
201
- * @example
202
- * const role = await guild.createRole({ name: 'Mod', permissions: ['KickMembers', 'BanMembers'] });
203
- */
204
- async createRole(options) {
205
- const body = {};
206
- if (options.name !== void 0) body.name = options.name;
207
- if (options.permissions !== void 0) {
208
- body.permissions = typeof options.permissions === "string" ? options.permissions : resolvePermissionsToBitfield(options.permissions);
209
- }
210
- if (options.color !== void 0) body.color = options.color;
211
- if (options.hoist !== void 0) body.hoist = options.hoist;
212
- if (options.mentionable !== void 0) body.mentionable = options.mentionable;
213
- if (options.unicode_emoji !== void 0) body.unicode_emoji = options.unicode_emoji;
214
- if (options.position !== void 0) body.position = options.position;
215
- if (options.hoist_position !== void 0) body.hoist_position = options.hoist_position;
216
- const data = await this.client.rest.post(Routes2.guildRoles(this.id), {
217
- body: Object.keys(body).length ? body : void 0,
218
- auth: true
219
- });
220
- const role = new Role(this.client, data, this.id);
221
- this.roles.set(role.id, role);
222
- return role;
223
- }
224
- /**
225
- * Fetch all roles in this guild.
226
- * @returns Array of Role objects (cached in guild.roles)
227
- */
228
- async fetchRoles() {
229
- const data = await this.client.rest.get(
230
- Routes2.guildRoles(this.id)
231
- );
232
- const list = Array.isArray(data) ? data : Object.values(data ?? {});
233
- const roles = [];
234
- for (const r of list) {
235
- const role = new Role(this.client, r, this.id);
236
- this.roles.set(role.id, role);
237
- roles.push(role);
238
- }
239
- return roles;
240
- }
241
- /**
242
- * Fetch a role by ID.
243
- * @param roleId - The role ID to fetch
244
- * @returns The role
245
- * @throws FluxerError with ROLE_NOT_FOUND if role does not exist (404)
246
- */
247
- async fetchRole(roleId) {
248
- try {
249
- const data = await this.client.rest.get(Routes2.guildRole(this.id, roleId));
250
- const role = new Role(this.client, data, this.id);
251
- this.roles.set(role.id, role);
252
- return role;
253
- } catch (err) {
254
- const statusCode = err instanceof FluxerAPIError ? err.statusCode : err?.statusCode;
255
- if (statusCode === 404) {
256
- throw new FluxerError(`Role ${roleId} not found in guild`, {
257
- code: ErrorCodes.RoleNotFound,
258
- cause: err
259
- });
260
- }
261
- throw err instanceof FluxerError ? err : new FluxerError("Failed to fetch guild role", { cause: err });
262
- }
263
- }
264
- /**
265
- * Resolve a role ID from an argument (role mention, raw ID, or name).
266
- * Fetches guild roles if name is provided.
267
- * @param arg - Role mention (@role), role ID, or role name
268
- * @returns The role ID, or null if not found
269
- */
270
- async resolveRoleId(arg) {
271
- const parsed = parseRoleMention(arg);
272
- if (parsed) return parsed;
273
- if (/^\d{17,19}$/.test(arg.trim())) return arg.trim();
274
- const cached = this.roles.find(
275
- (r) => !!(r.name && r.name.toLowerCase() === arg.trim().toLowerCase())
276
- );
277
- if (cached) return cached.id;
278
- const roles = await this.client.rest.get(Routes2.guildRoles(this.id));
279
- const list = Array.isArray(roles) ? roles : Object.values(roles ?? {});
280
- const role = list.find((r) => !!(r.name && r.name.toLowerCase() === arg.trim().toLowerCase()));
281
- if (role) {
282
- this.roles.set(role.id, new Role(this.client, role, this.id));
283
- return role.id;
284
- }
285
- return null;
286
- }
287
- /**
288
- * Ban a user from this guild.
289
- * @param userId - The user ID to ban
290
- * @param options - Optional reason, delete_message_days (0–7), and ban_duration_seconds (temporary ban).
291
- * ban_duration_seconds: 0 = permanent, or use 3600, 43200, 86400, 259200, 432000, 604800, 1209600, 2592000.
292
- * Requires Ban Members permission.
293
- */
294
- async ban(userId, options) {
295
- const body = {};
296
- if (options?.reason) body.reason = options.reason;
297
- if (options?.delete_message_days != null)
298
- body.delete_message_days = options.delete_message_days;
299
- if (options?.ban_duration_seconds != null)
300
- body.ban_duration_seconds = options.ban_duration_seconds;
301
- await this.client.rest.put(Routes2.guildBan(this.id, userId), {
302
- body: Object.keys(body).length ? body : void 0,
303
- auth: true
304
- });
305
- }
306
- /**
307
- * Fetch guild bans. Requires Ban Members permission.
308
- * @returns List of GuildBan objects
309
- */
310
- async fetchBans() {
311
- const { GuildBan } = await import("./GuildBan-7CXLTPKY.mjs");
312
- const data = await this.client.rest.get(Routes2.guildBans(this.id));
313
- const list = Array.isArray(data) ? data : data?.bans ?? [];
314
- return list.map((b) => new GuildBan(this.client, { ...b, guild_id: this.id }, this.id));
315
- }
316
- /**
317
- * Remove a ban (unban a user).
318
- * @param userId - The user ID to unban
319
- * Requires Ban Members permission.
320
- */
321
- async unban(userId) {
322
- await this.client.rest.delete(Routes2.guildBan(this.id, userId), { auth: true });
323
- }
324
- /**
325
- * Kick a member from this guild.
326
- * @param userId - The user ID to kick
327
- * Requires Kick Members permission.
328
- */
329
- async kick(userId) {
330
- await this.client.rest.delete(Routes2.guildMember(this.id, userId), { auth: true });
331
- }
332
- /**
333
- * Fetch a guild member by user ID.
334
- * @param userId - The user ID of the member to fetch
335
- * @returns The guild member
336
- * @throws FluxerError with MEMBER_NOT_FOUND if user is not in the guild (404)
337
- * @throws FluxerError with cause for permission denied (403) or other REST errors
338
- */
339
- async fetchMember(userId) {
340
- try {
341
- const data = await this.client.rest.get(
342
- Routes2.guildMember(this.id, userId)
343
- );
344
- const member = new GuildMember(this.client, { ...data, guild_id: this.id }, this);
345
- this.members.set(member.id, member);
346
- return member;
347
- } catch (err) {
348
- const statusCode = err instanceof FluxerAPIError ? err.statusCode : err?.statusCode;
349
- if (statusCode === 404) {
350
- throw new FluxerError(`Member ${userId} not found in guild`, {
351
- code: ErrorCodes.MemberNotFound,
352
- cause: err
353
- });
354
- }
355
- throw err instanceof FluxerError ? err : new FluxerError("Failed to fetch guild member", { cause: err });
356
- }
357
- }
358
- /**
359
- * Fetch guild audit logs. Requires View Audit Log permission.
360
- * @param options - Optional limit, before, after, user_id, action_type for filtering
361
- */
362
- async fetchAuditLogs(options) {
363
- const params = new URLSearchParams();
364
- if (options?.limit != null) params.set("limit", String(options.limit));
365
- if (options?.before) params.set("before", options.before);
366
- if (options?.after) params.set("after", options.after);
367
- if (options?.userId) params.set("user_id", options.userId);
368
- if (options?.actionType != null) params.set("action_type", String(options.actionType));
369
- const qs = params.toString();
370
- const url = Routes2.guildAuditLogs(this.id) + (qs ? `?${qs}` : "");
371
- return this.client.rest.get(url);
372
- }
373
- /** Fetch all webhooks in this guild. Returned webhooks do not include the token (cannot send). */
374
- async fetchWebhooks() {
375
- const { Webhook } = await import("./Webhook-A5KZ4S4N.mjs");
376
- const data = await this.client.rest.get(Routes2.guildWebhooks(this.id));
377
- const list = Array.isArray(data) ? data : Object.values(data ?? {});
378
- return list.map((w) => new Webhook(this.client, w));
379
- }
380
- /**
381
- * Create a channel in this guild.
382
- * @param data - Channel data: type (0=text, 2=voice, 4=category, 5=link), name, and optional parent_id, topic, bitrate, user_limit, nsfw, permission_overwrites
383
- * Requires Manage Channels permission.
384
- */
385
- async createChannel(data) {
386
- const { Channel } = await import("./Channel-PCUCLDOG.mjs");
387
- const created = await this.client.rest.post(Routes2.guildChannels(this.id), {
388
- body: data,
389
- auth: true
390
- });
391
- const channel = Channel.from(this.client, created);
392
- if (channel) {
393
- this.client.channels.set(channel.id, channel);
394
- this.channels.set(channel.id, channel);
395
- }
396
- return channel;
397
- }
398
- /**
399
- * Fetch all channels in this guild.
400
- * @returns Array of GuildChannel objects (cached in guild.channels and client.channels)
401
- */
402
- async fetchChannels() {
403
- const { Channel } = await import("./Channel-PCUCLDOG.mjs");
404
- const data = await this.client.rest.get(Routes2.guildChannels(this.id));
405
- const list = Array.isArray(data) ? data : Object.values(data ?? {});
406
- const channels = [];
407
- for (const ch of list) {
408
- const channel = Channel.from(this.client, ch);
409
- if (channel) {
410
- this.client.channels.set(channel.id, channel);
411
- this.channels.set(channel.id, channel);
412
- channels.push(channel);
413
- }
414
- }
415
- return channels;
416
- }
417
- /**
418
- * Edit this guild. PATCH /guilds/{id}.
419
- * Requires guild owner or Administrator.
420
- */
421
- async edit(options) {
422
- const data = await this.client.rest.patch(Routes2.guild(this.id), {
423
- body: options,
424
- auth: true
425
- });
426
- this.name = data.name;
427
- this.icon = data.icon ?? this.icon;
428
- this.banner = data.banner ?? this.banner;
429
- this.splash = data.splash ?? this.splash;
430
- this.systemChannelId = data.system_channel_id ?? this.systemChannelId;
431
- this.afkChannelId = data.afk_channel_id ?? this.afkChannelId;
432
- this.afkTimeout = data.afk_timeout ?? this.afkTimeout;
433
- this.verificationLevel = data.verification_level ?? this.verificationLevel;
434
- this.mfaLevel = data.mfa_level ?? this.mfaLevel;
435
- this.explicitContentFilter = data.explicit_content_filter ?? this.explicitContentFilter;
436
- this.defaultMessageNotifications = data.default_message_notifications ?? this.defaultMessageNotifications;
437
- this.features = data.features ?? this.features;
438
- return this;
439
- }
440
- /**
441
- * Delete this guild. POST /guilds/{id}/delete.
442
- * Must be the guild owner.
443
- */
444
- async delete() {
445
- await this.client.rest.post(Routes2.guildDelete(this.id), { auth: true });
446
- this.client.guilds.delete(this.id);
447
- }
448
- /**
449
- * Fetch vanity URL for this guild. GET /guilds/{id}/vanity-url.
450
- * Requires Manage Guild permission.
451
- */
452
- async fetchVanityURL() {
453
- return this.client.rest.get(Routes2.guildVanityUrl(this.id), { auth: true });
454
- }
455
- /**
456
- * Transfer guild ownership to another user. POST /guilds/{id}/transfer-ownership.
457
- * Must be the guild owner.
458
- */
459
- async transferOwnership(newOwnerId, password) {
460
- await this.client.rest.post(Routes2.guildTransferOwnership(this.id), {
461
- body: { new_owner_id: newOwnerId, ...password != null && { password } },
462
- auth: true
463
- });
464
- }
465
- /**
466
- * Set text channel flexible names feature. PATCH /guilds/{id}/text-channel-flexible-names.
467
- */
468
- setTextChannelFlexibleNames(enabled) {
469
- return this.client.rest.patch(Routes2.guildTextChannelFlexibleNames(this.id), {
470
- body: { enabled },
471
- auth: true
472
- }).then(() => this);
473
- }
474
- /**
475
- * Set detached banner feature. PATCH /guilds/{id}/detached-banner.
476
- */
477
- setDetachedBanner(enabled) {
478
- return this.client.rest.patch(Routes2.guildDetachedBanner(this.id), {
479
- body: { enabled },
480
- auth: true
481
- }).then(() => this);
482
- }
483
- /**
484
- * Set disallow unclaimed accounts. PATCH /guilds/{id}/disallow-unclaimed-accounts.
485
- */
486
- setDisallowUnclaimedAccounts(enabled) {
487
- return this.client.rest.patch(Routes2.guildDisallowUnclaimedAccounts(this.id), {
488
- body: { enabled },
489
- auth: true
490
- }).then(() => this);
491
- }
492
- /**
493
- * Update role positions. PATCH /guilds/{id}/roles.
494
- * @param updates - Array of { id, position? }
495
- */
496
- async setRolePositions(updates) {
497
- const data = await this.client.rest.patch(
498
- Routes2.guildRoles(this.id),
499
- { body: updates, auth: true }
500
- );
501
- const list = Array.isArray(data) ? data : Object.values(data ?? {});
502
- for (const r of list) {
503
- this.roles.set(r.id, new Role(this.client, r, this.id));
504
- }
505
- return list;
506
- }
507
- /**
508
- * Update role hoist positions. PATCH /guilds/{id}/roles/hoist-positions.
509
- */
510
- async setRoleHoistPositions(updates) {
511
- const data = await this.client.rest.patch(
512
- Routes2.guildRolesHoistPositions(this.id),
513
- { body: updates, auth: true }
514
- );
515
- const list = Array.isArray(data) ? data : Object.values(data ?? {});
516
- for (const r of list) {
517
- this.roles.set(r.id, new Role(this.client, r, this.id));
518
- }
519
- return list;
520
- }
521
- /**
522
- * Reset role hoist positions. DELETE /guilds/{id}/roles/hoist-positions.
523
- */
524
- async resetRoleHoistPositions() {
525
- const data = await this.client.rest.delete(
526
- Routes2.guildRolesHoistPositions(this.id),
527
- { auth: true }
528
- );
529
- const list = Array.isArray(data) ? data : Object.values(data ?? {});
530
- for (const r of list) {
531
- this.roles.set(r.id, new Role(this.client, r, this.id));
532
- }
533
- return list;
534
- }
535
- /**
536
- * Update channel positions.
537
- * @param updates - Array of { id, position?, parent_id?, lock_permissions? }
538
- * Requires Manage Channels permission.
539
- */
540
- async setChannelPositions(updates) {
541
- await this.client.rest.patch(Routes2.guildChannels(this.id), {
542
- body: updates,
543
- auth: true
544
- });
545
- }
546
- /**
547
- * Bulk create emojis. POST /guilds/{id}/emojis/bulk.
548
- * @param emojis - Array of { name, image } (base64), 1-50 emojis
549
- * @returns Array of created GuildEmoji objects
550
- */
551
- async createEmojisBulk(emojis) {
552
- const { GuildEmoji } = await import("./GuildEmoji-SOGQ4C32.mjs");
553
- const data = await this.client.rest.post(Routes2.guildEmojisBulk(this.id), {
554
- body: { emojis },
555
- auth: true
556
- });
557
- const list = Array.isArray(data) ? data : data?.emojis ?? [];
558
- return list.map((e) => new GuildEmoji(this.client, { ...e, guild_id: this.id }, this.id));
559
- }
560
- /**
561
- * Bulk create stickers. POST /guilds/{id}/stickers/bulk.
562
- * @param stickers - Array of { name, image, description?, tags? }, 1-50 stickers
563
- * @returns Array of created GuildSticker objects
564
- */
565
- async createStickersBulk(stickers) {
566
- const { GuildSticker } = await import("./GuildSticker-3QYT6ZIY.mjs");
567
- const data = await this.client.rest.post(Routes2.guildStickersBulk(this.id), {
568
- body: { stickers },
569
- auth: true
570
- });
571
- const list = Array.isArray(data) ? data : data?.stickers ?? [];
572
- return list.map((s) => new GuildSticker(this.client, { ...s, guild_id: this.id }, this.id));
573
- }
574
- };
575
-
576
- export {
577
- GuildMemberManager,
578
- Guild
579
- };
@@ -1,71 +0,0 @@
1
- import {
2
- GuildMember
3
- } from "./chunk-NISGA2YZ.mjs";
4
- import {
5
- CDN_URL
6
- } from "./chunk-J3EIGOXQ.mjs";
7
- import {
8
- Base
9
- } from "./chunk-XNS4O6QJ.mjs";
10
-
11
- // src/structures/Guild.ts
12
- import { Collection } from "@fluxerjs/collection";
13
- import { Routes } from "@fluxerjs/types";
14
- var Guild = class extends Base {
15
- client;
16
- id;
17
- name;
18
- icon;
19
- banner;
20
- ownerId;
21
- members = new Collection();
22
- channels = new Collection();
23
- /** @param data - API guild from GET /guilds/{id} or gateway GUILD_CREATE */
24
- constructor(client, data) {
25
- super();
26
- this.client = client;
27
- this.id = data.id;
28
- this.name = data.name;
29
- this.icon = data.icon ?? null;
30
- this.banner = data.banner ?? null;
31
- this.ownerId = data.owner_id;
32
- }
33
- /** Get the guild icon URL, or null if no icon. */
34
- iconURL(options) {
35
- if (!this.icon) return null;
36
- const size = options?.size ? `?size=${options.size}` : "";
37
- return `${CDN_URL}/icons/${this.id}/${this.icon}.png${size}`;
38
- }
39
- /** Get the guild banner URL, or null if no banner. */
40
- bannerURL(options) {
41
- if (!this.banner) return null;
42
- const size = options?.size ? `?size=${options.size}` : "";
43
- return `${CDN_URL}/banners/${this.id}/${this.banner}.png${size}`;
44
- }
45
- /**
46
- * Fetch a guild member by user ID.
47
- * @param userId - The user ID of the member to fetch
48
- * @returns The guild member, or null if not found
49
- */
50
- async fetchMember(userId) {
51
- try {
52
- const data = await this.client.rest.get(
53
- Routes.guildMember(this.id, userId)
54
- );
55
- return new GuildMember(this.client, { ...data, guild_id: this.id }, this);
56
- } catch {
57
- return null;
58
- }
59
- }
60
- /** Fetch all webhooks in this guild. Returned webhooks do not include the token (cannot send). */
61
- async fetchWebhooks() {
62
- const { Webhook } = await import("./Webhook-TGAZZRQQ.mjs");
63
- const data = await this.client.rest.get(Routes.guildWebhooks(this.id));
64
- const list = Array.isArray(data) ? data : Object.values(data ?? {});
65
- return list.map((w) => new Webhook(this.client, w));
66
- }
67
- };
68
-
69
- export {
70
- Guild
71
- };