cognova 0.2.6 → 0.2.8

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 (1070) hide show
  1. package/.output/nitro.json +1 -1
  2. package/.output/public/_nuxt/{BjFs8Ujb.js → -2AbaFNH.js} +1 -1
  3. package/.output/public/_nuxt/{B5OWqWCh.js → 0dqQoCHY.js} +1 -1
  4. package/.output/public/_nuxt/{DZ_azKLI.js → 2QHXgMyi.js} +1 -1
  5. package/.output/public/_nuxt/{DaiWSWdm.js → 36ZHqDPo.js} +1 -1
  6. package/.output/public/_nuxt/4XnyUc7C.js +1 -0
  7. package/.output/public/_nuxt/{DgKeJf5C.js → 6QDVg5TO.js} +1 -1
  8. package/.output/public/_nuxt/{RRoc4m9d.js → B-AlyT2D.js} +1 -1
  9. package/.output/public/_nuxt/{1Hz98MKF.js → B0xuHXvN.js} +1 -1
  10. package/.output/public/_nuxt/{BW-E-Sar.js → B2Xfh7am.js} +1 -1
  11. package/.output/public/_nuxt/{Bb1B0ntt.js → B5SnZL2l.js} +1 -1
  12. package/.output/public/_nuxt/{CEfkp9Rl.js → B6-U3KqJ.js} +2 -2
  13. package/.output/public/_nuxt/{Cebw7Q7c.js → B6G3NLfW.js} +1 -1
  14. package/.output/public/_nuxt/B8TQvzYX.js +1 -0
  15. package/.output/public/_nuxt/{D3V98LVR.js → B9zgEO8N.js} +1 -1
  16. package/.output/public/_nuxt/{CNwGp6eP.js → BBDxhFYY.js} +1 -1
  17. package/.output/public/_nuxt/{Dkzqkzki.js → BCCYopTB.js} +1 -1
  18. package/.output/public/_nuxt/{CfWDee_q.js → BE1CVWts.js} +1 -1
  19. package/.output/public/_nuxt/{BTk5mgdf.js → BF3tVKtX.js} +1 -1
  20. package/.output/public/_nuxt/{HCCuOAgZ.js → BHn8tRjg.js} +1 -1
  21. package/.output/public/_nuxt/BIo-9u_O.js +1 -0
  22. package/.output/public/_nuxt/{CG0fS-BQ.js → BJUff9Ku.js} +1 -1
  23. package/.output/public/_nuxt/{CrjKigv8.js → BLm0UviR.js} +1 -1
  24. package/.output/public/_nuxt/BLwctszt.js +1 -0
  25. package/.output/public/_nuxt/BMs0mHEp.js +1 -0
  26. package/.output/public/_nuxt/{DV0JMebZ.js → BSA-U0so.js} +1 -1
  27. package/.output/public/_nuxt/{D-wVwRIx.js → BUC36BHp.js} +1 -1
  28. package/.output/public/_nuxt/{CzqLfT8k.js → BVEFmI4I.js} +1 -1
  29. package/.output/public/_nuxt/{B43p0So7.js → BXtZVbmx.js} +1 -1
  30. package/.output/public/_nuxt/{BJ_GgKV0.js → BYtVdUIW.js} +1 -1
  31. package/.output/public/_nuxt/{CJ85o8FK.js → BZBNJD7U.js} +1 -1
  32. package/.output/public/_nuxt/{Dpp5cOwJ.js → BahXyh-A.js} +1 -1
  33. package/.output/public/_nuxt/{BmTCDcNm.js → BdxP21ep.js} +1 -1
  34. package/.output/public/_nuxt/{Bc0NIKN7.js → BefOhWHD.js} +1 -1
  35. package/.output/public/_nuxt/{DuOsLoVR.js → BhYoxmLV.js} +1 -1
  36. package/.output/public/_nuxt/{BMLwzSDu.js → Bhhg7oSf.js} +1 -1
  37. package/.output/public/_nuxt/{deSeNTOh.js → BjnQ1pI1.js} +1 -1
  38. package/.output/public/_nuxt/{qW7F87d8.js → BkO884Ds.js} +3 -3
  39. package/.output/public/_nuxt/{BNlugvM3.js → Bkc1Hpcf.js} +1 -1
  40. package/.output/public/_nuxt/{DgPiIWA2.js → BlsIfvSf.js} +1 -1
  41. package/.output/public/_nuxt/{Dysa6np_.js → BmaHzvZM.js} +1 -1
  42. package/.output/public/_nuxt/{CBrXB4hk.js → BmdlymIW.js} +1 -1
  43. package/.output/public/_nuxt/{CK5Ef4YR.js → BnJ-6YDw.js} +1 -1
  44. package/.output/public/_nuxt/{C5nfaH9w.js → BqTdsCnW.js} +1 -1
  45. package/.output/public/_nuxt/{CjRmY2OQ.js → BrOKokPO.js} +1 -1
  46. package/.output/public/_nuxt/{B7-0ADn3.js → Buf1PAiO.js} +1 -1
  47. package/.output/public/_nuxt/{CqiOV9n1.js → BvstjGHC.js} +1 -1
  48. package/.output/public/_nuxt/{DsKy-gee.js → BwC62XRN.js} +1 -1
  49. package/.output/public/_nuxt/{WWNeb45u.js → Bwn-CRYH.js} +1 -1
  50. package/.output/public/_nuxt/{BsXPllgv.js → BwyXWqBY.js} +1 -1
  51. package/.output/public/_nuxt/{C6Kc4XvS.js → BxShcW0K.js} +1 -1
  52. package/.output/public/_nuxt/{NBE83ZQn.js → C-HCArYP.js} +1 -1
  53. package/.output/public/_nuxt/{sdvIKLwS.js → C-Ygk9x5.js} +1 -1
  54. package/.output/public/_nuxt/{Dx2Tgm6S.js → C075hYlX.js} +1 -1
  55. package/.output/public/_nuxt/{C14DGwaT.js → C13FKhqK.js} +1 -1
  56. package/.output/public/_nuxt/{BLszW9T3.js → C1tCdK-M.js} +1 -1
  57. package/.output/public/_nuxt/{BdCB2PoJ.js → C21BjagS.js} +1 -1
  58. package/.output/public/_nuxt/{B_28CKij.js → C24so3m7.js} +2 -2
  59. package/.output/public/_nuxt/{Drr-RSSP.js → C3tximD1.js} +1 -1
  60. package/.output/public/_nuxt/{XzRnkkwG.js → C6FFW_cO.js} +1 -1
  61. package/.output/public/_nuxt/{Cedv1M65.js → C6sX7TYf.js} +1 -1
  62. package/.output/public/_nuxt/{CnW8zyuA.js → C7qhmmZh.js} +1 -1
  63. package/.output/public/_nuxt/{CSQ-nblB.js → CAfyXyeo.js} +1 -1
  64. package/.output/public/_nuxt/{DxR8g9So.js → CClsKJ9A.js} +1 -1
  65. package/.output/public/_nuxt/{Ci-MVdCd.js → CDkyQ1eQ.js} +1 -1
  66. package/.output/public/_nuxt/CE9_ECxx.js +1 -0
  67. package/.output/public/_nuxt/{JJIcQEna.js → CEDw8osP.js} +1 -1
  68. package/.output/public/_nuxt/{CwJR22-0.js → CEz288t8.js} +1 -1
  69. package/.output/public/_nuxt/{BvuV9uCn.js → CF33v_m5.js} +1 -1
  70. package/.output/public/_nuxt/{DytaiikM.js → CH_jROT9.js} +1 -1
  71. package/.output/public/_nuxt/{NlScC3GW.js → CO3hceDE.js} +1 -1
  72. package/.output/public/_nuxt/{ByfSJZV6.js → CQ3tAemj.js} +1 -1
  73. package/.output/public/_nuxt/{DMsHLHmB.js → CSHcfejh.js} +1 -1
  74. package/.output/public/_nuxt/{DAs574wU.js → CSjOaBKu.js} +1 -1
  75. package/.output/public/_nuxt/{DNpsjOxN.js → CVYcsqmL.js} +1 -1
  76. package/.output/public/_nuxt/{DfpSaqgV.js → CXTrUfQ5.js} +1 -1
  77. package/.output/public/_nuxt/{0LyRrTRM.js → CY7f553E.js} +1 -1
  78. package/.output/public/_nuxt/{A5lrd5_j.js → CYQP4zpi.js} +1 -1
  79. package/.output/public/_nuxt/CbvNJVrk.js +1 -0
  80. package/.output/public/_nuxt/CewcVxDS.js +1 -0
  81. package/.output/public/_nuxt/{1IuG3yiQ.js → CfY_bsV0.js} +1 -1
  82. package/.output/public/_nuxt/{4bC1z31I.js → ClGn48iq.js} +1 -1
  83. package/.output/public/_nuxt/{CwaMSU1O.js → CqFcWBkW.js} +1 -1
  84. package/.output/public/_nuxt/Cr0NfhPB.js +1 -0
  85. package/.output/public/_nuxt/{CXuKrnTA.js → CrmE-JGu.js} +1 -1
  86. package/.output/public/_nuxt/{CW8xtqwN.js → Cve4psva.js} +1 -1
  87. package/.output/public/_nuxt/{BsPj3ifk.js → CzAZpALW.js} +1 -1
  88. package/.output/public/_nuxt/{S4a_N6rD.js → D-5A6cMB.js} +1 -1
  89. package/.output/public/_nuxt/{HC3657Xq.js → D-Ge96eV.js} +1 -1
  90. package/.output/public/_nuxt/{fTEmwfo4.js → D04CyXmf.js} +1 -1
  91. package/.output/public/_nuxt/{B9Kd_0HK.js → D2kQkOaG.js} +1 -1
  92. package/.output/public/_nuxt/{jeu3Xx8e.js → D4Cizi4y.js} +1 -1
  93. package/.output/public/_nuxt/{B-5roYpk.js → D4X6ONPF.js} +1 -1
  94. package/.output/public/_nuxt/{_16_b82K.js → D4_89MZm.js} +1 -1
  95. package/.output/public/_nuxt/{Db5XIfWS.js → D79lbuWG.js} +1 -1
  96. package/.output/public/_nuxt/{DAFasgHH.js → D7pKT3IW.js} +1 -1
  97. package/.output/public/_nuxt/{DZdh7_lh.js → D887s9k9.js} +1 -1
  98. package/.output/public/_nuxt/{DImdNj-F.js → D9aYkNhQ.js} +1 -1
  99. package/.output/public/_nuxt/{BoPAYize.js → DJt7Rogf.js} +1 -1
  100. package/.output/public/_nuxt/{BZFXnEwe.js → DKKY8zWm.js} +1 -1
  101. package/.output/public/_nuxt/{BJi2ZHtT.js → DLUvsixu.js} +1 -1
  102. package/.output/public/_nuxt/{zBoPDS4z.js → DMb_1D81.js} +1 -1
  103. package/.output/public/_nuxt/{CzTTKfet.js → DX_9SfFb.js} +1 -1
  104. package/.output/public/_nuxt/{CpC3C9gj.js → DZEuR9ms.js} +1 -1
  105. package/.output/public/_nuxt/{DCco_rlV.js → D_O7SlHm.js} +1 -1
  106. package/.output/public/_nuxt/{DvgLoqaC.js → D_obX2Hj.js} +1 -1
  107. package/.output/public/_nuxt/{CeDxLTxX.js → DaBSQDif.js} +1 -1
  108. package/.output/public/_nuxt/{DB3y_21M.js → Dbfwn2zk.js} +1 -1
  109. package/.output/public/_nuxt/{-2wkydbj.js → DcbbfwCe.js} +1 -1
  110. package/.output/public/_nuxt/{MdebRWqA.js → DmDPSvxi.js} +1 -1
  111. package/.output/public/_nuxt/{CVr40yKH.js → DmOS3vFH.js} +1 -1
  112. package/.output/public/_nuxt/DmcMCO8x.js +1 -0
  113. package/.output/public/_nuxt/DmlZSBjF.js +1 -0
  114. package/.output/public/_nuxt/{CB8_A8N4.js → DqzomZoo.js} +1 -1
  115. package/.output/public/_nuxt/{0J8pJb0Z.js → Drxf7nJz.js} +1 -1
  116. package/.output/public/_nuxt/{CjYUi9c8.js → Dt5mOzXj.js} +1 -1
  117. package/.output/public/_nuxt/{Brqrl-cH.js → DtJnWtpL.js} +1 -1
  118. package/.output/public/_nuxt/{CwCEQ4Dw.js → DtyyytRx.js} +1 -1
  119. package/.output/public/_nuxt/{CphXSvBo.js → DwIYtFfA.js} +1 -1
  120. package/.output/public/_nuxt/{CLZS246x.js → GGcn5KPW.js} +1 -1
  121. package/.output/public/_nuxt/{pkbwpgSD.js → GYf-vnR6.js} +1 -1
  122. package/.output/public/_nuxt/{Bn8loaeQ.js → ImPsUDiH.js} +1 -1
  123. package/.output/public/_nuxt/{hqpqUuXS.js → JReYPlwF.js} +1 -1
  124. package/.output/public/_nuxt/{CgQKyBSS.js → KEeoKtq_.js} +1 -1
  125. package/.output/public/_nuxt/{Bf34lExB.js → LQNRVThr.js} +1 -1
  126. package/.output/public/_nuxt/{BhOIdu3Z.js → MWUW1sIF.js} +1 -1
  127. package/.output/public/_nuxt/{w3t8WD8v.js → Pn7VD6uQ.js} +1 -1
  128. package/.output/public/_nuxt/{BaJEGr8G.js → SfaNtyKS.js} +1 -1
  129. package/.output/public/_nuxt/{vM-wdhkZ.js → U3f6dy8i.js} +1 -1
  130. package/.output/public/_nuxt/builds/latest.json +1 -1
  131. package/.output/public/_nuxt/builds/meta/410e449d-9fe8-43a0-ae07-80797693b9b8.json +1 -0
  132. package/.output/public/_nuxt/{BrICHPil.js → cPPThz84.js} +1 -1
  133. package/.output/public/_nuxt/{CxJr4mB0.js → dB7G4iIC.js} +1 -1
  134. package/.output/public/_nuxt/{EgYyfo1g.js → eE8TtXgC.js} +3 -3
  135. package/.output/public/_nuxt/iBaivqi8.js +1 -0
  136. package/.output/public/_nuxt/{BLL1JLwq.js → ijmD2cEW.js} +1 -1
  137. package/.output/public/_nuxt/{DpYns7cT.js → it8syoZI.js} +1 -1
  138. package/.output/public/_nuxt/mT7Mt2d7.js +1 -0
  139. package/.output/public/_nuxt/{Bb9LNSu_.js → mfAEx0Kz.js} +1 -1
  140. package/.output/public/_nuxt/{MzEmU9ER.js → nHSiDk8N.js} +1 -1
  141. package/.output/public/_nuxt/{CvMqUdkl.js → njnzCNrH.js} +3 -3
  142. package/.output/public/_nuxt/{atVSHCxP.js → pHCJ6lhw.js} +1 -1
  143. package/.output/public/_nuxt/{Cow1TrPj.js → vES4kgx7.js} +1 -1
  144. package/.output/public/_nuxt/{Zjvb5YJR.js → yJ9vRvHj.js} +1 -1
  145. package/.output/public/_nuxt/{B8Kve-DH.js → zO9MgHj2.js} +1 -1
  146. package/.output/public/_nuxt/{BaVaTug8.js → zXvvpsZj.js} +1 -1
  147. package/.output/server/chunks/build/A-BWukSPjS.mjs +0 -1
  148. package/.output/server/chunks/build/Accordion-BaJYea6e.mjs +0 -1
  149. package/.output/server/chunks/build/AccordionItem-DdG2zgcN.mjs +0 -1
  150. package/.output/server/chunks/build/Badge-BrU9UkCv.mjs +0 -1
  151. package/.output/server/chunks/build/Blockquote-DND8wTkU.mjs +0 -1
  152. package/.output/server/chunks/build/Callout-1halpaEg.mjs +0 -1
  153. package/.output/server/chunks/build/Card-BHCSDKDt.mjs +0 -1
  154. package/.output/server/chunks/build/CardGroup-BOuJcNGp.mjs +0 -1
  155. package/.output/server/chunks/build/Caution-BP3y-TcC.mjs +0 -1
  156. package/.output/server/chunks/build/Code-B1xkAS5a.mjs +0 -1
  157. package/.output/server/chunks/build/CodeCollapse-BIhaNa22.mjs +0 -1
  158. package/.output/server/chunks/build/CodeGroup-BviYyCuo.mjs +0 -1
  159. package/.output/server/chunks/build/CodeIcon-CWD5HcV7.mjs +0 -1
  160. package/.output/server/chunks/build/CodePreview-D8PsCQ6m.mjs +0 -1
  161. package/.output/server/chunks/build/CodeTree-BUTLupmL.mjs +0 -1
  162. package/.output/server/chunks/build/Collapsible-BIvXNaSq.mjs +0 -1
  163. package/.output/server/chunks/build/Em-DsIz_BnD.mjs +0 -1
  164. package/.output/server/chunks/build/Field-cwwmSQDT.mjs +0 -1
  165. package/.output/server/chunks/build/FieldGroup-CAIpQv8s.mjs +0 -1
  166. package/.output/server/chunks/build/H1-BbFNsPyP.mjs +0 -1
  167. package/.output/server/chunks/build/H2-vHTl_pWr.mjs +0 -1
  168. package/.output/server/chunks/build/H3-7eTcfO3s.mjs +0 -1
  169. package/.output/server/chunks/build/H4-C89p_PKO.mjs +0 -1
  170. package/.output/server/chunks/build/Hr-Bm8RlL3O.mjs +0 -1
  171. package/.output/server/chunks/build/Icon-Dp9iy0BI.mjs +0 -1
  172. package/.output/server/chunks/build/Img-CWLmvN1t.mjs +0 -1
  173. package/.output/server/chunks/build/Kbd-CQG6I_Ch.mjs +0 -1
  174. package/.output/server/chunks/build/Li-Bw1QUaGv.mjs +0 -1
  175. package/.output/server/chunks/build/Note-CHkjm9jm.mjs +0 -1
  176. package/.output/server/chunks/build/Ol-D-fPnfFM.mjs +0 -1
  177. package/.output/server/chunks/build/P-B5YI1V9y.mjs +0 -1
  178. package/.output/server/chunks/build/Pre-ChiJcf3C.mjs +0 -1
  179. package/.output/server/chunks/build/ProseH5-DahJyv8h.mjs +0 -1
  180. package/.output/server/chunks/build/ProseH6-C4Is5h6c.mjs +0 -1
  181. package/.output/server/chunks/build/Steps-BZpvXfzb.mjs +0 -1
  182. package/.output/server/chunks/build/Strong-DXJqOWL3.mjs +0 -1
  183. package/.output/server/chunks/build/Table-BSrLZ7dt.mjs +0 -1
  184. package/.output/server/chunks/build/Tabs-Dk3nvOFF.mjs +0 -1
  185. package/.output/server/chunks/build/TabsItem-CDhyuBtJ.mjs +0 -1
  186. package/.output/server/chunks/build/Tbody-CjMT5oH-.mjs +0 -1
  187. package/.output/server/chunks/build/Td-ZBVaEjFN.mjs +0 -1
  188. package/.output/server/chunks/build/Th-D317icbd.mjs +0 -1
  189. package/.output/server/chunks/build/Thead-Ca_ZESTK.mjs +0 -1
  190. package/.output/server/chunks/build/Tip-CP3oTARR.mjs +0 -1
  191. package/.output/server/chunks/build/Tr-6jI8j9gD.mjs +0 -1
  192. package/.output/server/chunks/build/Ul-BUGj_CPb.mjs +0 -1
  193. package/.output/server/chunks/build/Warning-BJ8G6cxC.mjs +0 -1
  194. package/.output/server/chunks/build/_id_-DN00UDdO.mjs +0 -1
  195. package/.output/server/chunks/build/_id_-DN00UDdO.mjs.map +1 -1
  196. package/.output/server/chunks/build/_name_-BnS_KEfX.mjs +0 -1
  197. package/.output/server/chunks/build/_name_-BnS_KEfX.mjs.map +1 -1
  198. package/.output/server/chunks/build/_uuid_-DfJaumTE.mjs +0 -1
  199. package/.output/server/chunks/build/auth-CvD7MqKW.mjs +0 -1
  200. package/.output/server/chunks/build/auth-CvD7MqKW.mjs.map +1 -1
  201. package/.output/server/chunks/build/chat-CZMiB68R.mjs +0 -1
  202. package/.output/server/chunks/build/chat-CZMiB68R.mjs.map +1 -1
  203. package/.output/server/chunks/build/client.precomputed.mjs +1 -1
  204. package/.output/server/chunks/build/dashboard-CLk1NlbR.mjs +0 -1
  205. package/.output/server/chunks/build/dashboard-CLk1NlbR.mjs.map +1 -1
  206. package/.output/server/chunks/build/dashboard-CiVTAZuF.mjs +0 -1
  207. package/.output/server/chunks/build/docs-ChGwOPg5.mjs +0 -1
  208. package/.output/server/chunks/build/error-404-BzbcNcdU.mjs +0 -1
  209. package/.output/server/chunks/build/error-500-uCDjGRW8.mjs +0 -1
  210. package/.output/server/chunks/build/hooks-D328DcO6.mjs +0 -1
  211. package/.output/server/chunks/build/hooks-D328DcO6.mjs.map +1 -1
  212. package/.output/server/chunks/build/index-Byt-3Yq6.mjs +0 -1
  213. package/.output/server/chunks/build/index-C9PuieXh.mjs +0 -1
  214. package/.output/server/chunks/build/index-C9PuieXh.mjs.map +1 -1
  215. package/.output/server/chunks/build/index-CAnGTRlu.mjs +0 -1
  216. package/.output/server/chunks/build/index-DzdvIi8V.mjs +0 -1
  217. package/.output/server/chunks/build/library-Aeg7_Lsb.mjs +0 -1
  218. package/.output/server/chunks/build/library-Aeg7_Lsb.mjs.map +1 -1
  219. package/.output/server/chunks/build/login-DnnElTl2.mjs +0 -1
  220. package/.output/server/chunks/build/memories-BqA719O1.mjs +0 -1
  221. package/.output/server/chunks/build/memories-BqA719O1.mjs.map +1 -1
  222. package/.output/server/chunks/build/server.mjs +1 -2
  223. package/.output/server/chunks/build/{settings-DuT6LGJZ.mjs → settings-ByUXa46k.mjs} +1507 -219
  224. package/.output/server/chunks/build/settings-ByUXa46k.mjs.map +1 -0
  225. package/.output/server/chunks/build/styles.mjs +4 -4
  226. package/.output/server/chunks/build/tasks-DnAFqbtt.mjs +0 -1
  227. package/.output/server/chunks/build/tasks-DnAFqbtt.mjs.map +1 -1
  228. package/.output/server/chunks/build/usage-CSrBh4Or.mjs +0 -1
  229. package/.output/server/chunks/build/view-n2sYa4Zh.mjs +0 -1
  230. package/.output/server/chunks/build/virtual_nuxt__Users_tony_Documents_GitHub_second-brain_node_modules_.cache_nuxt_.nuxt_mdc-imports-PtwWlZ2H.mjs +0 -1
  231. package/.output/server/chunks/nitro/nitro.mjs +888 -880
  232. package/.output/server/chunks/routes/_ws/chat.mjs +0 -1
  233. package/.output/server/chunks/routes/_ws/chat.mjs.map +1 -1
  234. package/.output/server/chunks/routes/api/agents/_id/cancel.post.mjs +0 -1
  235. package/.output/server/chunks/routes/api/agents/_id/cancel.post.mjs.map +1 -1
  236. package/.output/server/chunks/routes/api/agents/_id/run.post.mjs +0 -1
  237. package/.output/server/chunks/routes/api/agents/_id/run.post.mjs.map +1 -1
  238. package/.output/server/chunks/routes/api/agents/_id/runs.get.mjs +0 -1
  239. package/.output/server/chunks/routes/api/agents/_id/runs.get.mjs.map +1 -1
  240. package/.output/server/chunks/routes/api/agents/_id/stats.get.mjs +0 -1
  241. package/.output/server/chunks/routes/api/agents/_id/stats.get.mjs.map +1 -1
  242. package/.output/server/chunks/routes/api/agents/_id_.delete.mjs +0 -1
  243. package/.output/server/chunks/routes/api/agents/_id_.delete.mjs.map +1 -1
  244. package/.output/server/chunks/routes/api/agents/_id_.get.mjs +0 -1
  245. package/.output/server/chunks/routes/api/agents/_id_.get.mjs.map +1 -1
  246. package/.output/server/chunks/routes/api/agents/_id_.patch.mjs +0 -1
  247. package/.output/server/chunks/routes/api/agents/_id_.patch.mjs.map +1 -1
  248. package/.output/server/chunks/routes/api/agents/stats.get.mjs +0 -1
  249. package/.output/server/chunks/routes/api/agents/stats.get.mjs.map +1 -1
  250. package/.output/server/chunks/routes/api/auth/_...all_.mjs +0 -1
  251. package/.output/server/chunks/routes/api/auth/_...all_.mjs.map +1 -1
  252. package/.output/server/chunks/routes/api/bridges/_id/health.get.mjs +0 -1
  253. package/.output/server/chunks/routes/api/bridges/_id/health.get.mjs.map +1 -1
  254. package/.output/server/chunks/routes/api/bridges/_id_.delete.mjs +0 -1
  255. package/.output/server/chunks/routes/api/bridges/_id_.delete.mjs.map +1 -1
  256. package/.output/server/chunks/routes/api/bridges/_id_.get.mjs +0 -1
  257. package/.output/server/chunks/routes/api/bridges/_id_.get.mjs.map +1 -1
  258. package/.output/server/chunks/routes/api/bridges/_id_.put.mjs +0 -1
  259. package/.output/server/chunks/routes/api/bridges/_id_.put.mjs.map +1 -1
  260. package/.output/server/chunks/routes/api/bridges/context.get.mjs +0 -1
  261. package/.output/server/chunks/routes/api/bridges/context.get.mjs.map +1 -1
  262. package/.output/server/chunks/routes/api/conversations/_id_.delete.mjs +0 -1
  263. package/.output/server/chunks/routes/api/conversations/_id_.delete.mjs.map +1 -1
  264. package/.output/server/chunks/routes/api/conversations/_id_.get.mjs +0 -1
  265. package/.output/server/chunks/routes/api/conversations/_id_.get.mjs.map +1 -1
  266. package/.output/server/chunks/routes/api/dashboard/overview.get.mjs +0 -1
  267. package/.output/server/chunks/routes/api/dashboard/overview.get.mjs.map +1 -1
  268. package/.output/server/chunks/routes/api/documents/_id/public.get.mjs +0 -1
  269. package/.output/server/chunks/routes/api/documents/_id/public.get.mjs.map +1 -1
  270. package/.output/server/chunks/routes/api/documents/_id/restore.post.mjs +0 -1
  271. package/.output/server/chunks/routes/api/documents/_id/restore.post.mjs.map +1 -1
  272. package/.output/server/chunks/routes/api/documents/by-path.post.mjs +0 -1
  273. package/.output/server/chunks/routes/api/documents/by-path.post.mjs.map +1 -1
  274. package/.output/server/chunks/routes/api/documents/index.delete.mjs +0 -1
  275. package/.output/server/chunks/routes/api/documents/index.delete.mjs.map +1 -1
  276. package/.output/server/chunks/routes/api/documents/index.put.mjs +0 -1
  277. package/.output/server/chunks/routes/api/documents/index.put.mjs.map +1 -1
  278. package/.output/server/chunks/routes/api/fs/delete.post.mjs +0 -1
  279. package/.output/server/chunks/routes/api/fs/delete.post.mjs.map +1 -1
  280. package/.output/server/chunks/routes/api/fs/list.get.mjs +0 -1
  281. package/.output/server/chunks/routes/api/fs/list.get.mjs.map +1 -1
  282. package/.output/server/chunks/routes/api/fs/mkdir.post.mjs +0 -1
  283. package/.output/server/chunks/routes/api/fs/mkdir.post.mjs.map +1 -1
  284. package/.output/server/chunks/routes/api/fs/move.post.mjs +0 -1
  285. package/.output/server/chunks/routes/api/fs/move.post.mjs.map +1 -1
  286. package/.output/server/chunks/routes/api/fs/read.post.mjs +0 -1
  287. package/.output/server/chunks/routes/api/fs/read.post.mjs.map +1 -1
  288. package/.output/server/chunks/routes/api/fs/rename.post.mjs +0 -1
  289. package/.output/server/chunks/routes/api/fs/rename.post.mjs.map +1 -1
  290. package/.output/server/chunks/routes/api/fs/write.post.mjs +0 -1
  291. package/.output/server/chunks/routes/api/fs/write.post.mjs.map +1 -1
  292. package/.output/server/chunks/routes/api/health.get.mjs +0 -1
  293. package/.output/server/chunks/routes/api/health.get.mjs.map +1 -1
  294. package/.output/server/chunks/routes/api/home.get.mjs +0 -1
  295. package/.output/server/chunks/routes/api/home.get.mjs.map +1 -1
  296. package/.output/server/chunks/routes/api/hooks/index.get.mjs +0 -1
  297. package/.output/server/chunks/routes/api/hooks/index.get.mjs.map +1 -1
  298. package/.output/server/chunks/routes/api/hooks/index.post.mjs +0 -1
  299. package/.output/server/chunks/routes/api/hooks/index.post.mjs.map +1 -1
  300. package/.output/server/chunks/routes/api/hooks/stats.get.mjs +0 -1
  301. package/.output/server/chunks/routes/api/hooks/stats.get.mjs.map +1 -1
  302. package/.output/server/chunks/routes/api/index.get.mjs +0 -1
  303. package/.output/server/chunks/routes/api/index.get.mjs.map +1 -1
  304. package/.output/server/chunks/routes/api/index.get10.mjs +0 -1
  305. package/.output/server/chunks/routes/api/index.get10.mjs.map +1 -1
  306. package/.output/server/chunks/routes/api/index.get2.mjs +0 -1
  307. package/.output/server/chunks/routes/api/index.get2.mjs.map +1 -1
  308. package/.output/server/chunks/routes/api/index.get3.mjs +0 -1
  309. package/.output/server/chunks/routes/api/index.get3.mjs.map +1 -1
  310. package/.output/server/chunks/routes/api/index.get4.mjs +0 -1
  311. package/.output/server/chunks/routes/api/index.get4.mjs.map +1 -1
  312. package/.output/server/chunks/routes/api/index.get5.mjs +0 -1
  313. package/.output/server/chunks/routes/api/index.get5.mjs.map +1 -1
  314. package/.output/server/chunks/routes/api/index.get6.mjs +0 -1
  315. package/.output/server/chunks/routes/api/index.get6.mjs.map +1 -1
  316. package/.output/server/chunks/routes/api/index.get7.mjs +0 -1
  317. package/.output/server/chunks/routes/api/index.get7.mjs.map +1 -1
  318. package/.output/server/chunks/routes/api/index.get8.mjs +0 -1
  319. package/.output/server/chunks/routes/api/index.get8.mjs.map +1 -1
  320. package/.output/server/chunks/routes/api/index.get9.mjs +0 -1
  321. package/.output/server/chunks/routes/api/index.get9.mjs.map +1 -1
  322. package/.output/server/chunks/routes/api/index.post.mjs +0 -1
  323. package/.output/server/chunks/routes/api/index.post.mjs.map +1 -1
  324. package/.output/server/chunks/routes/api/index.post2.mjs +0 -1
  325. package/.output/server/chunks/routes/api/index.post2.mjs.map +1 -1
  326. package/.output/server/chunks/routes/api/index.post3.mjs +0 -1
  327. package/.output/server/chunks/routes/api/index.post3.mjs.map +1 -1
  328. package/.output/server/chunks/routes/api/index.post4.mjs +0 -1
  329. package/.output/server/chunks/routes/api/index.post4.mjs.map +1 -1
  330. package/.output/server/chunks/routes/api/index.post5.mjs +0 -1
  331. package/.output/server/chunks/routes/api/index.post5.mjs.map +1 -1
  332. package/.output/server/chunks/routes/api/index.put.mjs +0 -1
  333. package/.output/server/chunks/routes/api/index.put.mjs.map +1 -1
  334. package/.output/server/chunks/routes/api/memory/_id_.delete.mjs +0 -1
  335. package/.output/server/chunks/routes/api/memory/_id_.delete.mjs.map +1 -1
  336. package/.output/server/chunks/routes/api/memory/context.get.mjs +0 -1
  337. package/.output/server/chunks/routes/api/memory/context.get.mjs.map +1 -1
  338. package/.output/server/chunks/routes/api/memory/extract.post.mjs +0 -1
  339. package/.output/server/chunks/routes/api/memory/extract.post.mjs.map +1 -1
  340. package/.output/server/chunks/routes/api/memory/search.get.mjs +0 -1
  341. package/.output/server/chunks/routes/api/memory/search.get.mjs.map +1 -1
  342. package/.output/server/chunks/routes/api/memory/store.post.mjs +0 -1
  343. package/.output/server/chunks/routes/api/memory/store.post.mjs.map +1 -1
  344. package/.output/server/chunks/routes/api/projects/index.delete.mjs +0 -1
  345. package/.output/server/chunks/routes/api/projects/index.delete.mjs.map +1 -1
  346. package/.output/server/chunks/routes/api/projects/index.get.mjs +0 -1
  347. package/.output/server/chunks/routes/api/projects/index.get.mjs.map +1 -1
  348. package/.output/server/chunks/routes/api/projects/index.put.mjs +0 -1
  349. package/.output/server/chunks/routes/api/projects/index.put.mjs.map +1 -1
  350. package/.output/server/chunks/routes/api/secrets/_key_.delete.mjs +0 -1
  351. package/.output/server/chunks/routes/api/secrets/_key_.delete.mjs.map +1 -1
  352. package/.output/server/chunks/routes/api/secrets/_key_.get.mjs +0 -1
  353. package/.output/server/chunks/routes/api/secrets/_key_.get.mjs.map +1 -1
  354. package/.output/server/chunks/routes/api/secrets/_key_.put.mjs +0 -1
  355. package/.output/server/chunks/routes/api/secrets/_key_.put.mjs.map +1 -1
  356. package/.output/server/chunks/routes/api/skills/_name/delete.post.mjs +0 -1
  357. package/.output/server/chunks/routes/api/skills/_name/delete.post.mjs.map +1 -1
  358. package/.output/server/chunks/routes/api/skills/_name/export.get.mjs +0 -1
  359. package/.output/server/chunks/routes/api/skills/_name/export.get.mjs.map +1 -1
  360. package/.output/server/chunks/routes/api/skills/_name/files/create.post.mjs +0 -1
  361. package/.output/server/chunks/routes/api/skills/_name/files/create.post.mjs.map +1 -1
  362. package/.output/server/chunks/routes/api/skills/_name/files/delete.post.mjs +0 -1
  363. package/.output/server/chunks/routes/api/skills/_name/files/delete.post.mjs.map +1 -1
  364. package/.output/server/chunks/routes/api/skills/_name/files/read.post.mjs +0 -1
  365. package/.output/server/chunks/routes/api/skills/_name/files/read.post.mjs.map +1 -1
  366. package/.output/server/chunks/routes/api/skills/_name/files/write.post.mjs +0 -1
  367. package/.output/server/chunks/routes/api/skills/_name/files/write.post.mjs.map +1 -1
  368. package/.output/server/chunks/routes/api/skills/_name/index.get.mjs +0 -1
  369. package/.output/server/chunks/routes/api/skills/_name/index.get.mjs.map +1 -1
  370. package/.output/server/chunks/routes/api/skills/_name/rename.post.mjs +0 -1
  371. package/.output/server/chunks/routes/api/skills/_name/rename.post.mjs.map +1 -1
  372. package/.output/server/chunks/routes/api/skills/_name/toggle.post.mjs +0 -1
  373. package/.output/server/chunks/routes/api/skills/_name/toggle.post.mjs.map +1 -1
  374. package/.output/server/chunks/routes/api/skills/create.post.mjs +0 -1
  375. package/.output/server/chunks/routes/api/skills/create.post.mjs.map +1 -1
  376. package/.output/server/chunks/routes/api/skills/generate.post.mjs +0 -1
  377. package/.output/server/chunks/routes/api/skills/generate.post.mjs.map +1 -1
  378. package/.output/server/chunks/routes/api/skills/import.post.mjs +0 -1
  379. package/.output/server/chunks/routes/api/skills/import.post.mjs.map +1 -1
  380. package/.output/server/chunks/routes/api/skills/index.get.mjs +0 -1
  381. package/.output/server/chunks/routes/api/skills/index.get.mjs.map +1 -1
  382. package/.output/server/chunks/routes/api/skills/index.get2.mjs +0 -1
  383. package/.output/server/chunks/routes/api/skills/index.get2.mjs.map +1 -1
  384. package/.output/server/chunks/routes/api/skills/library/check-updates.get.mjs +0 -1
  385. package/.output/server/chunks/routes/api/skills/library/check-updates.get.mjs.map +1 -1
  386. package/.output/server/chunks/routes/api/skills/library/install.post.mjs +0 -1
  387. package/.output/server/chunks/routes/api/skills/library/install.post.mjs.map +1 -1
  388. package/.output/server/chunks/routes/api/tasks/_id/restore.post.mjs +0 -1
  389. package/.output/server/chunks/routes/api/tasks/_id/restore.post.mjs.map +1 -1
  390. package/.output/server/chunks/routes/api/tasks/index.delete.mjs +0 -1
  391. package/.output/server/chunks/routes/api/tasks/index.delete.mjs.map +1 -1
  392. package/.output/server/chunks/routes/api/tasks/index.get.mjs +0 -1
  393. package/.output/server/chunks/routes/api/tasks/index.get.mjs.map +1 -1
  394. package/.output/server/chunks/routes/api/tasks/index.put.mjs +0 -1
  395. package/.output/server/chunks/routes/api/tasks/index.put.mjs.map +1 -1
  396. package/.output/server/chunks/routes/api/tasks/tags.get.mjs +0 -1
  397. package/.output/server/chunks/routes/api/tasks/tags.get.mjs.map +1 -1
  398. package/.output/server/chunks/routes/api/usage/stats.get.mjs +0 -1
  399. package/.output/server/chunks/routes/api/usage/stats.get.mjs.map +1 -1
  400. package/.output/server/chunks/routes/api/user/email.patch.mjs +0 -1
  401. package/.output/server/chunks/routes/api/user/email.patch.mjs.map +1 -1
  402. package/.output/server/chunks/routes/api/webhooks/bluebubbles.post.mjs +0 -1
  403. package/.output/server/chunks/routes/api/webhooks/bluebubbles.post.mjs.map +1 -1
  404. package/.output/server/chunks/routes/api/webhooks/telegram.post.mjs +0 -1
  405. package/.output/server/chunks/routes/api/webhooks/telegram.post.mjs.map +1 -1
  406. package/.output/server/chunks/routes/notifications.mjs +0 -1
  407. package/.output/server/chunks/routes/notifications.mjs.map +1 -1
  408. package/.output/server/chunks/routes/terminal.mjs +0 -1
  409. package/.output/server/chunks/routes/terminal.mjs.map +1 -1
  410. package/.output/server/index.mjs +0 -1
  411. package/.output/server/index.mjs.map +1 -1
  412. package/.output/server/package.json +1 -21
  413. package/app/pages/settings.vue +441 -5
  414. package/nuxt.config.ts +2 -11
  415. package/package.json +1 -1
  416. package/server/api/skills/import.post.ts +1 -1
  417. package/server/bridge/adapters/discord.ts +49 -15
  418. package/server/bridge/adapters/telegram.ts +1 -1
  419. package/.output/public/_nuxt/B-YQztaH.js +0 -1
  420. package/.output/public/_nuxt/B1gFtqXK.js +0 -1
  421. package/.output/public/_nuxt/BTfZ7nek.js +0 -1
  422. package/.output/public/_nuxt/BbPnqQJ0.js +0 -1
  423. package/.output/public/_nuxt/BhSWIRpp.js +0 -1
  424. package/.output/public/_nuxt/By6kmkhJ.js +0 -1
  425. package/.output/public/_nuxt/C4XVJnNJ.js +0 -1
  426. package/.output/public/_nuxt/CkvyAKbu.js +0 -1
  427. package/.output/public/_nuxt/D2f7BlK2.js +0 -1
  428. package/.output/public/_nuxt/D2lmhTjQ.js +0 -1
  429. package/.output/public/_nuxt/D64-rCSQ.js +0 -1
  430. package/.output/public/_nuxt/DGP2JJt8.js +0 -1
  431. package/.output/public/_nuxt/builds/meta/4b618f20-caf2-44e1-bb82-140393d41e1e.json +0 -1
  432. package/.output/public/_nuxt/f7zDjk6q.js +0 -1
  433. package/.output/server/chunks/build/settings-DuT6LGJZ.mjs.map +0 -1
  434. package/.output/server/node_modules/.nitro/@discordjs/collection@1.5.3/dist/index.js +0 -543
  435. package/.output/server/node_modules/.nitro/@discordjs/collection@1.5.3/package.json +0 -76
  436. package/.output/server/node_modules/.nitro/@discordjs/collection@2.1.1/dist/index.js +0 -567
  437. package/.output/server/node_modules/.nitro/@discordjs/collection@2.1.1/package.json +0 -86
  438. package/.output/server/node_modules/@discordjs/builders/dist/index.js +0 -4229
  439. package/.output/server/node_modules/@discordjs/builders/package.json +0 -99
  440. package/.output/server/node_modules/@discordjs/formatters/dist/index.js +0 -519
  441. package/.output/server/node_modules/@discordjs/formatters/package.json +0 -83
  442. package/.output/server/node_modules/@discordjs/rest/dist/index.js +0 -1515
  443. package/.output/server/node_modules/@discordjs/rest/package.json +0 -119
  444. package/.output/server/node_modules/@discordjs/util/dist/index.js +0 -159
  445. package/.output/server/node_modules/@discordjs/util/package.json +0 -94
  446. package/.output/server/node_modules/@discordjs/ws/dist/defaultWorker.js +0 -1057
  447. package/.output/server/node_modules/@discordjs/ws/dist/index.js +0 -1506
  448. package/.output/server/node_modules/@discordjs/ws/package.json +0 -113
  449. package/.output/server/node_modules/@sapphire/async-queue/dist/cjs/index.cjs +0 -137
  450. package/.output/server/node_modules/@sapphire/async-queue/package.json +0 -74
  451. package/.output/server/node_modules/@sapphire/shapeshift/dist/cjs/index.cjs +0 -3210
  452. package/.output/server/node_modules/@sapphire/shapeshift/package.json +0 -125
  453. package/.output/server/node_modules/@sapphire/snowflake/dist/cjs/index.cjs +0 -194
  454. package/.output/server/node_modules/@sapphire/snowflake/package.json +0 -72
  455. package/.output/server/node_modules/@vladfrangu/async_event_emitter/dist/index.cjs +0 -2825
  456. package/.output/server/node_modules/@vladfrangu/async_event_emitter/package.json +0 -112
  457. package/.output/server/node_modules/discord-api-types/gateway/v10.js +0 -277
  458. package/.output/server/node_modules/discord-api-types/globals.js +0 -105
  459. package/.output/server/node_modules/discord-api-types/package.json +0 -215
  460. package/.output/server/node_modules/discord-api-types/payloads/common.js +0 -310
  461. package/.output/server/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/shared.js +0 -21
  462. package/.output/server/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/chatInput.js +0 -18
  463. package/.output/server/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/permissions.js +0 -21
  464. package/.output/server/node_modules/discord-api-types/payloads/v10/_interactions/applicationCommands.js +0 -89
  465. package/.output/server/node_modules/discord-api-types/payloads/v10/_interactions/responses.js +0 -63
  466. package/.output/server/node_modules/discord-api-types/payloads/v10/application.js +0 -138
  467. package/.output/server/node_modules/discord-api-types/payloads/v10/auditLog.js +0 -85
  468. package/.output/server/node_modules/discord-api-types/payloads/v10/autoModeration.js +0 -88
  469. package/.output/server/node_modules/discord-api-types/payloads/v10/channel.js +0 -219
  470. package/.output/server/node_modules/discord-api-types/payloads/v10/gateway.js +0 -103
  471. package/.output/server/node_modules/discord-api-types/payloads/v10/guild.js +0 -403
  472. package/.output/server/node_modules/discord-api-types/payloads/v10/guildScheduledEvent.js +0 -74
  473. package/.output/server/node_modules/discord-api-types/payloads/v10/index.js +0 -37
  474. package/.output/server/node_modules/discord-api-types/payloads/v10/interactions.js +0 -19
  475. package/.output/server/node_modules/discord-api-types/payloads/v10/invite.js +0 -31
  476. package/.output/server/node_modules/discord-api-types/payloads/v10/message.js +0 -379
  477. package/.output/server/node_modules/discord-api-types/payloads/v10/monetization.js +0 -101
  478. package/.output/server/node_modules/discord-api-types/payloads/v10/oauth2.js +0 -148
  479. package/.output/server/node_modules/discord-api-types/payloads/v10/permissions.js +0 -17
  480. package/.output/server/node_modules/discord-api-types/payloads/v10/poll.js +0 -17
  481. package/.output/server/node_modules/discord-api-types/payloads/v10/stageInstance.js +0 -21
  482. package/.output/server/node_modules/discord-api-types/payloads/v10/sticker.js +0 -31
  483. package/.output/server/node_modules/discord-api-types/payloads/v10/teams.js +0 -24
  484. package/.output/server/node_modules/discord-api-types/payloads/v10/user.js +0 -189
  485. package/.output/server/node_modules/discord-api-types/payloads/v10/webhook.js +0 -73
  486. package/.output/server/node_modules/discord-api-types/rest/common.js +0 -273
  487. package/.output/server/node_modules/discord-api-types/rest/v10/channel.js +0 -12
  488. package/.output/server/node_modules/discord-api-types/rest/v10/index.js +0 -1272
  489. package/.output/server/node_modules/discord-api-types/rest/v10/monetization.js +0 -12
  490. package/.output/server/node_modules/discord-api-types/rpc/common.js +0 -240
  491. package/.output/server/node_modules/discord-api-types/rpc/v10.js +0 -299
  492. package/.output/server/node_modules/discord-api-types/utils/internals.js +0 -13
  493. package/.output/server/node_modules/discord-api-types/utils/v10.js +0 -158
  494. package/.output/server/node_modules/discord-api-types/v10.js +0 -25
  495. package/.output/server/node_modules/discord.js/package.json +0 -107
  496. package/.output/server/node_modules/discord.js/src/client/BaseClient.js +0 -120
  497. package/.output/server/node_modules/discord.js/src/client/Client.js +0 -649
  498. package/.output/server/node_modules/discord.js/src/client/WebhookClient.js +0 -103
  499. package/.output/server/node_modules/discord.js/src/client/actions/Action.js +0 -143
  500. package/.output/server/node_modules/discord.js/src/client/actions/ActionsManager.js +0 -85
  501. package/.output/server/node_modules/discord.js/src/client/actions/ApplicationCommandPermissionsUpdate.js +0 -34
  502. package/.output/server/node_modules/discord.js/src/client/actions/AutoModerationActionExecution.js +0 -26
  503. package/.output/server/node_modules/discord.js/src/client/actions/AutoModerationRuleCreate.js +0 -27
  504. package/.output/server/node_modules/discord.js/src/client/actions/AutoModerationRuleDelete.js +0 -31
  505. package/.output/server/node_modules/discord.js/src/client/actions/AutoModerationRuleUpdate.js +0 -29
  506. package/.output/server/node_modules/discord.js/src/client/actions/ChannelCreate.js +0 -23
  507. package/.output/server/node_modules/discord.js/src/client/actions/ChannelDelete.js +0 -23
  508. package/.output/server/node_modules/discord.js/src/client/actions/ChannelUpdate.js +0 -42
  509. package/.output/server/node_modules/discord.js/src/client/actions/EntitlementCreate.js +0 -23
  510. package/.output/server/node_modules/discord.js/src/client/actions/EntitlementDelete.js +0 -27
  511. package/.output/server/node_modules/discord.js/src/client/actions/EntitlementUpdate.js +0 -25
  512. package/.output/server/node_modules/discord.js/src/client/actions/GuildAuditLogEntryCreate.js +0 -29
  513. package/.output/server/node_modules/discord.js/src/client/actions/GuildBanAdd.js +0 -20
  514. package/.output/server/node_modules/discord.js/src/client/actions/GuildBanRemove.js +0 -25
  515. package/.output/server/node_modules/discord.js/src/client/actions/GuildChannelsPositionUpdate.js +0 -21
  516. package/.output/server/node_modules/discord.js/src/client/actions/GuildDelete.js +0 -44
  517. package/.output/server/node_modules/discord.js/src/client/actions/GuildEmojiCreate.js +0 -20
  518. package/.output/server/node_modules/discord.js/src/client/actions/GuildEmojiDelete.js +0 -19
  519. package/.output/server/node_modules/discord.js/src/client/actions/GuildEmojiUpdate.js +0 -20
  520. package/.output/server/node_modules/discord.js/src/client/actions/GuildEmojisUpdate.js +0 -34
  521. package/.output/server/node_modules/discord.js/src/client/actions/GuildIntegrationsUpdate.js +0 -19
  522. package/.output/server/node_modules/discord.js/src/client/actions/GuildMemberRemove.js +0 -31
  523. package/.output/server/node_modules/discord.js/src/client/actions/GuildMemberUpdate.js +0 -44
  524. package/.output/server/node_modules/discord.js/src/client/actions/GuildRoleCreate.js +0 -25
  525. package/.output/server/node_modules/discord.js/src/client/actions/GuildRoleDelete.js +0 -29
  526. package/.output/server/node_modules/discord.js/src/client/actions/GuildRoleUpdate.js +0 -39
  527. package/.output/server/node_modules/discord.js/src/client/actions/GuildRolesPositionUpdate.js +0 -21
  528. package/.output/server/node_modules/discord.js/src/client/actions/GuildScheduledEventCreate.js +0 -27
  529. package/.output/server/node_modules/discord.js/src/client/actions/GuildScheduledEventDelete.js +0 -31
  530. package/.output/server/node_modules/discord.js/src/client/actions/GuildScheduledEventUpdate.js +0 -30
  531. package/.output/server/node_modules/discord.js/src/client/actions/GuildScheduledEventUserAdd.js +0 -32
  532. package/.output/server/node_modules/discord.js/src/client/actions/GuildScheduledEventUserRemove.js +0 -32
  533. package/.output/server/node_modules/discord.js/src/client/actions/GuildSoundboardSoundDelete.js +0 -29
  534. package/.output/server/node_modules/discord.js/src/client/actions/GuildStickerCreate.js +0 -20
  535. package/.output/server/node_modules/discord.js/src/client/actions/GuildStickerDelete.js +0 -19
  536. package/.output/server/node_modules/discord.js/src/client/actions/GuildStickerUpdate.js +0 -20
  537. package/.output/server/node_modules/discord.js/src/client/actions/GuildStickersUpdate.js +0 -34
  538. package/.output/server/node_modules/discord.js/src/client/actions/GuildUpdate.js +0 -33
  539. package/.output/server/node_modules/discord.js/src/client/actions/InteractionCreate.js +0 -105
  540. package/.output/server/node_modules/discord.js/src/client/actions/InviteCreate.js +0 -27
  541. package/.output/server/node_modules/discord.js/src/client/actions/InviteDelete.js +0 -29
  542. package/.output/server/node_modules/discord.js/src/client/actions/MessageCreate.js +0 -41
  543. package/.output/server/node_modules/discord.js/src/client/actions/MessageDelete.js +0 -32
  544. package/.output/server/node_modules/discord.js/src/client/actions/MessageDeleteBulk.js +0 -47
  545. package/.output/server/node_modules/discord.js/src/client/actions/MessagePollVoteAdd.js +0 -40
  546. package/.output/server/node_modules/discord.js/src/client/actions/MessagePollVoteRemove.js +0 -38
  547. package/.output/server/node_modules/discord.js/src/client/actions/MessageReactionAdd.js +0 -70
  548. package/.output/server/node_modules/discord.js/src/client/actions/MessageReactionRemove.js +0 -50
  549. package/.output/server/node_modules/discord.js/src/client/actions/MessageReactionRemoveAll.js +0 -33
  550. package/.output/server/node_modules/discord.js/src/client/actions/MessageReactionRemoveEmoji.js +0 -28
  551. package/.output/server/node_modules/discord.js/src/client/actions/MessageUpdate.js +0 -26
  552. package/.output/server/node_modules/discord.js/src/client/actions/PresenceUpdate.js +0 -45
  553. package/.output/server/node_modules/discord.js/src/client/actions/StageInstanceCreate.js +0 -28
  554. package/.output/server/node_modules/discord.js/src/client/actions/StageInstanceDelete.js +0 -31
  555. package/.output/server/node_modules/discord.js/src/client/actions/StageInstanceUpdate.js +0 -30
  556. package/.output/server/node_modules/discord.js/src/client/actions/ThreadCreate.js +0 -24
  557. package/.output/server/node_modules/discord.js/src/client/actions/ThreadDelete.js +0 -26
  558. package/.output/server/node_modules/discord.js/src/client/actions/ThreadListSync.js +0 -60
  559. package/.output/server/node_modules/discord.js/src/client/actions/ThreadMemberUpdate.js +0 -30
  560. package/.output/server/node_modules/discord.js/src/client/actions/ThreadMembersUpdate.js +0 -47
  561. package/.output/server/node_modules/discord.js/src/client/actions/TypingStart.js +0 -29
  562. package/.output/server/node_modules/discord.js/src/client/actions/UserUpdate.js +0 -36
  563. package/.output/server/node_modules/discord.js/src/client/actions/VoiceStateUpdate.js +0 -43
  564. package/.output/server/node_modules/discord.js/src/client/actions/WebhooksUpdate.js +0 -37
  565. package/.output/server/node_modules/discord.js/src/client/voice/ClientVoiceManager.js +0 -44
  566. package/.output/server/node_modules/discord.js/src/client/websocket/WebSocketManager.js +0 -407
  567. package/.output/server/node_modules/discord.js/src/client/websocket/WebSocketShard.js +0 -234
  568. package/.output/server/node_modules/discord.js/src/client/websocket/handlers/APPLICATION_COMMAND_PERMISSIONS_UPDATE.js +0 -5
  569. package/.output/server/node_modules/discord.js/src/client/websocket/handlers/AUTO_MODERATION_ACTION_EXECUTION.js +0 -5
  570. package/.output/server/node_modules/discord.js/src/client/websocket/handlers/AUTO_MODERATION_RULE_CREATE.js +0 -5
  571. package/.output/server/node_modules/discord.js/src/client/websocket/handlers/AUTO_MODERATION_RULE_DELETE.js +0 -5
  572. package/.output/server/node_modules/discord.js/src/client/websocket/handlers/AUTO_MODERATION_RULE_UPDATE.js +0 -5
  573. package/.output/server/node_modules/discord.js/src/client/websocket/handlers/CHANNEL_CREATE.js +0 -5
  574. package/.output/server/node_modules/discord.js/src/client/websocket/handlers/CHANNEL_DELETE.js +0 -5
  575. package/.output/server/node_modules/discord.js/src/client/websocket/handlers/CHANNEL_PINS_UPDATE.js +0 -22
  576. package/.output/server/node_modules/discord.js/src/client/websocket/handlers/CHANNEL_UPDATE.js +0 -16
  577. package/.output/server/node_modules/discord.js/src/client/websocket/handlers/ENTITLEMENT_CREATE.js +0 -5
  578. package/.output/server/node_modules/discord.js/src/client/websocket/handlers/ENTITLEMENT_DELETE.js +0 -5
  579. package/.output/server/node_modules/discord.js/src/client/websocket/handlers/ENTITLEMENT_UPDATE.js +0 -5
  580. package/.output/server/node_modules/discord.js/src/client/websocket/handlers/GUILD_AUDIT_LOG_ENTRY_CREATE.js +0 -5
  581. package/.output/server/node_modules/discord.js/src/client/websocket/handlers/GUILD_BAN_ADD.js +0 -5
  582. package/.output/server/node_modules/discord.js/src/client/websocket/handlers/GUILD_BAN_REMOVE.js +0 -5
  583. package/.output/server/node_modules/discord.js/src/client/websocket/handlers/GUILD_CREATE.js +0 -33
  584. package/.output/server/node_modules/discord.js/src/client/websocket/handlers/GUILD_DELETE.js +0 -5
  585. package/.output/server/node_modules/discord.js/src/client/websocket/handlers/GUILD_EMOJIS_UPDATE.js +0 -5
  586. package/.output/server/node_modules/discord.js/src/client/websocket/handlers/GUILD_INTEGRATIONS_UPDATE.js +0 -5
  587. package/.output/server/node_modules/discord.js/src/client/websocket/handlers/GUILD_MEMBERS_CHUNK.js +0 -39
  588. package/.output/server/node_modules/discord.js/src/client/websocket/handlers/GUILD_MEMBER_ADD.js +0 -20
  589. package/.output/server/node_modules/discord.js/src/client/websocket/handlers/GUILD_MEMBER_REMOVE.js +0 -5
  590. package/.output/server/node_modules/discord.js/src/client/websocket/handlers/GUILD_MEMBER_UPDATE.js +0 -5
  591. package/.output/server/node_modules/discord.js/src/client/websocket/handlers/GUILD_ROLE_CREATE.js +0 -5
  592. package/.output/server/node_modules/discord.js/src/client/websocket/handlers/GUILD_ROLE_DELETE.js +0 -5
  593. package/.output/server/node_modules/discord.js/src/client/websocket/handlers/GUILD_ROLE_UPDATE.js +0 -5
  594. package/.output/server/node_modules/discord.js/src/client/websocket/handlers/GUILD_SCHEDULED_EVENT_CREATE.js +0 -5
  595. package/.output/server/node_modules/discord.js/src/client/websocket/handlers/GUILD_SCHEDULED_EVENT_DELETE.js +0 -5
  596. package/.output/server/node_modules/discord.js/src/client/websocket/handlers/GUILD_SCHEDULED_EVENT_UPDATE.js +0 -5
  597. package/.output/server/node_modules/discord.js/src/client/websocket/handlers/GUILD_SCHEDULED_EVENT_USER_ADD.js +0 -5
  598. package/.output/server/node_modules/discord.js/src/client/websocket/handlers/GUILD_SCHEDULED_EVENT_USER_REMOVE.js +0 -5
  599. package/.output/server/node_modules/discord.js/src/client/websocket/handlers/GUILD_SOUNDBOARD_SOUNDS_UPDATE.js +0 -24
  600. package/.output/server/node_modules/discord.js/src/client/websocket/handlers/GUILD_SOUNDBOARD_SOUND_CREATE.js +0 -18
  601. package/.output/server/node_modules/discord.js/src/client/websocket/handlers/GUILD_SOUNDBOARD_SOUND_DELETE.js +0 -5
  602. package/.output/server/node_modules/discord.js/src/client/websocket/handlers/GUILD_SOUNDBOARD_SOUND_UPDATE.js +0 -20
  603. package/.output/server/node_modules/discord.js/src/client/websocket/handlers/GUILD_STICKERS_UPDATE.js +0 -5
  604. package/.output/server/node_modules/discord.js/src/client/websocket/handlers/GUILD_UPDATE.js +0 -5
  605. package/.output/server/node_modules/discord.js/src/client/websocket/handlers/INTERACTION_CREATE.js +0 -5
  606. package/.output/server/node_modules/discord.js/src/client/websocket/handlers/INVITE_CREATE.js +0 -5
  607. package/.output/server/node_modules/discord.js/src/client/websocket/handlers/INVITE_DELETE.js +0 -5
  608. package/.output/server/node_modules/discord.js/src/client/websocket/handlers/MESSAGE_CREATE.js +0 -5
  609. package/.output/server/node_modules/discord.js/src/client/websocket/handlers/MESSAGE_DELETE.js +0 -5
  610. package/.output/server/node_modules/discord.js/src/client/websocket/handlers/MESSAGE_DELETE_BULK.js +0 -5
  611. package/.output/server/node_modules/discord.js/src/client/websocket/handlers/MESSAGE_POLL_VOTE_ADD.js +0 -5
  612. package/.output/server/node_modules/discord.js/src/client/websocket/handlers/MESSAGE_POLL_VOTE_REMOVE.js +0 -5
  613. package/.output/server/node_modules/discord.js/src/client/websocket/handlers/MESSAGE_REACTION_ADD.js +0 -5
  614. package/.output/server/node_modules/discord.js/src/client/websocket/handlers/MESSAGE_REACTION_REMOVE.js +0 -5
  615. package/.output/server/node_modules/discord.js/src/client/websocket/handlers/MESSAGE_REACTION_REMOVE_ALL.js +0 -5
  616. package/.output/server/node_modules/discord.js/src/client/websocket/handlers/MESSAGE_REACTION_REMOVE_EMOJI.js +0 -5
  617. package/.output/server/node_modules/discord.js/src/client/websocket/handlers/MESSAGE_UPDATE.js +0 -16
  618. package/.output/server/node_modules/discord.js/src/client/websocket/handlers/PRESENCE_UPDATE.js +0 -5
  619. package/.output/server/node_modules/discord.js/src/client/websocket/handlers/RATE_LIMITED.js +0 -25
  620. package/.output/server/node_modules/discord.js/src/client/websocket/handlers/READY.js +0 -27
  621. package/.output/server/node_modules/discord.js/src/client/websocket/handlers/RESUMED.js +0 -14
  622. package/.output/server/node_modules/discord.js/src/client/websocket/handlers/SOUNDBOARD_SOUNDS.js +0 -24
  623. package/.output/server/node_modules/discord.js/src/client/websocket/handlers/STAGE_INSTANCE_CREATE.js +0 -5
  624. package/.output/server/node_modules/discord.js/src/client/websocket/handlers/STAGE_INSTANCE_DELETE.js +0 -5
  625. package/.output/server/node_modules/discord.js/src/client/websocket/handlers/STAGE_INSTANCE_UPDATE.js +0 -5
  626. package/.output/server/node_modules/discord.js/src/client/websocket/handlers/SUBSCRIPTION_CREATE.js +0 -14
  627. package/.output/server/node_modules/discord.js/src/client/websocket/handlers/SUBSCRIPTION_DELETE.js +0 -16
  628. package/.output/server/node_modules/discord.js/src/client/websocket/handlers/SUBSCRIPTION_UPDATE.js +0 -16
  629. package/.output/server/node_modules/discord.js/src/client/websocket/handlers/THREAD_CREATE.js +0 -5
  630. package/.output/server/node_modules/discord.js/src/client/websocket/handlers/THREAD_DELETE.js +0 -5
  631. package/.output/server/node_modules/discord.js/src/client/websocket/handlers/THREAD_LIST_SYNC.js +0 -5
  632. package/.output/server/node_modules/discord.js/src/client/websocket/handlers/THREAD_MEMBERS_UPDATE.js +0 -5
  633. package/.output/server/node_modules/discord.js/src/client/websocket/handlers/THREAD_MEMBER_UPDATE.js +0 -5
  634. package/.output/server/node_modules/discord.js/src/client/websocket/handlers/THREAD_UPDATE.js +0 -16
  635. package/.output/server/node_modules/discord.js/src/client/websocket/handlers/TYPING_START.js +0 -5
  636. package/.output/server/node_modules/discord.js/src/client/websocket/handlers/USER_UPDATE.js +0 -5
  637. package/.output/server/node_modules/discord.js/src/client/websocket/handlers/VOICE_CHANNEL_EFFECT_SEND.js +0 -16
  638. package/.output/server/node_modules/discord.js/src/client/websocket/handlers/VOICE_SERVER_UPDATE.js +0 -6
  639. package/.output/server/node_modules/discord.js/src/client/websocket/handlers/VOICE_STATE_UPDATE.js +0 -5
  640. package/.output/server/node_modules/discord.js/src/client/websocket/handlers/WEBHOOKS_UPDATE.js +0 -5
  641. package/.output/server/node_modules/discord.js/src/client/websocket/handlers/index.js +0 -79
  642. package/.output/server/node_modules/discord.js/src/errors/DJSError.js +0 -48
  643. package/.output/server/node_modules/discord.js/src/errors/ErrorCodes.js +0 -356
  644. package/.output/server/node_modules/discord.js/src/errors/Messages.js +0 -187
  645. package/.output/server/node_modules/discord.js/src/errors/index.js +0 -5
  646. package/.output/server/node_modules/discord.js/src/index.js +0 -254
  647. package/.output/server/node_modules/discord.js/src/managers/ApplicationCommandManager.js +0 -269
  648. package/.output/server/node_modules/discord.js/src/managers/ApplicationCommandPermissionsManager.js +0 -428
  649. package/.output/server/node_modules/discord.js/src/managers/ApplicationEmojiManager.js +0 -142
  650. package/.output/server/node_modules/discord.js/src/managers/AutoModerationRuleManager.js +0 -292
  651. package/.output/server/node_modules/discord.js/src/managers/BaseGuildEmojiManager.js +0 -85
  652. package/.output/server/node_modules/discord.js/src/managers/BaseManager.js +0 -19
  653. package/.output/server/node_modules/discord.js/src/managers/CachedManager.js +0 -64
  654. package/.output/server/node_modules/discord.js/src/managers/CategoryChannelChildManager.js +0 -79
  655. package/.output/server/node_modules/discord.js/src/managers/ChannelManager.js +0 -135
  656. package/.output/server/node_modules/discord.js/src/managers/DMMessageManager.js +0 -17
  657. package/.output/server/node_modules/discord.js/src/managers/DataManager.js +0 -61
  658. package/.output/server/node_modules/discord.js/src/managers/EntitlementManager.js +0 -174
  659. package/.output/server/node_modules/discord.js/src/managers/GuildApplicationCommandManager.js +0 -28
  660. package/.output/server/node_modules/discord.js/src/managers/GuildBanManager.js +0 -249
  661. package/.output/server/node_modules/discord.js/src/managers/GuildChannelManager.js +0 -519
  662. package/.output/server/node_modules/discord.js/src/managers/GuildEmojiManager.js +0 -174
  663. package/.output/server/node_modules/discord.js/src/managers/GuildEmojiRoleManager.js +0 -126
  664. package/.output/server/node_modules/discord.js/src/managers/GuildForumThreadManager.js +0 -83
  665. package/.output/server/node_modules/discord.js/src/managers/GuildInviteManager.js +0 -215
  666. package/.output/server/node_modules/discord.js/src/managers/GuildManager.js +0 -408
  667. package/.output/server/node_modules/discord.js/src/managers/GuildMemberManager.js +0 -638
  668. package/.output/server/node_modules/discord.js/src/managers/GuildMemberRoleManager.js +0 -217
  669. package/.output/server/node_modules/discord.js/src/managers/GuildMessageManager.js +0 -17
  670. package/.output/server/node_modules/discord.js/src/managers/GuildScheduledEventManager.js +0 -315
  671. package/.output/server/node_modules/discord.js/src/managers/GuildSoundboardSoundManager.js +0 -214
  672. package/.output/server/node_modules/discord.js/src/managers/GuildStickerManager.js +0 -182
  673. package/.output/server/node_modules/discord.js/src/managers/GuildTextThreadManager.js +0 -91
  674. package/.output/server/node_modules/discord.js/src/managers/MessageManager.js +0 -368
  675. package/.output/server/node_modules/discord.js/src/managers/PartialGroupDMMessageManager.js +0 -17
  676. package/.output/server/node_modules/discord.js/src/managers/PermissionOverwriteManager.js +0 -166
  677. package/.output/server/node_modules/discord.js/src/managers/PollAnswerVoterManager.js +0 -50
  678. package/.output/server/node_modules/discord.js/src/managers/PresenceManager.js +0 -58
  679. package/.output/server/node_modules/discord.js/src/managers/ReactionManager.js +0 -68
  680. package/.output/server/node_modules/discord.js/src/managers/ReactionUserManager.js +0 -78
  681. package/.output/server/node_modules/discord.js/src/managers/RoleManager.js +0 -444
  682. package/.output/server/node_modules/discord.js/src/managers/StageInstanceManager.js +0 -159
  683. package/.output/server/node_modules/discord.js/src/managers/SubscriptionManager.js +0 -81
  684. package/.output/server/node_modules/discord.js/src/managers/ThreadManager.js +0 -193
  685. package/.output/server/node_modules/discord.js/src/managers/ThreadMemberManager.js +0 -204
  686. package/.output/server/node_modules/discord.js/src/managers/UserManager.js +0 -146
  687. package/.output/server/node_modules/discord.js/src/managers/VoiceStateManager.js +0 -59
  688. package/.output/server/node_modules/discord.js/src/sharding/Shard.js +0 -482
  689. package/.output/server/node_modules/discord.js/src/sharding/ShardClientUtil.js +0 -292
  690. package/.output/server/node_modules/discord.js/src/sharding/ShardingManager.js +0 -331
  691. package/.output/server/node_modules/discord.js/src/structures/ActionRow.js +0 -46
  692. package/.output/server/node_modules/discord.js/src/structures/ActionRowBuilder.js +0 -35
  693. package/.output/server/node_modules/discord.js/src/structures/AnonymousGuild.js +0 -97
  694. package/.output/server/node_modules/discord.js/src/structures/ApplicationCommand.js +0 -639
  695. package/.output/server/node_modules/discord.js/src/structures/ApplicationEmoji.js +0 -169
  696. package/.output/server/node_modules/discord.js/src/structures/ApplicationRoleConnectionMetadata.js +0 -46
  697. package/.output/server/node_modules/discord.js/src/structures/Attachment.js +0 -163
  698. package/.output/server/node_modules/discord.js/src/structures/AttachmentBuilder.js +0 -111
  699. package/.output/server/node_modules/discord.js/src/structures/AutoModerationActionExecution.js +0 -116
  700. package/.output/server/node_modules/discord.js/src/structures/AutoModerationRule.js +0 -288
  701. package/.output/server/node_modules/discord.js/src/structures/AutocompleteInteraction.js +0 -102
  702. package/.output/server/node_modules/discord.js/src/structures/Base.js +0 -43
  703. package/.output/server/node_modules/discord.js/src/structures/BaseChannel.js +0 -171
  704. package/.output/server/node_modules/discord.js/src/structures/BaseGuild.js +0 -119
  705. package/.output/server/node_modules/discord.js/src/structures/BaseGuildEmoji.js +0 -111
  706. package/.output/server/node_modules/discord.js/src/structures/BaseGuildTextChannel.js +0 -196
  707. package/.output/server/node_modules/discord.js/src/structures/BaseGuildVoiceChannel.js +0 -234
  708. package/.output/server/node_modules/discord.js/src/structures/BaseInteraction.js +0 -349
  709. package/.output/server/node_modules/discord.js/src/structures/BaseSelectMenuComponent.js +0 -56
  710. package/.output/server/node_modules/discord.js/src/structures/ButtonBuilder.js +0 -44
  711. package/.output/server/node_modules/discord.js/src/structures/ButtonComponent.js +0 -65
  712. package/.output/server/node_modules/discord.js/src/structures/ButtonInteraction.js +0 -11
  713. package/.output/server/node_modules/discord.js/src/structures/CategoryChannel.js +0 -45
  714. package/.output/server/node_modules/discord.js/src/structures/ChannelSelectMenuBuilder.js +0 -31
  715. package/.output/server/node_modules/discord.js/src/structures/ChannelSelectMenuComponent.js +0 -20
  716. package/.output/server/node_modules/discord.js/src/structures/ChannelSelectMenuInteraction.js +0 -33
  717. package/.output/server/node_modules/discord.js/src/structures/ChatInputCommandInteraction.js +0 -42
  718. package/.output/server/node_modules/discord.js/src/structures/ClientApplication.js +0 -415
  719. package/.output/server/node_modules/discord.js/src/structures/ClientPresence.js +0 -84
  720. package/.output/server/node_modules/discord.js/src/structures/ClientUser.js +0 -204
  721. package/.output/server/node_modules/discord.js/src/structures/CommandInteraction.js +0 -168
  722. package/.output/server/node_modules/discord.js/src/structures/CommandInteractionOptionResolver.js +0 -308
  723. package/.output/server/node_modules/discord.js/src/structures/Component.js +0 -56
  724. package/.output/server/node_modules/discord.js/src/structures/ContainerComponent.js +0 -60
  725. package/.output/server/node_modules/discord.js/src/structures/ContextMenuCommandInteraction.js +0 -65
  726. package/.output/server/node_modules/discord.js/src/structures/DMChannel.js +0 -129
  727. package/.output/server/node_modules/discord.js/src/structures/DirectoryChannel.js +0 -36
  728. package/.output/server/node_modules/discord.js/src/structures/Embed.js +0 -237
  729. package/.output/server/node_modules/discord.js/src/structures/EmbedBuilder.js +0 -50
  730. package/.output/server/node_modules/discord.js/src/structures/Emoji.js +0 -115
  731. package/.output/server/node_modules/discord.js/src/structures/Entitlement.js +0 -179
  732. package/.output/server/node_modules/discord.js/src/structures/FileComponent.js +0 -40
  733. package/.output/server/node_modules/discord.js/src/structures/ForumChannel.js +0 -31
  734. package/.output/server/node_modules/discord.js/src/structures/Guild.js +0 -1496
  735. package/.output/server/node_modules/discord.js/src/structures/GuildAuditLogs.js +0 -91
  736. package/.output/server/node_modules/discord.js/src/structures/GuildAuditLogsEntry.js +0 -527
  737. package/.output/server/node_modules/discord.js/src/structures/GuildBan.js +0 -59
  738. package/.output/server/node_modules/discord.js/src/structures/GuildChannel.js +0 -476
  739. package/.output/server/node_modules/discord.js/src/structures/GuildEmoji.js +0 -148
  740. package/.output/server/node_modules/discord.js/src/structures/GuildMember.js +0 -591
  741. package/.output/server/node_modules/discord.js/src/structures/GuildOnboarding.js +0 -64
  742. package/.output/server/node_modules/discord.js/src/structures/GuildOnboardingPrompt.js +0 -78
  743. package/.output/server/node_modules/discord.js/src/structures/GuildOnboardingPromptOption.js +0 -86
  744. package/.output/server/node_modules/discord.js/src/structures/GuildPreview.js +0 -193
  745. package/.output/server/node_modules/discord.js/src/structures/GuildPreviewEmoji.js +0 -27
  746. package/.output/server/node_modules/discord.js/src/structures/GuildScheduledEvent.js +0 -534
  747. package/.output/server/node_modules/discord.js/src/structures/GuildTemplate.js +0 -242
  748. package/.output/server/node_modules/discord.js/src/structures/Integration.js +0 -220
  749. package/.output/server/node_modules/discord.js/src/structures/IntegrationApplication.js +0 -85
  750. package/.output/server/node_modules/discord.js/src/structures/InteractionCallback.js +0 -74
  751. package/.output/server/node_modules/discord.js/src/structures/InteractionCallbackResource.js +0 -52
  752. package/.output/server/node_modules/discord.js/src/structures/InteractionCallbackResponse.js +0 -33
  753. package/.output/server/node_modules/discord.js/src/structures/InteractionCollector.js +0 -269
  754. package/.output/server/node_modules/discord.js/src/structures/InteractionResponse.js +0 -102
  755. package/.output/server/node_modules/discord.js/src/structures/InteractionWebhook.js +0 -59
  756. package/.output/server/node_modules/discord.js/src/structures/Invite.js +0 -341
  757. package/.output/server/node_modules/discord.js/src/structures/InviteGuild.js +0 -22
  758. package/.output/server/node_modules/discord.js/src/structures/InviteStageInstance.js +0 -87
  759. package/.output/server/node_modules/discord.js/src/structures/LabelComponent.js +0 -54
  760. package/.output/server/node_modules/discord.js/src/structures/MediaChannel.js +0 -11
  761. package/.output/server/node_modules/discord.js/src/structures/MediaGalleryComponent.js +0 -31
  762. package/.output/server/node_modules/discord.js/src/structures/MediaGalleryItem.js +0 -51
  763. package/.output/server/node_modules/discord.js/src/structures/MentionableSelectMenuBuilder.js +0 -32
  764. package/.output/server/node_modules/discord.js/src/structures/MentionableSelectMenuComponent.js +0 -11
  765. package/.output/server/node_modules/discord.js/src/structures/MentionableSelectMenuInteraction.js +0 -71
  766. package/.output/server/node_modules/discord.js/src/structures/Message.js +0 -1137
  767. package/.output/server/node_modules/discord.js/src/structures/MessageCollector.js +0 -146
  768. package/.output/server/node_modules/discord.js/src/structures/MessageComponentInteraction.js +0 -108
  769. package/.output/server/node_modules/discord.js/src/structures/MessageContextMenuCommandInteraction.js +0 -20
  770. package/.output/server/node_modules/discord.js/src/structures/MessageMentions.js +0 -297
  771. package/.output/server/node_modules/discord.js/src/structures/MessagePayload.js +0 -344
  772. package/.output/server/node_modules/discord.js/src/structures/MessageReaction.js +0 -200
  773. package/.output/server/node_modules/discord.js/src/structures/ModalBuilder.js +0 -36
  774. package/.output/server/node_modules/discord.js/src/structures/ModalSubmitFields.js +0 -232
  775. package/.output/server/node_modules/discord.js/src/structures/ModalSubmitInteraction.js +0 -256
  776. package/.output/server/node_modules/discord.js/src/structures/NewsChannel.js +0 -32
  777. package/.output/server/node_modules/discord.js/src/structures/OAuth2Guild.js +0 -28
  778. package/.output/server/node_modules/discord.js/src/structures/PartialGroupDMChannel.js +0 -131
  779. package/.output/server/node_modules/discord.js/src/structures/PermissionOverwrites.js +0 -199
  780. package/.output/server/node_modules/discord.js/src/structures/Poll.js +0 -175
  781. package/.output/server/node_modules/discord.js/src/structures/PollAnswer.js +0 -114
  782. package/.output/server/node_modules/discord.js/src/structures/Presence.js +0 -385
  783. package/.output/server/node_modules/discord.js/src/structures/PrimaryEntryPointCommandInteraction.js +0 -11
  784. package/.output/server/node_modules/discord.js/src/structures/ReactionCollector.js +0 -229
  785. package/.output/server/node_modules/discord.js/src/structures/ReactionEmoji.js +0 -31
  786. package/.output/server/node_modules/discord.js/src/structures/Role.js +0 -519
  787. package/.output/server/node_modules/discord.js/src/structures/RoleSelectMenuBuilder.js +0 -31
  788. package/.output/server/node_modules/discord.js/src/structures/RoleSelectMenuComponent.js +0 -11
  789. package/.output/server/node_modules/discord.js/src/structures/RoleSelectMenuInteraction.js +0 -33
  790. package/.output/server/node_modules/discord.js/src/structures/SKU.js +0 -52
  791. package/.output/server/node_modules/discord.js/src/structures/SectionComponent.js +0 -42
  792. package/.output/server/node_modules/discord.js/src/structures/SelectMenuBuilder.js +0 -26
  793. package/.output/server/node_modules/discord.js/src/structures/SelectMenuComponent.js +0 -26
  794. package/.output/server/node_modules/discord.js/src/structures/SelectMenuInteraction.js +0 -26
  795. package/.output/server/node_modules/discord.js/src/structures/SelectMenuOptionBuilder.js +0 -26
  796. package/.output/server/node_modules/discord.js/src/structures/SeparatorComponent.js +0 -30
  797. package/.output/server/node_modules/discord.js/src/structures/SoundboardSound.js +0 -204
  798. package/.output/server/node_modules/discord.js/src/structures/StageChannel.js +0 -112
  799. package/.output/server/node_modules/discord.js/src/structures/StageInstance.js +0 -167
  800. package/.output/server/node_modules/discord.js/src/structures/Sticker.js +0 -268
  801. package/.output/server/node_modules/discord.js/src/structures/StickerPack.js +0 -95
  802. package/.output/server/node_modules/discord.js/src/structures/StringSelectMenuBuilder.js +0 -79
  803. package/.output/server/node_modules/discord.js/src/structures/StringSelectMenuComponent.js +0 -20
  804. package/.output/server/node_modules/discord.js/src/structures/StringSelectMenuInteraction.js +0 -21
  805. package/.output/server/node_modules/discord.js/src/structures/StringSelectMenuOptionBuilder.js +0 -49
  806. package/.output/server/node_modules/discord.js/src/structures/Subscription.js +0 -117
  807. package/.output/server/node_modules/discord.js/src/structures/Team.js +0 -117
  808. package/.output/server/node_modules/discord.js/src/structures/TeamMember.js +0 -79
  809. package/.output/server/node_modules/discord.js/src/structures/TextChannel.js +0 -33
  810. package/.output/server/node_modules/discord.js/src/structures/TextDisplayComponent.js +0 -20
  811. package/.output/server/node_modules/discord.js/src/structures/TextInputBuilder.js +0 -31
  812. package/.output/server/node_modules/discord.js/src/structures/TextInputComponent.js +0 -29
  813. package/.output/server/node_modules/discord.js/src/structures/ThreadChannel.js +0 -612
  814. package/.output/server/node_modules/discord.js/src/structures/ThreadMember.js +0 -119
  815. package/.output/server/node_modules/discord.js/src/structures/ThreadOnlyChannel.js +0 -249
  816. package/.output/server/node_modules/discord.js/src/structures/ThumbnailComponent.js +0 -49
  817. package/.output/server/node_modules/discord.js/src/structures/Typing.js +0 -74
  818. package/.output/server/node_modules/discord.js/src/structures/UnfurledMediaItem.js +0 -33
  819. package/.output/server/node_modules/discord.js/src/structures/User.js +0 -505
  820. package/.output/server/node_modules/discord.js/src/structures/UserContextMenuCommandInteraction.js +0 -29
  821. package/.output/server/node_modules/discord.js/src/structures/UserSelectMenuBuilder.js +0 -31
  822. package/.output/server/node_modules/discord.js/src/structures/UserSelectMenuComponent.js +0 -11
  823. package/.output/server/node_modules/discord.js/src/structures/UserSelectMenuInteraction.js +0 -51
  824. package/.output/server/node_modules/discord.js/src/structures/VoiceChannel.js +0 -116
  825. package/.output/server/node_modules/discord.js/src/structures/VoiceChannelEffect.js +0 -78
  826. package/.output/server/node_modules/discord.js/src/structures/VoiceRegion.js +0 -46
  827. package/.output/server/node_modules/discord.js/src/structures/VoiceState.js +0 -312
  828. package/.output/server/node_modules/discord.js/src/structures/Webhook.js +0 -489
  829. package/.output/server/node_modules/discord.js/src/structures/WelcomeChannel.js +0 -60
  830. package/.output/server/node_modules/discord.js/src/structures/WelcomeScreen.js +0 -49
  831. package/.output/server/node_modules/discord.js/src/structures/Widget.js +0 -97
  832. package/.output/server/node_modules/discord.js/src/structures/WidgetMember.js +0 -99
  833. package/.output/server/node_modules/discord.js/src/structures/interfaces/Application.js +0 -158
  834. package/.output/server/node_modules/discord.js/src/structures/interfaces/Collector.js +0 -335
  835. package/.output/server/node_modules/discord.js/src/structures/interfaces/InteractionResponses.js +0 -494
  836. package/.output/server/node_modules/discord.js/src/structures/interfaces/TextBasedChannel.js +0 -447
  837. package/.output/server/node_modules/discord.js/src/util/ActivityFlagsBitField.js +0 -26
  838. package/.output/server/node_modules/discord.js/src/util/ApplicationFlagsBitField.js +0 -41
  839. package/.output/server/node_modules/discord.js/src/util/AttachmentFlagsBitField.js +0 -26
  840. package/.output/server/node_modules/discord.js/src/util/BitField.js +0 -178
  841. package/.output/server/node_modules/discord.js/src/util/ChannelFlagsBitField.js +0 -41
  842. package/.output/server/node_modules/discord.js/src/util/Channels.js +0 -161
  843. package/.output/server/node_modules/discord.js/src/util/Colors.js +0 -73
  844. package/.output/server/node_modules/discord.js/src/util/Components.js +0 -311
  845. package/.output/server/node_modules/discord.js/src/util/Constants.js +0 -283
  846. package/.output/server/node_modules/discord.js/src/util/DataResolver.js +0 -142
  847. package/.output/server/node_modules/discord.js/src/util/Enums.js +0 -13
  848. package/.output/server/node_modules/discord.js/src/util/Events.js +0 -190
  849. package/.output/server/node_modules/discord.js/src/util/Formatters.js +0 -413
  850. package/.output/server/node_modules/discord.js/src/util/GuildMemberFlagsBitField.js +0 -42
  851. package/.output/server/node_modules/discord.js/src/util/IntentsBitField.js +0 -34
  852. package/.output/server/node_modules/discord.js/src/util/InviteFlagsBitField.js +0 -28
  853. package/.output/server/node_modules/discord.js/src/util/LimitedCollection.js +0 -68
  854. package/.output/server/node_modules/discord.js/src/util/MessageFlagsBitField.js +0 -41
  855. package/.output/server/node_modules/discord.js/src/util/Options.js +0 -239
  856. package/.output/server/node_modules/discord.js/src/util/Partials.js +0 -50
  857. package/.output/server/node_modules/discord.js/src/util/PermissionsBitField.js +0 -104
  858. package/.output/server/node_modules/discord.js/src/util/RoleFlagsBitField.js +0 -26
  859. package/.output/server/node_modules/discord.js/src/util/SKUFlagsBitField.js +0 -26
  860. package/.output/server/node_modules/discord.js/src/util/ShardEvents.js +0 -29
  861. package/.output/server/node_modules/discord.js/src/util/Status.js +0 -33
  862. package/.output/server/node_modules/discord.js/src/util/Sweepers.js +0 -487
  863. package/.output/server/node_modules/discord.js/src/util/Symbols.js +0 -3
  864. package/.output/server/node_modules/discord.js/src/util/SystemChannelFlagsBitField.js +0 -43
  865. package/.output/server/node_modules/discord.js/src/util/ThreadMemberFlagsBitField.js +0 -32
  866. package/.output/server/node_modules/discord.js/src/util/Transformers.js +0 -125
  867. package/.output/server/node_modules/discord.js/src/util/UserFlagsBitField.js +0 -32
  868. package/.output/server/node_modules/discord.js/src/util/Util.js +0 -558
  869. package/.output/server/node_modules/discord.js/src/util/WebSocketShardEvents.js +0 -25
  870. package/.output/server/node_modules/fast-deep-equal/es6/index.js +0 -72
  871. package/.output/server/node_modules/fast-deep-equal/index.js +0 -46
  872. package/.output/server/node_modules/fast-deep-equal/package.json +0 -61
  873. package/.output/server/node_modules/lodash/_Hash.js +0 -32
  874. package/.output/server/node_modules/lodash/_ListCache.js +0 -32
  875. package/.output/server/node_modules/lodash/_Map.js +0 -7
  876. package/.output/server/node_modules/lodash/_MapCache.js +0 -32
  877. package/.output/server/node_modules/lodash/_Set.js +0 -7
  878. package/.output/server/node_modules/lodash/_SetCache.js +0 -27
  879. package/.output/server/node_modules/lodash/_Symbol.js +0 -6
  880. package/.output/server/node_modules/lodash/_arrayIncludes.js +0 -17
  881. package/.output/server/node_modules/lodash/_arrayIncludesWith.js +0 -22
  882. package/.output/server/node_modules/lodash/_arrayMap.js +0 -21
  883. package/.output/server/node_modules/lodash/_assocIndexOf.js +0 -21
  884. package/.output/server/node_modules/lodash/_baseFindIndex.js +0 -24
  885. package/.output/server/node_modules/lodash/_baseGet.js +0 -24
  886. package/.output/server/node_modules/lodash/_baseGetTag.js +0 -28
  887. package/.output/server/node_modules/lodash/_baseIndexOf.js +0 -20
  888. package/.output/server/node_modules/lodash/_baseIsNaN.js +0 -12
  889. package/.output/server/node_modules/lodash/_baseIsNative.js +0 -47
  890. package/.output/server/node_modules/lodash/_baseToString.js +0 -37
  891. package/.output/server/node_modules/lodash/_baseUniq.js +0 -72
  892. package/.output/server/node_modules/lodash/_cacheHas.js +0 -13
  893. package/.output/server/node_modules/lodash/_castPath.js +0 -21
  894. package/.output/server/node_modules/lodash/_coreJsData.js +0 -6
  895. package/.output/server/node_modules/lodash/_createSet.js +0 -19
  896. package/.output/server/node_modules/lodash/_freeGlobal.js +0 -4
  897. package/.output/server/node_modules/lodash/_getMapData.js +0 -18
  898. package/.output/server/node_modules/lodash/_getNative.js +0 -17
  899. package/.output/server/node_modules/lodash/_getRawTag.js +0 -46
  900. package/.output/server/node_modules/lodash/_getValue.js +0 -13
  901. package/.output/server/node_modules/lodash/_hashClear.js +0 -15
  902. package/.output/server/node_modules/lodash/_hashDelete.js +0 -17
  903. package/.output/server/node_modules/lodash/_hashGet.js +0 -30
  904. package/.output/server/node_modules/lodash/_hashHas.js +0 -23
  905. package/.output/server/node_modules/lodash/_hashSet.js +0 -23
  906. package/.output/server/node_modules/lodash/_isKey.js +0 -29
  907. package/.output/server/node_modules/lodash/_isKeyable.js +0 -15
  908. package/.output/server/node_modules/lodash/_isMasked.js +0 -20
  909. package/.output/server/node_modules/lodash/_listCacheClear.js +0 -13
  910. package/.output/server/node_modules/lodash/_listCacheDelete.js +0 -35
  911. package/.output/server/node_modules/lodash/_listCacheGet.js +0 -19
  912. package/.output/server/node_modules/lodash/_listCacheHas.js +0 -16
  913. package/.output/server/node_modules/lodash/_listCacheSet.js +0 -26
  914. package/.output/server/node_modules/lodash/_mapCacheClear.js +0 -21
  915. package/.output/server/node_modules/lodash/_mapCacheDelete.js +0 -18
  916. package/.output/server/node_modules/lodash/_mapCacheGet.js +0 -16
  917. package/.output/server/node_modules/lodash/_mapCacheHas.js +0 -16
  918. package/.output/server/node_modules/lodash/_mapCacheSet.js +0 -22
  919. package/.output/server/node_modules/lodash/_memoizeCapped.js +0 -26
  920. package/.output/server/node_modules/lodash/_nativeCreate.js +0 -6
  921. package/.output/server/node_modules/lodash/_objectToString.js +0 -22
  922. package/.output/server/node_modules/lodash/_root.js +0 -9
  923. package/.output/server/node_modules/lodash/_setCacheAdd.js +0 -19
  924. package/.output/server/node_modules/lodash/_setCacheHas.js +0 -14
  925. package/.output/server/node_modules/lodash/_setToArray.js +0 -18
  926. package/.output/server/node_modules/lodash/_strictIndexOf.js +0 -23
  927. package/.output/server/node_modules/lodash/_stringToPath.js +0 -27
  928. package/.output/server/node_modules/lodash/_toKey.js +0 -21
  929. package/.output/server/node_modules/lodash/_toSource.js +0 -26
  930. package/.output/server/node_modules/lodash/eq.js +0 -37
  931. package/.output/server/node_modules/lodash/get.js +0 -33
  932. package/.output/server/node_modules/lodash/isArray.js +0 -26
  933. package/.output/server/node_modules/lodash/isFunction.js +0 -37
  934. package/.output/server/node_modules/lodash/isObject.js +0 -31
  935. package/.output/server/node_modules/lodash/isObjectLike.js +0 -29
  936. package/.output/server/node_modules/lodash/isSymbol.js +0 -29
  937. package/.output/server/node_modules/lodash/memoize.js +0 -73
  938. package/.output/server/node_modules/lodash/noop.js +0 -17
  939. package/.output/server/node_modules/lodash/package.json +0 -19
  940. package/.output/server/node_modules/lodash/toString.js +0 -28
  941. package/.output/server/node_modules/lodash/uniqWith.js +0 -28
  942. package/.output/server/node_modules/lodash.snakecase/index.js +0 -435
  943. package/.output/server/node_modules/lodash.snakecase/package.json +0 -19
  944. package/.output/server/node_modules/magic-bytes.js/dist/index.js +0 -61
  945. package/.output/server/node_modules/magic-bytes.js/dist/model/pattern-tree.js +0 -1176
  946. package/.output/server/node_modules/magic-bytes.js/dist/model/toHex.js +0 -8
  947. package/.output/server/node_modules/magic-bytes.js/dist/model/tree.js +0 -61
  948. package/.output/server/node_modules/magic-bytes.js/package.json +0 -77
  949. package/.output/server/node_modules/ts-mixer/dist/cjs/decorator.js +0 -109
  950. package/.output/server/node_modules/ts-mixer/dist/cjs/index.js +0 -12
  951. package/.output/server/node_modules/ts-mixer/dist/cjs/mixin-tracking.js +0 -42
  952. package/.output/server/node_modules/ts-mixer/dist/cjs/mixins.js +0 -82
  953. package/.output/server/node_modules/ts-mixer/dist/cjs/proxy.js +0 -82
  954. package/.output/server/node_modules/ts-mixer/dist/cjs/settings.js +0 -9
  955. package/.output/server/node_modules/ts-mixer/dist/cjs/util.js +0 -85
  956. package/.output/server/node_modules/ts-mixer/package.json +0 -63
  957. package/.output/server/node_modules/tslib/package.json +0 -47
  958. package/.output/server/node_modules/tslib/tslib.js +0 -484
  959. package/.output/server/node_modules/undici/index.js +0 -169
  960. package/.output/server/node_modules/undici/lib/api/abort-signal.js +0 -57
  961. package/.output/server/node_modules/undici/lib/api/api-connect.js +0 -108
  962. package/.output/server/node_modules/undici/lib/api/api-pipeline.js +0 -251
  963. package/.output/server/node_modules/undici/lib/api/api-request.js +0 -214
  964. package/.output/server/node_modules/undici/lib/api/api-stream.js +0 -220
  965. package/.output/server/node_modules/undici/lib/api/api-upgrade.js +0 -108
  966. package/.output/server/node_modules/undici/lib/api/index.js +0 -7
  967. package/.output/server/node_modules/undici/lib/api/readable.js +0 -385
  968. package/.output/server/node_modules/undici/lib/api/util.js +0 -93
  969. package/.output/server/node_modules/undici/lib/core/connect.js +0 -240
  970. package/.output/server/node_modules/undici/lib/core/constants.js +0 -118
  971. package/.output/server/node_modules/undici/lib/core/diagnostics.js +0 -202
  972. package/.output/server/node_modules/undici/lib/core/errors.js +0 -244
  973. package/.output/server/node_modules/undici/lib/core/request.js +0 -395
  974. package/.output/server/node_modules/undici/lib/core/symbols.js +0 -67
  975. package/.output/server/node_modules/undici/lib/core/tree.js +0 -152
  976. package/.output/server/node_modules/undici/lib/core/util.js +0 -719
  977. package/.output/server/node_modules/undici/lib/dispatcher/agent.js +0 -129
  978. package/.output/server/node_modules/undici/lib/dispatcher/balanced-pool.js +0 -209
  979. package/.output/server/node_modules/undici/lib/dispatcher/client-h1.js +0 -1370
  980. package/.output/server/node_modules/undici/lib/dispatcher/client-h2.js +0 -744
  981. package/.output/server/node_modules/undici/lib/dispatcher/client.js +0 -622
  982. package/.output/server/node_modules/undici/lib/dispatcher/dispatcher-base.js +0 -190
  983. package/.output/server/node_modules/undici/lib/dispatcher/dispatcher.js +0 -65
  984. package/.output/server/node_modules/undici/lib/dispatcher/env-http-proxy-agent.js +0 -160
  985. package/.output/server/node_modules/undici/lib/dispatcher/fixed-queue.js +0 -117
  986. package/.output/server/node_modules/undici/lib/dispatcher/pool-base.js +0 -194
  987. package/.output/server/node_modules/undici/lib/dispatcher/pool-stats.js +0 -34
  988. package/.output/server/node_modules/undici/lib/dispatcher/pool.js +0 -107
  989. package/.output/server/node_modules/undici/lib/dispatcher/proxy-agent.js +0 -192
  990. package/.output/server/node_modules/undici/lib/dispatcher/retry-agent.js +0 -35
  991. package/.output/server/node_modules/undici/lib/global.js +0 -32
  992. package/.output/server/node_modules/undici/lib/handler/decorator-handler.js +0 -44
  993. package/.output/server/node_modules/undici/lib/handler/redirect-handler.js +0 -232
  994. package/.output/server/node_modules/undici/lib/handler/retry-handler.js +0 -374
  995. package/.output/server/node_modules/undici/lib/interceptor/dns.js +0 -375
  996. package/.output/server/node_modules/undici/lib/interceptor/dump.js +0 -123
  997. package/.output/server/node_modules/undici/lib/interceptor/redirect-interceptor.js +0 -21
  998. package/.output/server/node_modules/undici/lib/interceptor/redirect.js +0 -24
  999. package/.output/server/node_modules/undici/lib/interceptor/retry.js +0 -19
  1000. package/.output/server/node_modules/undici/lib/llhttp/constants.js +0 -278
  1001. package/.output/server/node_modules/undici/lib/llhttp/llhttp-wasm.js +0 -5
  1002. package/.output/server/node_modules/undici/lib/llhttp/llhttp_simd-wasm.js +0 -5
  1003. package/.output/server/node_modules/undici/lib/llhttp/utils.js +0 -15
  1004. package/.output/server/node_modules/undici/lib/mock/mock-agent.js +0 -160
  1005. package/.output/server/node_modules/undici/lib/mock/mock-client.js +0 -59
  1006. package/.output/server/node_modules/undici/lib/mock/mock-errors.js +0 -17
  1007. package/.output/server/node_modules/undici/lib/mock/mock-interceptor.js +0 -207
  1008. package/.output/server/node_modules/undici/lib/mock/mock-pool.js +0 -59
  1009. package/.output/server/node_modules/undici/lib/mock/mock-symbols.js +0 -23
  1010. package/.output/server/node_modules/undici/lib/mock/mock-utils.js +0 -367
  1011. package/.output/server/node_modules/undici/lib/mock/pending-interceptors-formatter.js +0 -43
  1012. package/.output/server/node_modules/undici/lib/mock/pluralizer.js +0 -29
  1013. package/.output/server/node_modules/undici/lib/util/timers.js +0 -423
  1014. package/.output/server/node_modules/undici/lib/web/cache/cache.js +0 -859
  1015. package/.output/server/node_modules/undici/lib/web/cache/cachestorage.js +0 -152
  1016. package/.output/server/node_modules/undici/lib/web/cache/symbols.js +0 -5
  1017. package/.output/server/node_modules/undici/lib/web/cache/util.js +0 -45
  1018. package/.output/server/node_modules/undici/lib/web/cookies/constants.js +0 -12
  1019. package/.output/server/node_modules/undici/lib/web/cookies/index.js +0 -184
  1020. package/.output/server/node_modules/undici/lib/web/cookies/parse.js +0 -317
  1021. package/.output/server/node_modules/undici/lib/web/cookies/util.js +0 -282
  1022. package/.output/server/node_modules/undici/lib/web/eventsource/eventsource-stream.js +0 -398
  1023. package/.output/server/node_modules/undici/lib/web/eventsource/eventsource.js +0 -480
  1024. package/.output/server/node_modules/undici/lib/web/eventsource/util.js +0 -37
  1025. package/.output/server/node_modules/undici/lib/web/fetch/body.js +0 -533
  1026. package/.output/server/node_modules/undici/lib/web/fetch/constants.js +0 -124
  1027. package/.output/server/node_modules/undici/lib/web/fetch/data-url.js +0 -744
  1028. package/.output/server/node_modules/undici/lib/web/fetch/dispatcher-weakref.js +0 -46
  1029. package/.output/server/node_modules/undici/lib/web/fetch/file.js +0 -126
  1030. package/.output/server/node_modules/undici/lib/web/fetch/formdata-parser.js +0 -474
  1031. package/.output/server/node_modules/undici/lib/web/fetch/formdata.js +0 -252
  1032. package/.output/server/node_modules/undici/lib/web/fetch/global.js +0 -40
  1033. package/.output/server/node_modules/undici/lib/web/fetch/headers.js +0 -687
  1034. package/.output/server/node_modules/undici/lib/web/fetch/index.js +0 -2266
  1035. package/.output/server/node_modules/undici/lib/web/fetch/request.js +0 -1037
  1036. package/.output/server/node_modules/undici/lib/web/fetch/response.js +0 -605
  1037. package/.output/server/node_modules/undici/lib/web/fetch/symbols.js +0 -9
  1038. package/.output/server/node_modules/undici/lib/web/fetch/util.js +0 -1632
  1039. package/.output/server/node_modules/undici/lib/web/fetch/webidl.js +0 -695
  1040. package/.output/server/node_modules/undici/lib/web/fileapi/encoding.js +0 -290
  1041. package/.output/server/node_modules/undici/lib/web/fileapi/filereader.js +0 -344
  1042. package/.output/server/node_modules/undici/lib/web/fileapi/progressevent.js +0 -78
  1043. package/.output/server/node_modules/undici/lib/web/fileapi/symbols.js +0 -10
  1044. package/.output/server/node_modules/undici/lib/web/fileapi/util.js +0 -391
  1045. package/.output/server/node_modules/undici/lib/web/websocket/connection.js +0 -371
  1046. package/.output/server/node_modules/undici/lib/web/websocket/constants.js +0 -66
  1047. package/.output/server/node_modules/undici/lib/web/websocket/events.js +0 -329
  1048. package/.output/server/node_modules/undici/lib/web/websocket/frame.js +0 -96
  1049. package/.output/server/node_modules/undici/lib/web/websocket/permessage-deflate.js +0 -70
  1050. package/.output/server/node_modules/undici/lib/web/websocket/receiver.js +0 -424
  1051. package/.output/server/node_modules/undici/lib/web/websocket/sender.js +0 -104
  1052. package/.output/server/node_modules/undici/lib/web/websocket/symbols.js +0 -12
  1053. package/.output/server/node_modules/undici/lib/web/websocket/util.js +0 -314
  1054. package/.output/server/node_modules/undici/lib/web/websocket/websocket.js +0 -588
  1055. package/.output/server/node_modules/undici/package.json +0 -160
  1056. package/.output/server/node_modules/ws/index.js +0 -13
  1057. package/.output/server/node_modules/ws/lib/buffer-util.js +0 -131
  1058. package/.output/server/node_modules/ws/lib/constants.js +0 -18
  1059. package/.output/server/node_modules/ws/lib/event-target.js +0 -292
  1060. package/.output/server/node_modules/ws/lib/extension.js +0 -203
  1061. package/.output/server/node_modules/ws/lib/limiter.js +0 -55
  1062. package/.output/server/node_modules/ws/lib/permessage-deflate.js +0 -528
  1063. package/.output/server/node_modules/ws/lib/receiver.js +0 -706
  1064. package/.output/server/node_modules/ws/lib/sender.js +0 -602
  1065. package/.output/server/node_modules/ws/lib/stream.js +0 -161
  1066. package/.output/server/node_modules/ws/lib/subprotocol.js +0 -62
  1067. package/.output/server/node_modules/ws/lib/validation.js +0 -152
  1068. package/.output/server/node_modules/ws/lib/websocket-server.js +0 -550
  1069. package/.output/server/node_modules/ws/lib/websocket.js +0 -1388
  1070. package/.output/server/node_modules/ws/package.json +0 -69
@@ -1,4229 +0,0 @@
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 __name = (target, value) => __defProp(target, "name", { value, configurable: true });
9
- var __export = (target, all) => {
10
- for (var name in all)
11
- __defProp(target, name, { get: all[name], enumerable: true });
12
- };
13
- var __copyProps = (to, from, except, desc) => {
14
- if (from && typeof from === "object" || typeof from === "function") {
15
- for (let key of __getOwnPropNames(from))
16
- if (!__hasOwnProp.call(to, key) && key !== except)
17
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
18
- }
19
- return to;
20
- };
21
- var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
22
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
23
- // If the importer is in node compatibility mode or this is not an ESM
24
- // file that has been converted to a CommonJS file using a Babel-
25
- // compatible transform (i.e. "__esModule" has not been set), then set
26
- // "default" to the CommonJS "module.exports" for node compatibility.
27
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
28
- mod
29
- ));
30
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
31
- var __decorateClass = (decorators, target, key, kind) => {
32
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
33
- for (var i = decorators.length - 1, decorator; i >= 0; i--)
34
- if (decorator = decorators[i])
35
- result = (kind ? decorator(target, key, result) : decorator(result)) || result;
36
- if (kind && result) __defProp(target, key, result);
37
- return result;
38
- };
39
-
40
- // src/index.ts
41
- var index_exports = {};
42
- __export(index_exports, {
43
- ActionRowBuilder: () => ActionRowBuilder,
44
- ApplicationCommandNumericOptionMinMaxValueMixin: () => ApplicationCommandNumericOptionMinMaxValueMixin,
45
- ApplicationCommandOptionBase: () => ApplicationCommandOptionBase,
46
- ApplicationCommandOptionChannelTypesMixin: () => ApplicationCommandOptionChannelTypesMixin,
47
- ApplicationCommandOptionWithAutocompleteMixin: () => ApplicationCommandOptionWithAutocompleteMixin,
48
- ApplicationCommandOptionWithChoicesMixin: () => ApplicationCommandOptionWithChoicesMixin,
49
- BaseSelectMenuBuilder: () => BaseSelectMenuBuilder,
50
- ButtonBuilder: () => ButtonBuilder,
51
- ChannelSelectMenuBuilder: () => ChannelSelectMenuBuilder,
52
- ComponentAssertions: () => Assertions_exports2,
53
- ComponentBuilder: () => ComponentBuilder,
54
- ComponentsV2Assertions: () => Assertions_exports7,
55
- ContainerBuilder: () => ContainerBuilder,
56
- ContextMenuCommandAssertions: () => Assertions_exports10,
57
- ContextMenuCommandBuilder: () => ContextMenuCommandBuilder,
58
- EmbedAssertions: () => Assertions_exports,
59
- EmbedBuilder: () => EmbedBuilder,
60
- FileBuilder: () => FileBuilder,
61
- FileUploadAssertions: () => Assertions_exports3,
62
- FileUploadBuilder: () => FileUploadBuilder,
63
- LabelAssertions: () => Assertions_exports6,
64
- LabelBuilder: () => LabelBuilder,
65
- MediaGalleryBuilder: () => MediaGalleryBuilder,
66
- MediaGalleryItemBuilder: () => MediaGalleryItemBuilder,
67
- MentionableSelectMenuBuilder: () => MentionableSelectMenuBuilder,
68
- ModalAssertions: () => Assertions_exports8,
69
- ModalBuilder: () => ModalBuilder,
70
- RoleSelectMenuBuilder: () => RoleSelectMenuBuilder,
71
- SectionBuilder: () => SectionBuilder,
72
- SelectMenuAssertions: () => Assertions_exports5,
73
- SelectMenuBuilder: () => StringSelectMenuBuilder,
74
- SelectMenuOptionBuilder: () => StringSelectMenuOptionBuilder,
75
- SeparatorBuilder: () => SeparatorBuilder,
76
- SharedNameAndDescription: () => SharedNameAndDescription,
77
- SharedSlashCommand: () => SharedSlashCommand,
78
- SharedSlashCommandOptions: () => SharedSlashCommandOptions,
79
- SharedSlashCommandSubcommands: () => SharedSlashCommandSubcommands,
80
- SlashCommandAssertions: () => Assertions_exports9,
81
- SlashCommandAttachmentOption: () => SlashCommandAttachmentOption,
82
- SlashCommandBooleanOption: () => SlashCommandBooleanOption,
83
- SlashCommandBuilder: () => SlashCommandBuilder,
84
- SlashCommandChannelOption: () => SlashCommandChannelOption,
85
- SlashCommandIntegerOption: () => SlashCommandIntegerOption,
86
- SlashCommandMentionableOption: () => SlashCommandMentionableOption,
87
- SlashCommandNumberOption: () => SlashCommandNumberOption,
88
- SlashCommandRoleOption: () => SlashCommandRoleOption,
89
- SlashCommandStringOption: () => SlashCommandStringOption,
90
- SlashCommandSubcommandBuilder: () => SlashCommandSubcommandBuilder,
91
- SlashCommandSubcommandGroupBuilder: () => SlashCommandSubcommandGroupBuilder,
92
- SlashCommandUserOption: () => SlashCommandUserOption,
93
- StringSelectMenuBuilder: () => StringSelectMenuBuilder,
94
- StringSelectMenuOptionBuilder: () => StringSelectMenuOptionBuilder,
95
- TextDisplayBuilder: () => TextDisplayBuilder,
96
- TextInputAssertions: () => Assertions_exports4,
97
- TextInputBuilder: () => TextInputBuilder,
98
- ThumbnailBuilder: () => ThumbnailBuilder,
99
- UserSelectMenuBuilder: () => UserSelectMenuBuilder,
100
- createComponentBuilder: () => createComponentBuilder,
101
- disableValidators: () => disableValidators,
102
- embedLength: () => embedLength,
103
- enableValidators: () => enableValidators,
104
- isValidationEnabled: () => isValidationEnabled,
105
- normalizeArray: () => normalizeArray,
106
- resolveBuilder: () => resolveBuilder,
107
- version: () => version
108
- });
109
- module.exports = __toCommonJS(index_exports);
110
-
111
- // src/messages/embed/Assertions.ts
112
- var Assertions_exports = {};
113
- __export(Assertions_exports, {
114
- RGBPredicate: () => RGBPredicate,
115
- authorNamePredicate: () => authorNamePredicate,
116
- colorPredicate: () => colorPredicate,
117
- descriptionPredicate: () => descriptionPredicate,
118
- embedAuthorPredicate: () => embedAuthorPredicate,
119
- embedFieldPredicate: () => embedFieldPredicate,
120
- embedFieldsArrayPredicate: () => embedFieldsArrayPredicate,
121
- embedFooterPredicate: () => embedFooterPredicate,
122
- fieldInlinePredicate: () => fieldInlinePredicate,
123
- fieldLengthPredicate: () => fieldLengthPredicate,
124
- fieldNamePredicate: () => fieldNamePredicate,
125
- fieldValuePredicate: () => fieldValuePredicate,
126
- footerTextPredicate: () => footerTextPredicate,
127
- imageURLPredicate: () => imageURLPredicate,
128
- timestampPredicate: () => timestampPredicate,
129
- titlePredicate: () => titlePredicate,
130
- urlPredicate: () => urlPredicate,
131
- validateFieldLength: () => validateFieldLength
132
- });
133
- var import_shapeshift = require("@sapphire/shapeshift");
134
-
135
- // src/util/validation.ts
136
- var validate = true;
137
- function enableValidators() {
138
- return validate = true;
139
- }
140
- __name(enableValidators, "enableValidators");
141
- function disableValidators() {
142
- return validate = false;
143
- }
144
- __name(disableValidators, "disableValidators");
145
- function isValidationEnabled() {
146
- return validate;
147
- }
148
- __name(isValidationEnabled, "isValidationEnabled");
149
-
150
- // src/messages/embed/Assertions.ts
151
- var fieldNamePredicate = import_shapeshift.s.string().lengthLessThanOrEqual(256).setValidationEnabled(isValidationEnabled);
152
- var fieldValuePredicate = import_shapeshift.s.string().lengthLessThanOrEqual(1024).setValidationEnabled(isValidationEnabled);
153
- var fieldInlinePredicate = import_shapeshift.s.boolean().optional();
154
- var embedFieldPredicate = import_shapeshift.s.object({
155
- name: fieldNamePredicate,
156
- value: fieldValuePredicate,
157
- inline: fieldInlinePredicate
158
- }).setValidationEnabled(isValidationEnabled);
159
- var embedFieldsArrayPredicate = embedFieldPredicate.array().setValidationEnabled(isValidationEnabled);
160
- var fieldLengthPredicate = import_shapeshift.s.number().lessThanOrEqual(25).setValidationEnabled(isValidationEnabled);
161
- function validateFieldLength(amountAdding, fields) {
162
- fieldLengthPredicate.parse((fields?.length ?? 0) + amountAdding);
163
- }
164
- __name(validateFieldLength, "validateFieldLength");
165
- var authorNamePredicate = fieldNamePredicate.lengthGreaterThanOrEqual(1).nullable().setValidationEnabled(isValidationEnabled);
166
- var imageURLPredicate = import_shapeshift.s.string().url({
167
- allowedProtocols: ["http:", "https:", "attachment:"]
168
- }).nullish().setValidationEnabled(isValidationEnabled);
169
- var urlPredicate = import_shapeshift.s.string().url({
170
- allowedProtocols: ["http:", "https:"]
171
- }).nullish().setValidationEnabled(isValidationEnabled);
172
- var embedAuthorPredicate = import_shapeshift.s.object({
173
- name: authorNamePredicate,
174
- iconURL: imageURLPredicate,
175
- url: urlPredicate
176
- }).setValidationEnabled(isValidationEnabled);
177
- var RGBPredicate = import_shapeshift.s.number().int().greaterThanOrEqual(0).lessThanOrEqual(255).setValidationEnabled(isValidationEnabled);
178
- var colorPredicate = import_shapeshift.s.number().int().greaterThanOrEqual(0).lessThanOrEqual(16777215).or(import_shapeshift.s.tuple([RGBPredicate, RGBPredicate, RGBPredicate])).nullable().setValidationEnabled(isValidationEnabled);
179
- var descriptionPredicate = import_shapeshift.s.string().lengthGreaterThanOrEqual(1).lengthLessThanOrEqual(4096).nullable().setValidationEnabled(isValidationEnabled);
180
- var footerTextPredicate = import_shapeshift.s.string().lengthGreaterThanOrEqual(1).lengthLessThanOrEqual(2048).nullable().setValidationEnabled(isValidationEnabled);
181
- var embedFooterPredicate = import_shapeshift.s.object({
182
- text: footerTextPredicate,
183
- iconURL: imageURLPredicate
184
- }).setValidationEnabled(isValidationEnabled);
185
- var timestampPredicate = import_shapeshift.s.union([import_shapeshift.s.number(), import_shapeshift.s.date()]).nullable().setValidationEnabled(isValidationEnabled);
186
- var titlePredicate = fieldNamePredicate.lengthGreaterThanOrEqual(1).nullable().setValidationEnabled(isValidationEnabled);
187
-
188
- // src/util/normalizeArray.ts
189
- function normalizeArray(arr) {
190
- if (Array.isArray(arr[0])) return [...arr[0]];
191
- return arr;
192
- }
193
- __name(normalizeArray, "normalizeArray");
194
-
195
- // src/messages/embed/Embed.ts
196
- var EmbedBuilder = class {
197
- static {
198
- __name(this, "EmbedBuilder");
199
- }
200
- /**
201
- * The API data associated with this embed.
202
- */
203
- data;
204
- /**
205
- * Creates a new embed from API data.
206
- *
207
- * @param data - The API data to create this embed with
208
- */
209
- constructor(data = {}) {
210
- this.data = { ...data };
211
- if (data.timestamp) this.data.timestamp = new Date(data.timestamp).toISOString();
212
- }
213
- /**
214
- * Appends fields to the embed.
215
- *
216
- * @remarks
217
- * This method accepts either an array of fields or a variable number of field parameters.
218
- * The maximum amount of fields that can be added is 25.
219
- * @example
220
- * Using an array:
221
- * ```ts
222
- * const fields: APIEmbedField[] = ...;
223
- * const embed = new EmbedBuilder()
224
- * .addFields(fields);
225
- * ```
226
- * @example
227
- * Using rest parameters (variadic):
228
- * ```ts
229
- * const embed = new EmbedBuilder()
230
- * .addFields(
231
- * { name: 'Field 1', value: 'Value 1' },
232
- * { name: 'Field 2', value: 'Value 2' },
233
- * );
234
- * ```
235
- * @param fields - The fields to add
236
- */
237
- addFields(...fields) {
238
- const normalizedFields = normalizeArray(fields);
239
- validateFieldLength(normalizedFields.length, this.data.fields);
240
- embedFieldsArrayPredicate.parse(normalizedFields);
241
- if (this.data.fields) this.data.fields.push(...normalizedFields);
242
- else this.data.fields = normalizedFields;
243
- return this;
244
- }
245
- /**
246
- * Removes, replaces, or inserts fields for this embed.
247
- *
248
- * @remarks
249
- * This method behaves similarly
250
- * to {@link https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/splice | Array.prototype.splice()}.
251
- * The maximum amount of fields that can be added is 25.
252
- *
253
- * It's useful for modifying and adjusting order of the already-existing fields of an embed.
254
- * @example
255
- * Remove the first field:
256
- * ```ts
257
- * embed.spliceFields(0, 1);
258
- * ```
259
- * @example
260
- * Remove the first n fields:
261
- * ```ts
262
- * const n = 4;
263
- * embed.spliceFields(0, n);
264
- * ```
265
- * @example
266
- * Remove the last field:
267
- * ```ts
268
- * embed.spliceFields(-1, 1);
269
- * ```
270
- * @param index - The index to start at
271
- * @param deleteCount - The number of fields to remove
272
- * @param fields - The replacing field objects
273
- */
274
- spliceFields(index, deleteCount, ...fields) {
275
- validateFieldLength(fields.length - deleteCount, this.data.fields);
276
- embedFieldsArrayPredicate.parse(fields);
277
- if (this.data.fields) this.data.fields.splice(index, deleteCount, ...fields);
278
- else this.data.fields = fields;
279
- return this;
280
- }
281
- /**
282
- * Sets the fields for this embed.
283
- *
284
- * @remarks
285
- * This method is an alias for {@link EmbedBuilder.spliceFields}. More specifically,
286
- * it splices the entire array of fields, replacing them with the provided fields.
287
- *
288
- * You can set a maximum of 25 fields.
289
- * @param fields - The fields to set
290
- */
291
- setFields(...fields) {
292
- this.spliceFields(0, this.data.fields?.length ?? 0, ...normalizeArray(fields));
293
- return this;
294
- }
295
- /**
296
- * Sets the author of this embed.
297
- *
298
- * @param options - The options to use
299
- */
300
- setAuthor(options) {
301
- if (options === null) {
302
- this.data.author = void 0;
303
- return this;
304
- }
305
- embedAuthorPredicate.parse(options);
306
- this.data.author = { name: options.name, url: options.url, icon_url: options.iconURL };
307
- return this;
308
- }
309
- /**
310
- * Sets the color of this embed.
311
- *
312
- * @param color - The color to use
313
- */
314
- setColor(color) {
315
- colorPredicate.parse(color);
316
- if (Array.isArray(color)) {
317
- const [red, green, blue] = color;
318
- this.data.color = (red << 16) + (green << 8) + blue;
319
- return this;
320
- }
321
- this.data.color = color ?? void 0;
322
- return this;
323
- }
324
- /**
325
- * Sets the description of this embed.
326
- *
327
- * @param description - The description to use
328
- */
329
- setDescription(description) {
330
- descriptionPredicate.parse(description);
331
- this.data.description = description ?? void 0;
332
- return this;
333
- }
334
- /**
335
- * Sets the footer of this embed.
336
- *
337
- * @param options - The footer to use
338
- */
339
- setFooter(options) {
340
- if (options === null) {
341
- this.data.footer = void 0;
342
- return this;
343
- }
344
- embedFooterPredicate.parse(options);
345
- this.data.footer = { text: options.text, icon_url: options.iconURL };
346
- return this;
347
- }
348
- /**
349
- * Sets the image of this embed.
350
- *
351
- * @param url - The image URL to use
352
- */
353
- setImage(url) {
354
- imageURLPredicate.parse(url);
355
- this.data.image = url ? { url } : void 0;
356
- return this;
357
- }
358
- /**
359
- * Sets the thumbnail of this embed.
360
- *
361
- * @param url - The thumbnail URL to use
362
- */
363
- setThumbnail(url) {
364
- imageURLPredicate.parse(url);
365
- this.data.thumbnail = url ? { url } : void 0;
366
- return this;
367
- }
368
- /**
369
- * Sets the timestamp of this embed.
370
- *
371
- * @param timestamp - The timestamp or date to use
372
- */
373
- setTimestamp(timestamp = Date.now()) {
374
- timestampPredicate.parse(timestamp);
375
- this.data.timestamp = timestamp ? new Date(timestamp).toISOString() : void 0;
376
- return this;
377
- }
378
- /**
379
- * Sets the title for this embed.
380
- *
381
- * @param title - The title to use
382
- */
383
- setTitle(title) {
384
- titlePredicate.parse(title);
385
- this.data.title = title ?? void 0;
386
- return this;
387
- }
388
- /**
389
- * Sets the URL of this embed.
390
- *
391
- * @param url - The URL to use
392
- */
393
- setURL(url) {
394
- urlPredicate.parse(url);
395
- this.data.url = url ?? void 0;
396
- return this;
397
- }
398
- /**
399
- * Serializes this builder to API-compatible JSON data.
400
- *
401
- * @remarks
402
- * This method runs validations on the data before serializing it.
403
- * As such, it may throw an error if the data is invalid.
404
- */
405
- toJSON() {
406
- return { ...this.data };
407
- }
408
- };
409
-
410
- // src/index.ts
411
- __reExport(index_exports, require("@discordjs/formatters"), module.exports);
412
-
413
- // src/components/Assertions.ts
414
- var Assertions_exports2 = {};
415
- __export(Assertions_exports2, {
416
- buttonLabelValidator: () => buttonLabelValidator,
417
- buttonStyleValidator: () => buttonStyleValidator,
418
- channelTypesValidator: () => channelTypesValidator,
419
- customIdValidator: () => customIdValidator,
420
- defaultValidator: () => defaultValidator,
421
- disabledValidator: () => disabledValidator,
422
- emojiValidator: () => emojiValidator,
423
- idValidator: () => idValidator,
424
- jsonOptionValidator: () => jsonOptionValidator,
425
- labelValueDescriptionValidator: () => labelValueDescriptionValidator,
426
- minMaxValidator: () => minMaxValidator,
427
- optionValidator: () => optionValidator,
428
- optionsLengthValidator: () => optionsLengthValidator,
429
- optionsValidator: () => optionsValidator,
430
- placeholderValidator: () => placeholderValidator,
431
- urlValidator: () => urlValidator,
432
- validateRequiredButtonParameters: () => validateRequiredButtonParameters,
433
- validateRequiredSelectMenuOptionParameters: () => validateRequiredSelectMenuOptionParameters,
434
- validateRequiredSelectMenuParameters: () => validateRequiredSelectMenuParameters
435
- });
436
- var import_shapeshift2 = require("@sapphire/shapeshift");
437
- var import_v10 = require("discord-api-types/v10");
438
-
439
- // src/components/selectMenu/StringSelectMenuOption.ts
440
- var StringSelectMenuOptionBuilder = class {
441
- /**
442
- * Creates a new string select menu option from API data.
443
- *
444
- * @param data - The API data to create this string select menu option with
445
- * @example
446
- * Creating a string select menu option from an API data object:
447
- * ```ts
448
- * const selectMenuOption = new SelectMenuOptionBuilder({
449
- * label: 'catchy label',
450
- * value: '1',
451
- * });
452
- * ```
453
- * @example
454
- * Creating a string select menu option using setters and API data:
455
- * ```ts
456
- * const selectMenuOption = new SelectMenuOptionBuilder({
457
- * default: true,
458
- * value: '1',
459
- * })
460
- * .setLabel('woah');
461
- * ```
462
- */
463
- constructor(data = {}) {
464
- this.data = data;
465
- }
466
- static {
467
- __name(this, "StringSelectMenuOptionBuilder");
468
- }
469
- /**
470
- * Sets the label for this option.
471
- *
472
- * @param label - The label to use
473
- */
474
- setLabel(label) {
475
- this.data.label = labelValueDescriptionValidator.parse(label);
476
- return this;
477
- }
478
- /**
479
- * Sets the value for this option.
480
- *
481
- * @param value - The value to use
482
- */
483
- setValue(value) {
484
- this.data.value = labelValueDescriptionValidator.parse(value);
485
- return this;
486
- }
487
- /**
488
- * Sets the description for this option.
489
- *
490
- * @param description - The description to use
491
- */
492
- setDescription(description) {
493
- this.data.description = labelValueDescriptionValidator.parse(description);
494
- return this;
495
- }
496
- /**
497
- * Sets whether this option is selected by default.
498
- *
499
- * @param isDefault - Whether this option is selected by default
500
- */
501
- setDefault(isDefault = true) {
502
- this.data.default = defaultValidator.parse(isDefault);
503
- return this;
504
- }
505
- /**
506
- * Sets the emoji to display for this option.
507
- *
508
- * @param emoji - The emoji to use
509
- */
510
- setEmoji(emoji) {
511
- this.data.emoji = emojiValidator.parse(emoji);
512
- return this;
513
- }
514
- /**
515
- * {@inheritDoc BaseSelectMenuBuilder.toJSON}
516
- */
517
- toJSON() {
518
- validateRequiredSelectMenuOptionParameters(this.data.label, this.data.value);
519
- return {
520
- ...this.data
521
- };
522
- }
523
- };
524
-
525
- // src/components/Assertions.ts
526
- var idValidator = import_shapeshift2.s.number().safeInt().greaterThanOrEqual(1).lessThan(4294967296).setValidationEnabled(isValidationEnabled);
527
- var customIdValidator = import_shapeshift2.s.string().lengthGreaterThanOrEqual(1).lengthLessThanOrEqual(100).setValidationEnabled(isValidationEnabled);
528
- var emojiValidator = import_shapeshift2.s.object({
529
- id: import_shapeshift2.s.string(),
530
- name: import_shapeshift2.s.string(),
531
- animated: import_shapeshift2.s.boolean()
532
- }).partial().strict().setValidationEnabled(isValidationEnabled);
533
- var disabledValidator = import_shapeshift2.s.boolean();
534
- var buttonLabelValidator = import_shapeshift2.s.string().lengthGreaterThanOrEqual(1).lengthLessThanOrEqual(80).setValidationEnabled(isValidationEnabled);
535
- var buttonStyleValidator = import_shapeshift2.s.nativeEnum(import_v10.ButtonStyle);
536
- var placeholderValidator = import_shapeshift2.s.string().lengthLessThanOrEqual(150).setValidationEnabled(isValidationEnabled);
537
- var minMaxValidator = import_shapeshift2.s.number().int().greaterThanOrEqual(0).lessThanOrEqual(25).setValidationEnabled(isValidationEnabled);
538
- var labelValueDescriptionValidator = import_shapeshift2.s.string().lengthGreaterThanOrEqual(1).lengthLessThanOrEqual(100).setValidationEnabled(isValidationEnabled);
539
- var jsonOptionValidator = import_shapeshift2.s.object({
540
- label: labelValueDescriptionValidator,
541
- value: labelValueDescriptionValidator,
542
- description: labelValueDescriptionValidator.optional(),
543
- emoji: emojiValidator.optional(),
544
- default: import_shapeshift2.s.boolean().optional()
545
- }).setValidationEnabled(isValidationEnabled);
546
- var optionValidator = import_shapeshift2.s.instance(StringSelectMenuOptionBuilder).setValidationEnabled(isValidationEnabled);
547
- var optionsValidator = optionValidator.array().lengthGreaterThanOrEqual(0).setValidationEnabled(isValidationEnabled);
548
- var optionsLengthValidator = import_shapeshift2.s.number().int().greaterThanOrEqual(0).lessThanOrEqual(25).setValidationEnabled(isValidationEnabled);
549
- function validateRequiredSelectMenuParameters(options, customId) {
550
- customIdValidator.parse(customId);
551
- optionsValidator.parse(options);
552
- }
553
- __name(validateRequiredSelectMenuParameters, "validateRequiredSelectMenuParameters");
554
- var defaultValidator = import_shapeshift2.s.boolean();
555
- function validateRequiredSelectMenuOptionParameters(label, value) {
556
- labelValueDescriptionValidator.parse(label);
557
- labelValueDescriptionValidator.parse(value);
558
- }
559
- __name(validateRequiredSelectMenuOptionParameters, "validateRequiredSelectMenuOptionParameters");
560
- var channelTypesValidator = import_shapeshift2.s.nativeEnum(import_v10.ChannelType).array().setValidationEnabled(isValidationEnabled);
561
- var urlValidator = import_shapeshift2.s.string().url({
562
- allowedProtocols: ["http:", "https:", "discord:"]
563
- }).setValidationEnabled(isValidationEnabled);
564
- function validateRequiredButtonParameters(style, label, emoji, customId, skuId, url) {
565
- if (style === import_v10.ButtonStyle.Premium) {
566
- if (!skuId) {
567
- throw new RangeError("Premium buttons must have an SKU id.");
568
- }
569
- if (customId || label || url || emoji) {
570
- throw new RangeError("Premium buttons cannot have a custom id, label, URL, or emoji.");
571
- }
572
- } else {
573
- if (skuId) {
574
- throw new RangeError("Non-premium buttons must not have an SKU id.");
575
- }
576
- if (url && customId) {
577
- throw new RangeError("URL and custom id are mutually exclusive.");
578
- }
579
- if (!label && !emoji) {
580
- throw new RangeError("Non-premium buttons must have a label and/or an emoji.");
581
- }
582
- if (style === import_v10.ButtonStyle.Link) {
583
- if (!url) {
584
- throw new RangeError("Link buttons must have a URL.");
585
- }
586
- } else if (url) {
587
- throw new RangeError("Non-premium and non-link buttons cannot have a URL.");
588
- }
589
- }
590
- }
591
- __name(validateRequiredButtonParameters, "validateRequiredButtonParameters");
592
-
593
- // src/components/ActionRow.ts
594
- var import_v1024 = require("discord-api-types/v10");
595
-
596
- // src/components/Component.ts
597
- var ComponentBuilder = class {
598
- static {
599
- __name(this, "ComponentBuilder");
600
- }
601
- /**
602
- * The API data associated with this component.
603
- */
604
- data;
605
- /**
606
- * Constructs a new kind of component.
607
- *
608
- * @param data - The data to construct a component out of
609
- */
610
- constructor(data) {
611
- this.data = data;
612
- }
613
- /**
614
- * Sets the id (not the custom id) for this component.
615
- *
616
- * @param id - The id for this component
617
- */
618
- setId(id) {
619
- this.data.id = idValidator.parse(id);
620
- return this;
621
- }
622
- /**
623
- * Clears the id of this component, defaulting to a default incremented id.
624
- */
625
- clearId() {
626
- this.data.id = void 0;
627
- return this;
628
- }
629
- };
630
-
631
- // src/components/Components.ts
632
- var import_v1023 = require("discord-api-types/v10");
633
-
634
- // src/components/button/Button.ts
635
- var import_v102 = require("discord-api-types/v10");
636
- var ButtonBuilder = class extends ComponentBuilder {
637
- static {
638
- __name(this, "ButtonBuilder");
639
- }
640
- /**
641
- * Creates a new button from API data.
642
- *
643
- * @param data - The API data to create this button with
644
- * @example
645
- * Creating a button from an API data object:
646
- * ```ts
647
- * const button = new ButtonBuilder({
648
- * custom_id: 'a cool button',
649
- * style: ButtonStyle.Primary,
650
- * label: 'Click Me',
651
- * emoji: {
652
- * name: 'smile',
653
- * id: '123456789012345678',
654
- * },
655
- * });
656
- * ```
657
- * @example
658
- * Creating a button using setters and API data:
659
- * ```ts
660
- * const button = new ButtonBuilder({
661
- * style: ButtonStyle.Secondary,
662
- * label: 'Click Me',
663
- * })
664
- * .setEmoji({ name: '🙂' })
665
- * .setCustomId('another cool button');
666
- * ```
667
- */
668
- constructor(data) {
669
- super({ type: import_v102.ComponentType.Button, ...data });
670
- }
671
- /**
672
- * Sets the style of this button.
673
- *
674
- * @param style - The style to use
675
- */
676
- setStyle(style) {
677
- this.data.style = buttonStyleValidator.parse(style);
678
- return this;
679
- }
680
- /**
681
- * Sets the URL for this button.
682
- *
683
- * @remarks
684
- * This method is only available to buttons using the `Link` button style.
685
- * Only three types of URL schemes are currently supported: `https://`, `http://`, and `discord://`.
686
- * @param url - The URL to use
687
- */
688
- setURL(url) {
689
- this.data.url = urlValidator.parse(url);
690
- return this;
691
- }
692
- /**
693
- * Sets the custom id for this button.
694
- *
695
- * @remarks
696
- * This method is only applicable to buttons that are not using the `Link` button style.
697
- * @param customId - The custom id to use
698
- */
699
- setCustomId(customId) {
700
- this.data.custom_id = customIdValidator.parse(customId);
701
- return this;
702
- }
703
- /**
704
- * Sets the SKU id that represents a purchasable SKU for this button.
705
- *
706
- * @remarks Only available when using premium-style buttons.
707
- * @param skuId - The SKU id to use
708
- */
709
- setSKUId(skuId) {
710
- this.data.sku_id = skuId;
711
- return this;
712
- }
713
- /**
714
- * Sets the emoji to display on this button.
715
- *
716
- * @param emoji - The emoji to use
717
- */
718
- setEmoji(emoji) {
719
- this.data.emoji = emojiValidator.parse(emoji);
720
- return this;
721
- }
722
- /**
723
- * Sets whether this button is disabled.
724
- *
725
- * @param disabled - Whether to disable this button
726
- */
727
- setDisabled(disabled = true) {
728
- this.data.disabled = disabledValidator.parse(disabled);
729
- return this;
730
- }
731
- /**
732
- * Sets the label for this button.
733
- *
734
- * @param label - The label to use
735
- */
736
- setLabel(label) {
737
- this.data.label = buttonLabelValidator.parse(label);
738
- return this;
739
- }
740
- /**
741
- * {@inheritDoc ComponentBuilder.toJSON}
742
- */
743
- toJSON() {
744
- validateRequiredButtonParameters(
745
- this.data.style,
746
- this.data.label,
747
- this.data.emoji,
748
- this.data.custom_id,
749
- this.data.sku_id,
750
- this.data.url
751
- );
752
- return {
753
- ...this.data
754
- };
755
- }
756
- };
757
-
758
- // src/components/fileUpload/FileUpload.ts
759
- var import_v104 = require("discord-api-types/v10");
760
-
761
- // src/components/fileUpload/Assertions.ts
762
- var Assertions_exports3 = {};
763
- __export(Assertions_exports3, {
764
- fileUploadPredicate: () => fileUploadPredicate
765
- });
766
- var import_shapeshift3 = require("@sapphire/shapeshift");
767
- var import_v103 = require("discord-api-types/v10");
768
- var fileUploadPredicate = import_shapeshift3.s.object({
769
- type: import_shapeshift3.s.literal(import_v103.ComponentType.FileUpload),
770
- id: idValidator.optional(),
771
- custom_id: customIdValidator,
772
- min_values: import_shapeshift3.s.number().greaterThanOrEqual(0).lessThanOrEqual(10).optional(),
773
- max_values: import_shapeshift3.s.number().greaterThanOrEqual(1).lessThanOrEqual(10).optional(),
774
- required: import_shapeshift3.s.boolean().optional()
775
- });
776
-
777
- // src/components/fileUpload/FileUpload.ts
778
- var FileUploadBuilder = class extends ComponentBuilder {
779
- static {
780
- __name(this, "FileUploadBuilder");
781
- }
782
- /**
783
- * Creates a new file upload.
784
- *
785
- * @param data - The API data to create this file upload with
786
- * @example
787
- * Creating a file upload from an API data object:
788
- * ```ts
789
- * const fileUpload = new FileUploadBuilder({
790
- * custom_id: "file_upload",
791
- * min_values: 2,
792
- * max_values: 5,
793
- * });
794
- * ```
795
- * @example
796
- * Creating a file upload using setters and API data:
797
- * ```ts
798
- * const fileUpload = new FileUploadBuilder({
799
- * custom_id: "file_upload",
800
- * min_values: 2,
801
- * max_values: 5,
802
- * }).setRequired();
803
- * ```
804
- */
805
- constructor(data = {}) {
806
- super({ type: import_v104.ComponentType.FileUpload, ...data });
807
- }
808
- /**
809
- * Sets the custom id for this file upload.
810
- *
811
- * @param customId - The custom id to use
812
- */
813
- setCustomId(customId) {
814
- this.data.custom_id = customId;
815
- return this;
816
- }
817
- /**
818
- * Sets the minimum number of file uploads required.
819
- *
820
- * @param minValues - The minimum values that must be uploaded
821
- */
822
- setMinValues(minValues) {
823
- this.data.min_values = minValues;
824
- return this;
825
- }
826
- /**
827
- * Clears the minimum values.
828
- */
829
- clearMinValues() {
830
- this.data.min_values = void 0;
831
- return this;
832
- }
833
- /**
834
- * Sets the maximum number of file uploads required.
835
- *
836
- * @param maxValues - The maximum values that can be uploaded
837
- */
838
- setMaxValues(maxValues) {
839
- this.data.max_values = maxValues;
840
- return this;
841
- }
842
- /**
843
- * Clears the maximum values.
844
- */
845
- clearMaxValues() {
846
- this.data.max_values = void 0;
847
- return this;
848
- }
849
- /**
850
- * Sets whether this file upload is required.
851
- *
852
- * @param required - Whether this file upload is required
853
- */
854
- setRequired(required = true) {
855
- this.data.required = required;
856
- return this;
857
- }
858
- /**
859
- * {@inheritDoc ComponentBuilder.toJSON}
860
- */
861
- toJSON() {
862
- fileUploadPredicate.parse(this.data);
863
- return this.data;
864
- }
865
- };
866
-
867
- // src/components/label/Label.ts
868
- var import_v1014 = require("discord-api-types/v10");
869
-
870
- // src/components/selectMenu/ChannelSelectMenu.ts
871
- var import_v106 = require("discord-api-types/v10");
872
-
873
- // src/components/textInput/Assertions.ts
874
- var Assertions_exports4 = {};
875
- __export(Assertions_exports4, {
876
- labelValidator: () => labelValidator,
877
- maxLengthValidator: () => maxLengthValidator,
878
- minLengthValidator: () => minLengthValidator,
879
- placeholderValidator: () => placeholderValidator2,
880
- requiredValidator: () => requiredValidator,
881
- textInputPredicate: () => textInputPredicate,
882
- textInputStyleValidator: () => textInputStyleValidator,
883
- validateRequiredParameters: () => validateRequiredParameters,
884
- valueValidator: () => valueValidator
885
- });
886
- var import_shapeshift4 = require("@sapphire/shapeshift");
887
- var import_v105 = require("discord-api-types/v10");
888
- var textInputStyleValidator = import_shapeshift4.s.nativeEnum(import_v105.TextInputStyle).setValidationEnabled(isValidationEnabled);
889
- var minLengthValidator = import_shapeshift4.s.number().int().greaterThanOrEqual(0).lessThanOrEqual(4e3).setValidationEnabled(isValidationEnabled);
890
- var maxLengthValidator = import_shapeshift4.s.number().int().greaterThanOrEqual(1).lessThanOrEqual(4e3).setValidationEnabled(isValidationEnabled);
891
- var requiredValidator = import_shapeshift4.s.boolean().setValidationEnabled(isValidationEnabled);
892
- var valueValidator = import_shapeshift4.s.string().lengthLessThanOrEqual(4e3).setValidationEnabled(isValidationEnabled);
893
- var placeholderValidator2 = import_shapeshift4.s.string().lengthLessThanOrEqual(100).setValidationEnabled(isValidationEnabled);
894
- var labelValidator = import_shapeshift4.s.string().lengthGreaterThanOrEqual(1).lengthLessThanOrEqual(45).setValidationEnabled(isValidationEnabled);
895
- var textInputPredicate = import_shapeshift4.s.object({
896
- type: import_shapeshift4.s.literal(import_v105.ComponentType.TextInput),
897
- custom_id: customIdValidator,
898
- style: textInputStyleValidator,
899
- id: idValidator.optional(),
900
- min_length: minLengthValidator.optional(),
901
- max_length: maxLengthValidator.optional(),
902
- placeholder: placeholderValidator2.optional(),
903
- value: valueValidator.optional(),
904
- required: requiredValidator.optional()
905
- }).setValidationEnabled(isValidationEnabled);
906
- function validateRequiredParameters(customId, style) {
907
- customIdValidator.parse(customId);
908
- textInputStyleValidator.parse(style);
909
- }
910
- __name(validateRequiredParameters, "validateRequiredParameters");
911
-
912
- // src/components/selectMenu/BaseSelectMenu.ts
913
- var BaseSelectMenuBuilder = class extends ComponentBuilder {
914
- static {
915
- __name(this, "BaseSelectMenuBuilder");
916
- }
917
- /**
918
- * Sets the placeholder for this select menu.
919
- *
920
- * @param placeholder - The placeholder to use
921
- */
922
- setPlaceholder(placeholder) {
923
- this.data.placeholder = placeholderValidator.parse(placeholder);
924
- return this;
925
- }
926
- /**
927
- * Sets the minimum values that must be selected in the select menu.
928
- *
929
- * @param minValues - The minimum values that must be selected
930
- */
931
- setMinValues(minValues) {
932
- this.data.min_values = minMaxValidator.parse(minValues);
933
- return this;
934
- }
935
- /**
936
- * Sets the maximum values that can be selected in the select menu.
937
- *
938
- * @param maxValues - The maximum values that can be selected
939
- */
940
- setMaxValues(maxValues) {
941
- this.data.max_values = minMaxValidator.parse(maxValues);
942
- return this;
943
- }
944
- /**
945
- * Sets the custom id for this select menu.
946
- *
947
- * @param customId - The custom id to use
948
- */
949
- setCustomId(customId) {
950
- this.data.custom_id = customIdValidator.parse(customId);
951
- return this;
952
- }
953
- /**
954
- * Sets whether this select menu is disabled.
955
- *
956
- * @param disabled - Whether this select menu is disabled
957
- */
958
- setDisabled(disabled = true) {
959
- this.data.disabled = disabledValidator.parse(disabled);
960
- return this;
961
- }
962
- /**
963
- * Sets whether this select menu is required.
964
- *
965
- * @remarks Only for use in modals.
966
- * @param required - Whether this select menu is required
967
- */
968
- setRequired(required = true) {
969
- this.data.required = requiredValidator.parse(required);
970
- return this;
971
- }
972
- /**
973
- * {@inheritDoc ComponentBuilder.toJSON}
974
- */
975
- toJSON() {
976
- customIdValidator.parse(this.data.custom_id);
977
- return {
978
- ...this.data
979
- };
980
- }
981
- };
982
-
983
- // src/components/selectMenu/ChannelSelectMenu.ts
984
- var ChannelSelectMenuBuilder = class extends BaseSelectMenuBuilder {
985
- static {
986
- __name(this, "ChannelSelectMenuBuilder");
987
- }
988
- /**
989
- * Creates a new select menu from API data.
990
- *
991
- * @param data - The API data to create this select menu with
992
- * @example
993
- * Creating a select menu from an API data object:
994
- * ```ts
995
- * const selectMenu = new ChannelSelectMenuBuilder({
996
- * custom_id: 'a cool select menu',
997
- * placeholder: 'select an option',
998
- * max_values: 2,
999
- * });
1000
- * ```
1001
- * @example
1002
- * Creating a select menu using setters and API data:
1003
- * ```ts
1004
- * const selectMenu = new ChannelSelectMenuBuilder({
1005
- * custom_id: 'a cool select menu',
1006
- * })
1007
- * .addChannelTypes(ChannelType.GuildText, ChannelType.GuildAnnouncement)
1008
- * .setMinValues(2);
1009
- * ```
1010
- */
1011
- constructor(data) {
1012
- super({ ...data, type: import_v106.ComponentType.ChannelSelect });
1013
- }
1014
- /**
1015
- * Adds channel types to this select menu.
1016
- *
1017
- * @param types - The channel types to use
1018
- */
1019
- addChannelTypes(...types) {
1020
- const normalizedTypes = normalizeArray(types);
1021
- this.data.channel_types ??= [];
1022
- this.data.channel_types.push(...channelTypesValidator.parse(normalizedTypes));
1023
- return this;
1024
- }
1025
- /**
1026
- * Sets channel types for this select menu.
1027
- *
1028
- * @param types - The channel types to use
1029
- */
1030
- setChannelTypes(...types) {
1031
- const normalizedTypes = normalizeArray(types);
1032
- this.data.channel_types ??= [];
1033
- this.data.channel_types.splice(0, this.data.channel_types.length, ...channelTypesValidator.parse(normalizedTypes));
1034
- return this;
1035
- }
1036
- /**
1037
- * Adds default channels to this auto populated select menu.
1038
- *
1039
- * @param channels - The channels to add
1040
- */
1041
- addDefaultChannels(...channels) {
1042
- const normalizedValues = normalizeArray(channels);
1043
- optionsLengthValidator.parse((this.data.default_values?.length ?? 0) + normalizedValues.length);
1044
- this.data.default_values ??= [];
1045
- this.data.default_values.push(
1046
- ...normalizedValues.map((id) => ({
1047
- id,
1048
- type: import_v106.SelectMenuDefaultValueType.Channel
1049
- }))
1050
- );
1051
- return this;
1052
- }
1053
- /**
1054
- * Sets default channels for this auto populated select menu.
1055
- *
1056
- * @param channels - The channels to set
1057
- */
1058
- setDefaultChannels(...channels) {
1059
- const normalizedValues = normalizeArray(channels);
1060
- optionsLengthValidator.parse(normalizedValues.length);
1061
- this.data.default_values = normalizedValues.map((id) => ({
1062
- id,
1063
- type: import_v106.SelectMenuDefaultValueType.Channel
1064
- }));
1065
- return this;
1066
- }
1067
- /**
1068
- * {@inheritDoc BaseSelectMenuBuilder.toJSON}
1069
- */
1070
- toJSON() {
1071
- customIdValidator.parse(this.data.custom_id);
1072
- return {
1073
- ...this.data
1074
- };
1075
- }
1076
- };
1077
-
1078
- // src/components/selectMenu/MentionableSelectMenu.ts
1079
- var import_v107 = require("discord-api-types/v10");
1080
- var MentionableSelectMenuBuilder = class extends BaseSelectMenuBuilder {
1081
- static {
1082
- __name(this, "MentionableSelectMenuBuilder");
1083
- }
1084
- /**
1085
- * Creates a new select menu from API data.
1086
- *
1087
- * @param data - The API data to create this select menu with
1088
- * @example
1089
- * Creating a select menu from an API data object:
1090
- * ```ts
1091
- * const selectMenu = new MentionableSelectMenuBuilder({
1092
- * custom_id: 'a cool select menu',
1093
- * placeholder: 'select an option',
1094
- * max_values: 2,
1095
- * });
1096
- * ```
1097
- * @example
1098
- * Creating a select menu using setters and API data:
1099
- * ```ts
1100
- * const selectMenu = new MentionableSelectMenuBuilder({
1101
- * custom_id: 'a cool select menu',
1102
- * })
1103
- * .setMinValues(1);
1104
- * ```
1105
- */
1106
- constructor(data) {
1107
- super({ ...data, type: import_v107.ComponentType.MentionableSelect });
1108
- }
1109
- /**
1110
- * Adds default roles to this auto populated select menu.
1111
- *
1112
- * @param roles - The roles to add
1113
- */
1114
- addDefaultRoles(...roles) {
1115
- const normalizedValues = normalizeArray(roles);
1116
- optionsLengthValidator.parse((this.data.default_values?.length ?? 0) + normalizedValues.length);
1117
- this.data.default_values ??= [];
1118
- this.data.default_values.push(
1119
- ...normalizedValues.map((id) => ({
1120
- id,
1121
- type: import_v107.SelectMenuDefaultValueType.Role
1122
- }))
1123
- );
1124
- return this;
1125
- }
1126
- /**
1127
- * Adds default users to this auto populated select menu.
1128
- *
1129
- * @param users - The users to add
1130
- */
1131
- addDefaultUsers(...users) {
1132
- const normalizedValues = normalizeArray(users);
1133
- optionsLengthValidator.parse((this.data.default_values?.length ?? 0) + normalizedValues.length);
1134
- this.data.default_values ??= [];
1135
- this.data.default_values.push(
1136
- ...normalizedValues.map((id) => ({
1137
- id,
1138
- type: import_v107.SelectMenuDefaultValueType.User
1139
- }))
1140
- );
1141
- return this;
1142
- }
1143
- /**
1144
- * Adds default values to this auto populated select menu.
1145
- *
1146
- * @param values - The values to add
1147
- */
1148
- addDefaultValues(...values) {
1149
- const normalizedValues = normalizeArray(values);
1150
- optionsLengthValidator.parse((this.data.default_values?.length ?? 0) + normalizedValues.length);
1151
- this.data.default_values ??= [];
1152
- this.data.default_values.push(...normalizedValues);
1153
- return this;
1154
- }
1155
- /**
1156
- * Sets default values for this auto populated select menu.
1157
- *
1158
- * @param values - The values to set
1159
- */
1160
- setDefaultValues(...values) {
1161
- const normalizedValues = normalizeArray(values);
1162
- optionsLengthValidator.parse(normalizedValues.length);
1163
- this.data.default_values = normalizedValues;
1164
- return this;
1165
- }
1166
- };
1167
-
1168
- // src/components/selectMenu/RoleSelectMenu.ts
1169
- var import_v108 = require("discord-api-types/v10");
1170
- var RoleSelectMenuBuilder = class extends BaseSelectMenuBuilder {
1171
- static {
1172
- __name(this, "RoleSelectMenuBuilder");
1173
- }
1174
- /**
1175
- * Creates a new select menu from API data.
1176
- *
1177
- * @param data - The API data to create this select menu with
1178
- * @example
1179
- * Creating a select menu from an API data object:
1180
- * ```ts
1181
- * const selectMenu = new RoleSelectMenuBuilder({
1182
- * custom_id: 'a cool select menu',
1183
- * placeholder: 'select an option',
1184
- * max_values: 2,
1185
- * });
1186
- * ```
1187
- * @example
1188
- * Creating a select menu using setters and API data:
1189
- * ```ts
1190
- * const selectMenu = new RoleSelectMenuBuilder({
1191
- * custom_id: 'a cool select menu',
1192
- * })
1193
- * .setMinValues(1);
1194
- * ```
1195
- */
1196
- constructor(data) {
1197
- super({ ...data, type: import_v108.ComponentType.RoleSelect });
1198
- }
1199
- /**
1200
- * Adds default roles to this auto populated select menu.
1201
- *
1202
- * @param roles - The roles to add
1203
- */
1204
- addDefaultRoles(...roles) {
1205
- const normalizedValues = normalizeArray(roles);
1206
- optionsLengthValidator.parse((this.data.default_values?.length ?? 0) + normalizedValues.length);
1207
- this.data.default_values ??= [];
1208
- this.data.default_values.push(
1209
- ...normalizedValues.map((id) => ({
1210
- id,
1211
- type: import_v108.SelectMenuDefaultValueType.Role
1212
- }))
1213
- );
1214
- return this;
1215
- }
1216
- /**
1217
- * Sets default roles for this auto populated select menu.
1218
- *
1219
- * @param roles - The roles to set
1220
- */
1221
- setDefaultRoles(...roles) {
1222
- const normalizedValues = normalizeArray(roles);
1223
- optionsLengthValidator.parse(normalizedValues.length);
1224
- this.data.default_values = normalizedValues.map((id) => ({
1225
- id,
1226
- type: import_v108.SelectMenuDefaultValueType.Role
1227
- }));
1228
- return this;
1229
- }
1230
- };
1231
-
1232
- // src/components/selectMenu/StringSelectMenu.ts
1233
- var import_v1010 = require("discord-api-types/v10");
1234
-
1235
- // src/components/selectMenu/Assertions.ts
1236
- var Assertions_exports5 = {};
1237
- __export(Assertions_exports5, {
1238
- selectMenuChannelPredicate: () => selectMenuChannelPredicate,
1239
- selectMenuMentionablePredicate: () => selectMenuMentionablePredicate,
1240
- selectMenuRolePredicate: () => selectMenuRolePredicate,
1241
- selectMenuStringOptionPredicate: () => selectMenuStringOptionPredicate,
1242
- selectMenuStringPredicate: () => selectMenuStringPredicate,
1243
- selectMenuUserPredicate: () => selectMenuUserPredicate
1244
- });
1245
- var import_shapeshift5 = require("@sapphire/shapeshift");
1246
- var import_v109 = require("discord-api-types/v10");
1247
- var selectMenuBasePredicate = import_shapeshift5.s.object({
1248
- id: idValidator.optional(),
1249
- placeholder: import_shapeshift5.s.string().lengthLessThanOrEqual(150).optional(),
1250
- min_values: import_shapeshift5.s.number().greaterThanOrEqual(0).lessThanOrEqual(25).optional(),
1251
- max_values: import_shapeshift5.s.number().greaterThanOrEqual(0).lessThanOrEqual(25).optional(),
1252
- custom_id: customIdValidator,
1253
- disabled: import_shapeshift5.s.boolean().optional()
1254
- });
1255
- var selectMenuChannelPredicate = selectMenuBasePredicate.extend({
1256
- type: import_shapeshift5.s.literal(import_v109.ComponentType.ChannelSelect),
1257
- channel_types: import_shapeshift5.s.nativeEnum(import_v109.ChannelType).array().optional(),
1258
- default_values: import_shapeshift5.s.object({ id: import_shapeshift5.s.string(), type: import_shapeshift5.s.literal(import_v109.SelectMenuDefaultValueType.Channel) }).array().lengthLessThanOrEqual(25).optional()
1259
- }).setValidationEnabled(isValidationEnabled);
1260
- var selectMenuMentionablePredicate = selectMenuBasePredicate.extend({
1261
- type: import_shapeshift5.s.literal(import_v109.ComponentType.MentionableSelect),
1262
- default_values: import_shapeshift5.s.object({
1263
- id: import_shapeshift5.s.string(),
1264
- type: import_shapeshift5.s.union([import_shapeshift5.s.literal(import_v109.SelectMenuDefaultValueType.Role), import_shapeshift5.s.literal(import_v109.SelectMenuDefaultValueType.User)])
1265
- }).array().lengthLessThanOrEqual(25).optional()
1266
- }).setValidationEnabled(isValidationEnabled);
1267
- var selectMenuRolePredicate = selectMenuBasePredicate.extend({
1268
- type: import_shapeshift5.s.literal(import_v109.ComponentType.RoleSelect),
1269
- default_values: import_shapeshift5.s.object({ id: import_shapeshift5.s.string(), type: import_shapeshift5.s.literal(import_v109.SelectMenuDefaultValueType.Role) }).array().lengthLessThanOrEqual(25).optional()
1270
- }).setValidationEnabled(isValidationEnabled);
1271
- var selectMenuUserPredicate = selectMenuBasePredicate.extend({
1272
- type: import_shapeshift5.s.literal(import_v109.ComponentType.UserSelect),
1273
- default_values: import_shapeshift5.s.object({ id: import_shapeshift5.s.string(), type: import_shapeshift5.s.literal(import_v109.SelectMenuDefaultValueType.User) }).array().lengthLessThanOrEqual(25).optional()
1274
- }).setValidationEnabled(isValidationEnabled);
1275
- var selectMenuStringOptionPredicate = import_shapeshift5.s.object({
1276
- label: import_shapeshift5.s.string().lengthGreaterThanOrEqual(1).lengthLessThanOrEqual(100),
1277
- value: import_shapeshift5.s.string().lengthGreaterThanOrEqual(1).lengthLessThanOrEqual(100),
1278
- description: import_shapeshift5.s.string().lengthGreaterThanOrEqual(1).lengthLessThanOrEqual(100).optional(),
1279
- emoji: emojiValidator.optional(),
1280
- default: import_shapeshift5.s.boolean().optional()
1281
- }).setValidationEnabled(isValidationEnabled);
1282
- var selectMenuStringPredicate = selectMenuBasePredicate.extend({
1283
- type: import_shapeshift5.s.literal(import_v109.ComponentType.StringSelect),
1284
- options: selectMenuStringOptionPredicate.array().lengthGreaterThanOrEqual(1).lengthLessThanOrEqual(25)
1285
- }).reshape((value) => {
1286
- if (value.min_values !== void 0 && value.options.length < value.min_values) {
1287
- return import_shapeshift5.Result.err(new RangeError(`The number of options must be greater than or equal to min_values`));
1288
- }
1289
- if (value.min_values !== void 0 && value.max_values !== void 0 && value.min_values > value.max_values) {
1290
- return import_shapeshift5.Result.err(
1291
- new RangeError(`The maximum amount of options must be greater than or equal to the minimum amount of options`)
1292
- );
1293
- }
1294
- return import_shapeshift5.Result.ok(value);
1295
- }).setValidationEnabled(isValidationEnabled);
1296
-
1297
- // src/components/selectMenu/StringSelectMenu.ts
1298
- var StringSelectMenuBuilder = class extends BaseSelectMenuBuilder {
1299
- static {
1300
- __name(this, "StringSelectMenuBuilder");
1301
- }
1302
- /**
1303
- * The options within this select menu.
1304
- */
1305
- options;
1306
- /**
1307
- * Creates a new select menu from API data.
1308
- *
1309
- * @param data - The API data to create this select menu with
1310
- * @example
1311
- * Creating a select menu from an API data object:
1312
- * ```ts
1313
- * const selectMenu = new StringSelectMenuBuilder({
1314
- * custom_id: 'a cool select menu',
1315
- * placeholder: 'select an option',
1316
- * max_values: 2,
1317
- * options: [
1318
- * { label: 'option 1', value: '1' },
1319
- * { label: 'option 2', value: '2' },
1320
- * { label: 'option 3', value: '3' },
1321
- * ],
1322
- * });
1323
- * ```
1324
- * @example
1325
- * Creating a select menu using setters and API data:
1326
- * ```ts
1327
- * const selectMenu = new StringSelectMenuBuilder({
1328
- * custom_id: 'a cool select menu',
1329
- * })
1330
- * .setMinValues(1)
1331
- * .addOptions({
1332
- * label: 'Catchy',
1333
- * value: 'catch',
1334
- * });
1335
- * ```
1336
- */
1337
- constructor(data) {
1338
- const { options, ...initData } = data ?? {};
1339
- super({ ...initData, type: import_v1010.ComponentType.StringSelect });
1340
- this.options = options?.map((option) => new StringSelectMenuOptionBuilder(option)) ?? [];
1341
- }
1342
- /**
1343
- * Adds options to this select menu.
1344
- *
1345
- * @param options - The options to add
1346
- */
1347
- addOptions(...options) {
1348
- const normalizedOptions = normalizeArray(options);
1349
- optionsLengthValidator.parse(this.options.length + normalizedOptions.length);
1350
- this.options.push(
1351
- ...normalizedOptions.map(
1352
- (normalizedOption) => normalizedOption instanceof StringSelectMenuOptionBuilder ? normalizedOption : new StringSelectMenuOptionBuilder(selectMenuStringOptionPredicate.parse(normalizedOption))
1353
- )
1354
- );
1355
- return this;
1356
- }
1357
- /**
1358
- * Sets the options for this select menu.
1359
- *
1360
- * @param options - The options to set
1361
- */
1362
- setOptions(...options) {
1363
- return this.spliceOptions(0, this.options.length, ...options);
1364
- }
1365
- /**
1366
- * Removes, replaces, or inserts options for this select menu.
1367
- *
1368
- * @remarks
1369
- * This method behaves similarly
1370
- * to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/slice | Array.prototype.splice()}.
1371
- * It's useful for modifying and adjusting the order of existing options.
1372
- * @example
1373
- * Remove the first option:
1374
- * ```ts
1375
- * selectMenu.spliceOptions(0, 1);
1376
- * ```
1377
- * @example
1378
- * Remove the first n option:
1379
- * ```ts
1380
- * const n = 4;
1381
- * selectMenu.spliceOptions(0, n);
1382
- * ```
1383
- * @example
1384
- * Remove the last option:
1385
- * ```ts
1386
- * selectMenu.spliceOptions(-1, 1);
1387
- * ```
1388
- * @param index - The index to start at
1389
- * @param deleteCount - The number of options to remove
1390
- * @param options - The replacing option objects or builders
1391
- */
1392
- spliceOptions(index, deleteCount, ...options) {
1393
- const normalizedOptions = normalizeArray(options);
1394
- const clone = [...this.options];
1395
- clone.splice(
1396
- index,
1397
- deleteCount,
1398
- ...normalizedOptions.map(
1399
- (normalizedOption) => normalizedOption instanceof StringSelectMenuOptionBuilder ? normalizedOption : new StringSelectMenuOptionBuilder(selectMenuStringOptionPredicate.parse(normalizedOption))
1400
- )
1401
- );
1402
- optionsLengthValidator.parse(clone.length);
1403
- this.options.splice(0, this.options.length, ...clone);
1404
- return this;
1405
- }
1406
- /**
1407
- * {@inheritDoc BaseSelectMenuBuilder.toJSON}
1408
- */
1409
- toJSON() {
1410
- validateRequiredSelectMenuParameters(this.options, this.data.custom_id);
1411
- return {
1412
- ...this.data,
1413
- options: this.options.map((option) => option.toJSON())
1414
- };
1415
- }
1416
- };
1417
-
1418
- // src/components/selectMenu/UserSelectMenu.ts
1419
- var import_v1011 = require("discord-api-types/v10");
1420
- var UserSelectMenuBuilder = class extends BaseSelectMenuBuilder {
1421
- static {
1422
- __name(this, "UserSelectMenuBuilder");
1423
- }
1424
- /**
1425
- * Creates a new select menu from API data.
1426
- *
1427
- * @param data - The API data to create this select menu with
1428
- * @example
1429
- * Creating a select menu from an API data object:
1430
- * ```ts
1431
- * const selectMenu = new UserSelectMenuBuilder({
1432
- * custom_id: 'a cool select menu',
1433
- * placeholder: 'select an option',
1434
- * max_values: 2,
1435
- * });
1436
- * ```
1437
- * @example
1438
- * Creating a select menu using setters and API data:
1439
- * ```ts
1440
- * const selectMenu = new UserSelectMenuBuilder({
1441
- * custom_id: 'a cool select menu',
1442
- * })
1443
- * .setMinValues(1);
1444
- * ```
1445
- */
1446
- constructor(data) {
1447
- super({ ...data, type: import_v1011.ComponentType.UserSelect });
1448
- }
1449
- /**
1450
- * Adds default users to this auto populated select menu.
1451
- *
1452
- * @param users - The users to add
1453
- */
1454
- addDefaultUsers(...users) {
1455
- const normalizedValues = normalizeArray(users);
1456
- optionsLengthValidator.parse((this.data.default_values?.length ?? 0) + normalizedValues.length);
1457
- this.data.default_values ??= [];
1458
- this.data.default_values.push(
1459
- ...normalizedValues.map((id) => ({
1460
- id,
1461
- type: import_v1011.SelectMenuDefaultValueType.User
1462
- }))
1463
- );
1464
- return this;
1465
- }
1466
- /**
1467
- * Sets default users for this auto populated select menu.
1468
- *
1469
- * @param users - The users to set
1470
- */
1471
- setDefaultUsers(...users) {
1472
- const normalizedValues = normalizeArray(users);
1473
- optionsLengthValidator.parse(normalizedValues.length);
1474
- this.data.default_values = normalizedValues.map((id) => ({
1475
- id,
1476
- type: import_v1011.SelectMenuDefaultValueType.User
1477
- }));
1478
- return this;
1479
- }
1480
- };
1481
-
1482
- // src/components/textInput/TextInput.ts
1483
- var import_util = require("@discordjs/util");
1484
- var import_v1012 = require("discord-api-types/v10");
1485
- var import_fast_deep_equal = __toESM(require("fast-deep-equal"));
1486
- var TextInputBuilder = class extends ComponentBuilder {
1487
- static {
1488
- __name(this, "TextInputBuilder");
1489
- }
1490
- /**
1491
- * Creates a new text input from API data.
1492
- *
1493
- * @param data - The API data to create this text input with
1494
- * @example
1495
- * Creating a text input from an API data object:
1496
- * ```ts
1497
- * const textInput = new TextInputBuilder({
1498
- * custom_id: 'a cool text input',
1499
- * placeholder: 'Type something',
1500
- * style: TextInputStyle.Short,
1501
- * });
1502
- * ```
1503
- * @example
1504
- * Creating a text input using setters and API data:
1505
- * ```ts
1506
- * const textInput = new TextInputBuilder({
1507
- * placeholder: 'Type something else',
1508
- * })
1509
- * .setCustomId('woah')
1510
- * .setStyle(TextInputStyle.Paragraph);
1511
- * ```
1512
- */
1513
- constructor(data) {
1514
- super({ type: import_v1012.ComponentType.TextInput, ...data });
1515
- }
1516
- /**
1517
- * Sets the custom id for this text input.
1518
- *
1519
- * @param customId - The custom id to use
1520
- */
1521
- setCustomId(customId) {
1522
- this.data.custom_id = customIdValidator.parse(customId);
1523
- return this;
1524
- }
1525
- /**
1526
- * Sets the label for this text input.
1527
- *
1528
- * @param label - The label to use
1529
- * @deprecated Use a label builder to create a label (and optionally a description) instead.
1530
- */
1531
- setLabel(label) {
1532
- this.data.label = labelValidator.parse(label);
1533
- return this;
1534
- }
1535
- /**
1536
- * Sets the style for this text input.
1537
- *
1538
- * @param style - The style to use
1539
- */
1540
- setStyle(style) {
1541
- this.data.style = textInputStyleValidator.parse(style);
1542
- return this;
1543
- }
1544
- /**
1545
- * Sets the minimum length of text for this text input.
1546
- *
1547
- * @param minLength - The minimum length of text for this text input
1548
- */
1549
- setMinLength(minLength) {
1550
- this.data.min_length = minLengthValidator.parse(minLength);
1551
- return this;
1552
- }
1553
- /**
1554
- * Sets the maximum length of text for this text input.
1555
- *
1556
- * @param maxLength - The maximum length of text for this text input
1557
- */
1558
- setMaxLength(maxLength) {
1559
- this.data.max_length = maxLengthValidator.parse(maxLength);
1560
- return this;
1561
- }
1562
- /**
1563
- * Sets the placeholder for this text input.
1564
- *
1565
- * @param placeholder - The placeholder to use
1566
- */
1567
- setPlaceholder(placeholder) {
1568
- this.data.placeholder = placeholderValidator2.parse(placeholder);
1569
- return this;
1570
- }
1571
- /**
1572
- * Sets the value for this text input.
1573
- *
1574
- * @param value - The value to use
1575
- */
1576
- setValue(value) {
1577
- this.data.value = valueValidator.parse(value);
1578
- return this;
1579
- }
1580
- /**
1581
- * Sets whether this text input is required.
1582
- *
1583
- * @param required - Whether this text input is required
1584
- */
1585
- setRequired(required = true) {
1586
- this.data.required = requiredValidator.parse(required);
1587
- return this;
1588
- }
1589
- /**
1590
- * {@inheritDoc ComponentBuilder.toJSON}
1591
- */
1592
- toJSON() {
1593
- validateRequiredParameters(this.data.custom_id, this.data.style);
1594
- return {
1595
- ...this.data
1596
- };
1597
- }
1598
- /**
1599
- * Whether this is equal to another structure.
1600
- */
1601
- equals(other) {
1602
- if ((0, import_util.isJSONEncodable)(other)) {
1603
- return (0, import_fast_deep_equal.default)(other.toJSON(), this.data);
1604
- }
1605
- return (0, import_fast_deep_equal.default)(other, this.data);
1606
- }
1607
- };
1608
-
1609
- // src/components/label/Assertions.ts
1610
- var Assertions_exports6 = {};
1611
- __export(Assertions_exports6, {
1612
- labelPredicate: () => labelPredicate
1613
- });
1614
- var import_shapeshift6 = require("@sapphire/shapeshift");
1615
- var import_v1013 = require("discord-api-types/v10");
1616
- var labelPredicate = import_shapeshift6.s.object({
1617
- id: idValidator.optional(),
1618
- type: import_shapeshift6.s.literal(import_v1013.ComponentType.Label),
1619
- label: import_shapeshift6.s.string().lengthGreaterThanOrEqual(1).lengthLessThanOrEqual(45),
1620
- description: import_shapeshift6.s.string().lengthGreaterThanOrEqual(1).lengthLessThanOrEqual(100).optional(),
1621
- component: import_shapeshift6.s.union([
1622
- textInputPredicate,
1623
- selectMenuUserPredicate,
1624
- selectMenuRolePredicate,
1625
- selectMenuMentionablePredicate,
1626
- selectMenuChannelPredicate,
1627
- selectMenuStringPredicate,
1628
- fileUploadPredicate
1629
- ])
1630
- }).setValidationEnabled(isValidationEnabled);
1631
-
1632
- // src/components/label/Label.ts
1633
- var LabelBuilder = class extends ComponentBuilder {
1634
- static {
1635
- __name(this, "LabelBuilder");
1636
- }
1637
- /**
1638
- * @internal
1639
- */
1640
- data;
1641
- /**
1642
- * Creates a new label.
1643
- *
1644
- * @param data - The API data to create this label with
1645
- * @example
1646
- * Creating a label from an API data object:
1647
- * ```ts
1648
- * const label = new LabelBuilder({
1649
- * label: "label",
1650
- * component,
1651
- * });
1652
- * ```
1653
- * @example
1654
- * Creating a label using setters and API data:
1655
- * ```ts
1656
- * const label = new LabelBuilder({
1657
- * label: 'label',
1658
- * component,
1659
- * }).setLabel('new text');
1660
- * ```
1661
- */
1662
- constructor(data = {}) {
1663
- super({ type: import_v1014.ComponentType.Label });
1664
- const { component, ...rest } = data;
1665
- this.data = {
1666
- ...rest,
1667
- component: component ? createComponentBuilder(component) : void 0,
1668
- type: import_v1014.ComponentType.Label
1669
- };
1670
- }
1671
- /**
1672
- * Sets the label for this label.
1673
- *
1674
- * @param label - The label to use
1675
- */
1676
- setLabel(label) {
1677
- this.data.label = label;
1678
- return this;
1679
- }
1680
- /**
1681
- * Sets the description for this label.
1682
- *
1683
- * @param description - The description to use
1684
- */
1685
- setDescription(description) {
1686
- this.data.description = description;
1687
- return this;
1688
- }
1689
- /**
1690
- * Clears the description for this label.
1691
- */
1692
- clearDescription() {
1693
- this.data.description = void 0;
1694
- return this;
1695
- }
1696
- /**
1697
- * Sets a string select menu component to this label.
1698
- *
1699
- * @param input - A function that returns a component builder or an already built builder
1700
- */
1701
- setStringSelectMenuComponent(input) {
1702
- this.data.component = resolveBuilder(input, StringSelectMenuBuilder);
1703
- return this;
1704
- }
1705
- /**
1706
- * Sets a user select menu component to this label.
1707
- *
1708
- * @param input - A function that returns a component builder or an already built builder
1709
- */
1710
- setUserSelectMenuComponent(input) {
1711
- this.data.component = resolveBuilder(input, UserSelectMenuBuilder);
1712
- return this;
1713
- }
1714
- /**
1715
- * Sets a role select menu component to this label.
1716
- *
1717
- * @param input - A function that returns a component builder or an already built builder
1718
- */
1719
- setRoleSelectMenuComponent(input) {
1720
- this.data.component = resolveBuilder(input, RoleSelectMenuBuilder);
1721
- return this;
1722
- }
1723
- /**
1724
- * Sets a mentionable select menu component to this label.
1725
- *
1726
- * @param input - A function that returns a component builder or an already built builder
1727
- */
1728
- setMentionableSelectMenuComponent(input) {
1729
- this.data.component = resolveBuilder(input, MentionableSelectMenuBuilder);
1730
- return this;
1731
- }
1732
- /**
1733
- * Sets a channel select menu component to this label.
1734
- *
1735
- * @param input - A function that returns a component builder or an already built builder
1736
- */
1737
- setChannelSelectMenuComponent(input) {
1738
- this.data.component = resolveBuilder(input, ChannelSelectMenuBuilder);
1739
- return this;
1740
- }
1741
- /**
1742
- * Sets a text input component to this label.
1743
- *
1744
- * @param input - A function that returns a component builder or an already built builder
1745
- */
1746
- setTextInputComponent(input) {
1747
- this.data.component = resolveBuilder(input, TextInputBuilder);
1748
- return this;
1749
- }
1750
- /**
1751
- * Sets a file upload component to this label.
1752
- *
1753
- * @param input - A function that returns a component builder or an already built builder
1754
- */
1755
- setFileUploadComponent(input) {
1756
- this.data.component = resolveBuilder(input, FileUploadBuilder);
1757
- return this;
1758
- }
1759
- /**
1760
- * {@inheritDoc ComponentBuilder.toJSON}
1761
- */
1762
- toJSON() {
1763
- const { component, ...rest } = this.data;
1764
- const data = {
1765
- ...rest,
1766
- // The label predicate validates the component.
1767
- component: component?.toJSON()
1768
- };
1769
- labelPredicate.parse(data);
1770
- return data;
1771
- }
1772
- };
1773
-
1774
- // src/components/v2/Container.ts
1775
- var import_v1020 = require("discord-api-types/v10");
1776
-
1777
- // src/components/v2/Assertions.ts
1778
- var Assertions_exports7 = {};
1779
- __export(Assertions_exports7, {
1780
- accessoryPredicate: () => accessoryPredicate,
1781
- assertReturnOfBuilder: () => assertReturnOfBuilder,
1782
- containerColorPredicate: () => containerColorPredicate,
1783
- descriptionPredicate: () => descriptionPredicate2,
1784
- dividerPredicate: () => dividerPredicate,
1785
- filePredicate: () => filePredicate,
1786
- spacingPredicate: () => spacingPredicate,
1787
- spoilerPredicate: () => spoilerPredicate,
1788
- textDisplayContentPredicate: () => textDisplayContentPredicate,
1789
- unfurledMediaItemPredicate: () => unfurledMediaItemPredicate,
1790
- validateComponentArray: () => validateComponentArray
1791
- });
1792
- var import_shapeshift7 = require("@sapphire/shapeshift");
1793
- var import_v1016 = require("discord-api-types/v10");
1794
-
1795
- // src/components/v2/Thumbnail.ts
1796
- var import_v1015 = require("discord-api-types/v10");
1797
- var ThumbnailBuilder = class extends ComponentBuilder {
1798
- static {
1799
- __name(this, "ThumbnailBuilder");
1800
- }
1801
- /**
1802
- * Creates a new thumbnail from API data.
1803
- *
1804
- * @param data - The API data to create this thumbnail with
1805
- * @example
1806
- * Creating a thumbnail from an API data object:
1807
- * ```ts
1808
- * const thumbnail = new ThumbnailBuilder({
1809
- * description: 'some text',
1810
- * media: {
1811
- * url: 'https://cdn.discordapp.com/embed/avatars/4.png',
1812
- * },
1813
- * });
1814
- * ```
1815
- * @example
1816
- * Creating a thumbnail using setters and API data:
1817
- * ```ts
1818
- * const thumbnail = new ThumbnailBuilder({
1819
- * media: {
1820
- * url: 'attachment://image.png',
1821
- * },
1822
- * })
1823
- * .setDescription('alt text');
1824
- * ```
1825
- */
1826
- constructor(data = {}) {
1827
- super({
1828
- type: import_v1015.ComponentType.Thumbnail,
1829
- ...data,
1830
- media: data.media ? { url: data.media.url } : void 0
1831
- });
1832
- }
1833
- /**
1834
- * Sets the description of this thumbnail.
1835
- *
1836
- * @param description - The description to use
1837
- */
1838
- setDescription(description) {
1839
- this.data.description = descriptionPredicate2.parse(description);
1840
- return this;
1841
- }
1842
- /**
1843
- * Clears the description of this thumbnail.
1844
- */
1845
- clearDescription() {
1846
- this.data.description = void 0;
1847
- return this;
1848
- }
1849
- /**
1850
- * Sets the spoiler status of this thumbnail.
1851
- *
1852
- * @param spoiler - The spoiler status to use
1853
- */
1854
- setSpoiler(spoiler = true) {
1855
- this.data.spoiler = spoilerPredicate.parse(spoiler);
1856
- return this;
1857
- }
1858
- /**
1859
- * Sets the media URL of this thumbnail.
1860
- *
1861
- * @param url - The URL to use
1862
- */
1863
- setURL(url) {
1864
- this.data.media = unfurledMediaItemPredicate.parse({ url });
1865
- return this;
1866
- }
1867
- /**
1868
- * {@inheritdoc ComponentBuilder.toJSON}
1869
- */
1870
- toJSON() {
1871
- unfurledMediaItemPredicate.parse(this.data.media);
1872
- return { ...this.data };
1873
- }
1874
- };
1875
-
1876
- // src/components/v2/Assertions.ts
1877
- var unfurledMediaItemPredicate = import_shapeshift7.s.object({
1878
- url: import_shapeshift7.s.string().url(
1879
- { allowedProtocols: ["http:", "https:", "attachment:"] },
1880
- { message: "Invalid protocol for media URL. Must be http:, https:, or attachment:" }
1881
- )
1882
- }).setValidationEnabled(isValidationEnabled);
1883
- var descriptionPredicate2 = import_shapeshift7.s.string().lengthGreaterThanOrEqual(1).lengthLessThanOrEqual(1024).setValidationEnabled(isValidationEnabled);
1884
- var filePredicate = import_shapeshift7.s.object({
1885
- url: import_shapeshift7.s.string().url({ allowedProtocols: ["attachment:"] }, { message: "Invalid protocol for file URL. Must be attachment:" })
1886
- }).setValidationEnabled(isValidationEnabled);
1887
- var spoilerPredicate = import_shapeshift7.s.boolean();
1888
- var dividerPredicate = import_shapeshift7.s.boolean();
1889
- var spacingPredicate = import_shapeshift7.s.nativeEnum(import_v1016.SeparatorSpacingSize);
1890
- var textDisplayContentPredicate = import_shapeshift7.s.string().lengthGreaterThanOrEqual(1).lengthLessThanOrEqual(4e3).setValidationEnabled(isValidationEnabled);
1891
- var accessoryPredicate = import_shapeshift7.s.instance(ButtonBuilder).or(import_shapeshift7.s.instance(ThumbnailBuilder)).setValidationEnabled(isValidationEnabled);
1892
- var containerColorPredicate = colorPredicate.nullish();
1893
- function assertReturnOfBuilder(input, ExpectedInstanceOf) {
1894
- import_shapeshift7.s.instance(ExpectedInstanceOf).setValidationEnabled(isValidationEnabled).parse(input);
1895
- }
1896
- __name(assertReturnOfBuilder, "assertReturnOfBuilder");
1897
- function validateComponentArray(input, min, max, ExpectedInstanceOf) {
1898
- (ExpectedInstanceOf ? import_shapeshift7.s.instance(ExpectedInstanceOf) : import_shapeshift7.s.instance(ComponentBuilder)).array().lengthGreaterThanOrEqual(min).lengthLessThanOrEqual(max).setValidationEnabled(isValidationEnabled).parse(input);
1899
- }
1900
- __name(validateComponentArray, "validateComponentArray");
1901
-
1902
- // src/components/v2/File.ts
1903
- var import_v1017 = require("discord-api-types/v10");
1904
- var FileBuilder = class extends ComponentBuilder {
1905
- static {
1906
- __name(this, "FileBuilder");
1907
- }
1908
- /**
1909
- * Creates a new file from API data.
1910
- *
1911
- * @param data - The API data to create this file with
1912
- * @example
1913
- * Creating a file from an API data object:
1914
- * ```ts
1915
- * const file = new FileBuilder({
1916
- * spoiler: true,
1917
- * file: {
1918
- * url: 'attachment://file.png',
1919
- * },
1920
- * });
1921
- * ```
1922
- * @example
1923
- * Creating a file using setters and API data:
1924
- * ```ts
1925
- * const file = new FileBuilder({
1926
- * file: {
1927
- * url: 'attachment://image.jpg',
1928
- * },
1929
- * })
1930
- * .setSpoiler(false);
1931
- * ```
1932
- */
1933
- constructor(data = {}) {
1934
- super({ type: import_v1017.ComponentType.File, ...data, file: data.file ? { url: data.file.url } : void 0 });
1935
- }
1936
- /**
1937
- * Sets the spoiler status of this file.
1938
- *
1939
- * @param spoiler - The spoiler status to use
1940
- */
1941
- setSpoiler(spoiler = true) {
1942
- this.data.spoiler = spoilerPredicate.parse(spoiler);
1943
- return this;
1944
- }
1945
- /**
1946
- * Sets the media URL of this file.
1947
- *
1948
- * @param url - The URL to use
1949
- */
1950
- setURL(url) {
1951
- this.data.file = filePredicate.parse({ url });
1952
- return this;
1953
- }
1954
- /**
1955
- * {@inheritDoc ComponentBuilder.toJSON}
1956
- */
1957
- toJSON() {
1958
- filePredicate.parse(this.data.file);
1959
- return { ...this.data, file: { ...this.data.file } };
1960
- }
1961
- };
1962
-
1963
- // src/components/v2/Separator.ts
1964
- var import_v1018 = require("discord-api-types/v10");
1965
- var SeparatorBuilder = class extends ComponentBuilder {
1966
- static {
1967
- __name(this, "SeparatorBuilder");
1968
- }
1969
- /**
1970
- * Creates a new separator from API data.
1971
- *
1972
- * @param data - The API data to create this separator with
1973
- * @example
1974
- * Creating a separator from an API data object:
1975
- * ```ts
1976
- * const separator = new SeparatorBuilder({
1977
- * spacing: SeparatorSpacingSize.Small,
1978
- * divider: true,
1979
- * });
1980
- * ```
1981
- * @example
1982
- * Creating a separator using setters and API data:
1983
- * ```ts
1984
- * const separator = new SeparatorBuilder({
1985
- * spacing: SeparatorSpacingSize.Large,
1986
- * })
1987
- * .setDivider(false);
1988
- * ```
1989
- */
1990
- constructor(data = {}) {
1991
- super({
1992
- type: import_v1018.ComponentType.Separator,
1993
- ...data
1994
- });
1995
- }
1996
- /**
1997
- * Sets whether this separator should show a divider line.
1998
- *
1999
- * @param divider - Whether to show a divider line
2000
- */
2001
- setDivider(divider = true) {
2002
- this.data.divider = dividerPredicate.parse(divider);
2003
- return this;
2004
- }
2005
- /**
2006
- * Sets the spacing of this separator.
2007
- *
2008
- * @param spacing - The spacing to use
2009
- */
2010
- setSpacing(spacing) {
2011
- this.data.spacing = spacingPredicate.parse(spacing);
2012
- return this;
2013
- }
2014
- /**
2015
- * Clears the spacing of this separator.
2016
- */
2017
- clearSpacing() {
2018
- this.data.spacing = void 0;
2019
- return this;
2020
- }
2021
- /**
2022
- * {@inheritDoc ComponentBuilder.toJSON}
2023
- */
2024
- toJSON() {
2025
- return { ...this.data };
2026
- }
2027
- };
2028
-
2029
- // src/components/v2/TextDisplay.ts
2030
- var import_v1019 = require("discord-api-types/v10");
2031
- var TextDisplayBuilder = class extends ComponentBuilder {
2032
- static {
2033
- __name(this, "TextDisplayBuilder");
2034
- }
2035
- /**
2036
- * Creates a new text display from API data.
2037
- *
2038
- * @param data - The API data to create this text display with
2039
- * @example
2040
- * Creating a text display from an API data object:
2041
- * ```ts
2042
- * const textDisplay = new TextDisplayBuilder({
2043
- * content: 'some text',
2044
- * });
2045
- * ```
2046
- * @example
2047
- * Creating a text display using setters and API data:
2048
- * ```ts
2049
- * const textDisplay = new TextDisplayBuilder({
2050
- * content: 'old text',
2051
- * })
2052
- * .setContent('new text');
2053
- * ```
2054
- */
2055
- constructor(data = {}) {
2056
- super({
2057
- type: import_v1019.ComponentType.TextDisplay,
2058
- ...data
2059
- });
2060
- }
2061
- /**
2062
- * Sets the text of this text display.
2063
- *
2064
- * @param content - The text to use
2065
- */
2066
- setContent(content) {
2067
- this.data.content = textDisplayContentPredicate.parse(content);
2068
- return this;
2069
- }
2070
- /**
2071
- * {@inheritDoc ComponentBuilder.toJSON}
2072
- */
2073
- toJSON() {
2074
- textDisplayContentPredicate.parse(this.data.content);
2075
- return { ...this.data };
2076
- }
2077
- };
2078
-
2079
- // src/components/v2/Container.ts
2080
- var ContainerBuilder = class extends ComponentBuilder {
2081
- static {
2082
- __name(this, "ContainerBuilder");
2083
- }
2084
- /**
2085
- * The components within this container.
2086
- */
2087
- components;
2088
- /**
2089
- * Creates a new container from API data.
2090
- *
2091
- * @param data - The API data to create this container with
2092
- * @example
2093
- * Creating a container from an API data object:
2094
- * ```ts
2095
- * const container = new ContainerBuilder({
2096
- * components: [
2097
- * {
2098
- * content: "Some text here",
2099
- * type: ComponentType.TextDisplay,
2100
- * },
2101
- * ],
2102
- * });
2103
- * ```
2104
- * @example
2105
- * Creating a container using setters and API data:
2106
- * ```ts
2107
- * const container = new ContainerBuilder({
2108
- * components: [
2109
- * {
2110
- * content: "# Heading",
2111
- * type: ComponentType.TextDisplay,
2112
- * },
2113
- * ],
2114
- * })
2115
- * .addSeparatorComponents(separator)
2116
- * .addSectionComponents(section);
2117
- * ```
2118
- */
2119
- constructor({ components, ...data } = {}) {
2120
- super({ type: import_v1020.ComponentType.Container, ...data });
2121
- this.components = components?.map((component) => createComponentBuilder(component)) ?? [];
2122
- }
2123
- /**
2124
- * Sets the accent color of this container.
2125
- *
2126
- * @param color - The color to use
2127
- */
2128
- setAccentColor(color) {
2129
- containerColorPredicate.parse(color);
2130
- if (Array.isArray(color)) {
2131
- const [red, green, blue] = color;
2132
- this.data.accent_color = (red << 16) + (green << 8) + blue;
2133
- return this;
2134
- }
2135
- this.data.accent_color = color;
2136
- return this;
2137
- }
2138
- /**
2139
- * Clears the accent color of this container.
2140
- */
2141
- clearAccentColor() {
2142
- this.data.accent_color = void 0;
2143
- return this;
2144
- }
2145
- /**
2146
- * Adds action row components to this container.
2147
- *
2148
- * @param components - The action row components to add
2149
- */
2150
- addActionRowComponents(...components) {
2151
- this.components.push(
2152
- ...normalizeArray(components).map((component) => resolveBuilder(component, ActionRowBuilder))
2153
- );
2154
- return this;
2155
- }
2156
- /**
2157
- * Adds file components to this container.
2158
- *
2159
- * @param components - The file components to add
2160
- */
2161
- addFileComponents(...components) {
2162
- this.components.push(...normalizeArray(components).map((component) => resolveBuilder(component, FileBuilder)));
2163
- return this;
2164
- }
2165
- /**
2166
- * Adds media gallery components to this container.
2167
- *
2168
- * @param components - The media gallery components to add
2169
- */
2170
- addMediaGalleryComponents(...components) {
2171
- this.components.push(
2172
- ...normalizeArray(components).map((component) => resolveBuilder(component, MediaGalleryBuilder))
2173
- );
2174
- return this;
2175
- }
2176
- /**
2177
- * Adds section components to this container.
2178
- *
2179
- * @param components - The section components to add
2180
- */
2181
- addSectionComponents(...components) {
2182
- this.components.push(...normalizeArray(components).map((component) => resolveBuilder(component, SectionBuilder)));
2183
- return this;
2184
- }
2185
- /**
2186
- * Adds separator components to this container.
2187
- *
2188
- * @param components - The separator components to add
2189
- */
2190
- addSeparatorComponents(...components) {
2191
- this.components.push(...normalizeArray(components).map((component) => resolveBuilder(component, SeparatorBuilder)));
2192
- return this;
2193
- }
2194
- /**
2195
- * Adds text display components to this container.
2196
- *
2197
- * @param components - The text display components to add
2198
- */
2199
- addTextDisplayComponents(...components) {
2200
- this.components.push(
2201
- ...normalizeArray(components).map((component) => resolveBuilder(component, TextDisplayBuilder))
2202
- );
2203
- return this;
2204
- }
2205
- /**
2206
- * Removes, replaces, or inserts components for this container.
2207
- *
2208
- * @param index - The index to start removing, replacing or inserting components
2209
- * @param deleteCount - The amount of components to remove
2210
- * @param components - The components to set
2211
- */
2212
- spliceComponents(index, deleteCount, ...components) {
2213
- this.components.splice(
2214
- index,
2215
- deleteCount,
2216
- ...normalizeArray(components).map(
2217
- (component) => component instanceof ComponentBuilder ? component : createComponentBuilder(component)
2218
- )
2219
- );
2220
- return this;
2221
- }
2222
- /**
2223
- * Sets the spoiler status of this container.
2224
- *
2225
- * @param spoiler - The spoiler status to use
2226
- */
2227
- setSpoiler(spoiler = true) {
2228
- this.data.spoiler = spoilerPredicate.parse(spoiler);
2229
- return this;
2230
- }
2231
- /**
2232
- * {@inheritDoc ComponentBuilder.toJSON}
2233
- */
2234
- toJSON() {
2235
- return {
2236
- ...this.data,
2237
- components: this.components.map((component) => component.toJSON())
2238
- };
2239
- }
2240
- };
2241
-
2242
- // src/components/v2/MediaGallery.ts
2243
- var import_v1021 = require("discord-api-types/v10");
2244
-
2245
- // src/components/v2/MediaGalleryItem.ts
2246
- var MediaGalleryItemBuilder = class {
2247
- static {
2248
- __name(this, "MediaGalleryItemBuilder");
2249
- }
2250
- /**
2251
- * The API data associated with this media gallery item.
2252
- */
2253
- data;
2254
- /**
2255
- * Creates a new media gallery item from API data.
2256
- *
2257
- * @param data - The API data to create this media gallery item with
2258
- * @example
2259
- * Creating a media gallery item from an API data object:
2260
- * ```ts
2261
- * const item = new MediaGalleryItemBuilder({
2262
- * description: "Some text here",
2263
- * media: {
2264
- * url: 'https://cdn.discordapp.com/embed/avatars/2.png',
2265
- * },
2266
- * });
2267
- * ```
2268
- * @example
2269
- * Creating a media gallery item using setters and API data:
2270
- * ```ts
2271
- * const item = new MediaGalleryItemBuilder({
2272
- * media: {
2273
- * url: 'https://cdn.discordapp.com/embed/avatars/5.png',
2274
- * },
2275
- * })
2276
- * .setDescription("alt text");
2277
- * ```
2278
- */
2279
- constructor(data = {}) {
2280
- this.data = data;
2281
- }
2282
- /**
2283
- * Sets the description of this media gallery item.
2284
- *
2285
- * @param description - The description to use
2286
- */
2287
- setDescription(description) {
2288
- this.data.description = descriptionPredicate2.parse(description);
2289
- return this;
2290
- }
2291
- /**
2292
- * Clears the description of this media gallery item.
2293
- */
2294
- clearDescription() {
2295
- this.data.description = void 0;
2296
- return this;
2297
- }
2298
- /**
2299
- * Sets the spoiler status of this media gallery item.
2300
- *
2301
- * @param spoiler - The spoiler status to use
2302
- */
2303
- setSpoiler(spoiler = true) {
2304
- this.data.spoiler = spoilerPredicate.parse(spoiler);
2305
- return this;
2306
- }
2307
- /**
2308
- * Sets the media URL of this media gallery item.
2309
- *
2310
- * @param url - The URL to use
2311
- */
2312
- setURL(url) {
2313
- this.data.media = unfurledMediaItemPredicate.parse({ url });
2314
- return this;
2315
- }
2316
- /**
2317
- * Serializes this builder to API-compatible JSON data.
2318
- *
2319
- * @remarks
2320
- * This method runs validations on the data before serializing it.
2321
- * As such, it may throw an error if the data is invalid.
2322
- */
2323
- toJSON() {
2324
- unfurledMediaItemPredicate.parse(this.data.media);
2325
- return { ...this.data };
2326
- }
2327
- };
2328
-
2329
- // src/components/v2/MediaGallery.ts
2330
- var MediaGalleryBuilder = class extends ComponentBuilder {
2331
- static {
2332
- __name(this, "MediaGalleryBuilder");
2333
- }
2334
- /**
2335
- * The components within this container.
2336
- */
2337
- items;
2338
- /**
2339
- * Creates a new media gallery from API data.
2340
- *
2341
- * @param data - The API data to create this media gallery with
2342
- * @example
2343
- * Creating a media gallery from an API data object:
2344
- * ```ts
2345
- * const mediaGallery = new MediaGalleryBuilder({
2346
- * items: [
2347
- * {
2348
- * description: "Some text here",
2349
- * media: {
2350
- * url: 'https://cdn.discordapp.com/embed/avatars/2.png',
2351
- * },
2352
- * },
2353
- * ],
2354
- * });
2355
- * ```
2356
- * @example
2357
- * Creating a media gallery using setters and API data:
2358
- * ```ts
2359
- * const mediaGallery = new MediaGalleryBuilder({
2360
- * items: [
2361
- * {
2362
- * description: "alt text",
2363
- * media: {
2364
- * url: 'https://cdn.discordapp.com/embed/avatars/5.png',
2365
- * },
2366
- * },
2367
- * ],
2368
- * })
2369
- * .addItems(item2, item3);
2370
- * ```
2371
- */
2372
- constructor({ items, ...data } = {}) {
2373
- super({ type: import_v1021.ComponentType.MediaGallery, ...data });
2374
- this.items = items?.map((item) => new MediaGalleryItemBuilder(item)) ?? [];
2375
- }
2376
- /**
2377
- * Adds items to this media gallery.
2378
- *
2379
- * @param items - The items to add
2380
- */
2381
- addItems(...items) {
2382
- this.items.push(
2383
- ...normalizeArray(items).map((input) => {
2384
- const result = resolveBuilder(input, MediaGalleryItemBuilder);
2385
- assertReturnOfBuilder(result, MediaGalleryItemBuilder);
2386
- return result;
2387
- })
2388
- );
2389
- return this;
2390
- }
2391
- /**
2392
- * Removes, replaces, or inserts media gallery items for this media gallery.
2393
- *
2394
- * @param index - The index to start removing, replacing or inserting items
2395
- * @param deleteCount - The amount of items to remove
2396
- * @param items - The items to insert
2397
- */
2398
- spliceItems(index, deleteCount, ...items) {
2399
- this.items.splice(
2400
- index,
2401
- deleteCount,
2402
- ...normalizeArray(items).map((input) => {
2403
- const result = resolveBuilder(input, MediaGalleryItemBuilder);
2404
- assertReturnOfBuilder(result, MediaGalleryItemBuilder);
2405
- return result;
2406
- })
2407
- );
2408
- return this;
2409
- }
2410
- /**
2411
- * {@inheritDoc ComponentBuilder.toJSON}
2412
- */
2413
- toJSON() {
2414
- validateComponentArray(this.items, 1, 10, MediaGalleryItemBuilder);
2415
- return {
2416
- ...this.data,
2417
- items: this.items.map((item) => item.toJSON())
2418
- };
2419
- }
2420
- };
2421
-
2422
- // src/components/v2/Section.ts
2423
- var import_v1022 = require("discord-api-types/v10");
2424
- var SectionBuilder = class extends ComponentBuilder {
2425
- static {
2426
- __name(this, "SectionBuilder");
2427
- }
2428
- /**
2429
- * The components within this section.
2430
- */
2431
- components;
2432
- /**
2433
- * The accessory of this section.
2434
- */
2435
- accessory;
2436
- /**
2437
- * Creates a new section from API data.
2438
- *
2439
- * @param data - The API data to create this section with
2440
- * @example
2441
- * Creating a section from an API data object:
2442
- * ```ts
2443
- * const section = new SectionBuilder({
2444
- * components: [
2445
- * {
2446
- * content: "Some text here",
2447
- * type: ComponentType.TextDisplay,
2448
- * },
2449
- * ],
2450
- * accessory: {
2451
- * media: {
2452
- * url: 'https://cdn.discordapp.com/embed/avatars/3.png',
2453
- * },
2454
- * }
2455
- * });
2456
- * ```
2457
- * @example
2458
- * Creating a section using setters and API data:
2459
- * ```ts
2460
- * const section = new SectionBuilder({
2461
- * components: [
2462
- * {
2463
- * content: "# Heading",
2464
- * type: ComponentType.TextDisplay,
2465
- * },
2466
- * ],
2467
- * })
2468
- * .setPrimaryButtonAccessory(button);
2469
- * ```
2470
- */
2471
- constructor({ components, accessory, ...data } = {}) {
2472
- super({ type: import_v1022.ComponentType.Section, ...data });
2473
- this.components = components?.map((component) => createComponentBuilder(component)) ?? [];
2474
- this.accessory = accessory ? createComponentBuilder(accessory) : void 0;
2475
- }
2476
- /**
2477
- * Sets the accessory of this section to a button.
2478
- *
2479
- * @param accessory - The accessory to use
2480
- */
2481
- setButtonAccessory(accessory) {
2482
- Reflect.set(this, "accessory", accessoryPredicate.parse(resolveBuilder(accessory, ButtonBuilder)));
2483
- return this;
2484
- }
2485
- /**
2486
- * Sets the accessory of this section to a thumbnail.
2487
- *
2488
- * @param accessory - The accessory to use
2489
- */
2490
- setThumbnailAccessory(accessory) {
2491
- Reflect.set(this, "accessory", accessoryPredicate.parse(resolveBuilder(accessory, ThumbnailBuilder)));
2492
- return this;
2493
- }
2494
- /**
2495
- * Adds text display components to this section.
2496
- *
2497
- * @param components - The text display components to add
2498
- */
2499
- addTextDisplayComponents(...components) {
2500
- this.components.push(
2501
- ...normalizeArray(components).map((input) => {
2502
- const result = resolveBuilder(input, TextDisplayBuilder);
2503
- assertReturnOfBuilder(result, TextDisplayBuilder);
2504
- return result;
2505
- })
2506
- );
2507
- return this;
2508
- }
2509
- /**
2510
- * Removes, replaces, or inserts text display components for this section.
2511
- *
2512
- * @param index - The index to start removing, replacing or inserting text display components
2513
- * @param deleteCount - The amount of text display components to remove
2514
- * @param components - The text display components to insert
2515
- */
2516
- spliceTextDisplayComponents(index, deleteCount, ...components) {
2517
- this.components.splice(
2518
- index,
2519
- deleteCount,
2520
- ...normalizeArray(components).map((input) => {
2521
- const result = resolveBuilder(input, TextDisplayBuilder);
2522
- assertReturnOfBuilder(result, TextDisplayBuilder);
2523
- return result;
2524
- })
2525
- );
2526
- return this;
2527
- }
2528
- /**
2529
- * {@inheritDoc ComponentBuilder.toJSON}
2530
- */
2531
- toJSON() {
2532
- validateComponentArray(this.components, 1, 3, TextDisplayBuilder);
2533
- return {
2534
- ...this.data,
2535
- components: this.components.map((component) => component.toJSON()),
2536
- accessory: accessoryPredicate.parse(this.accessory).toJSON()
2537
- };
2538
- }
2539
- };
2540
-
2541
- // src/components/Components.ts
2542
- function createComponentBuilder(data) {
2543
- if (data instanceof ComponentBuilder) {
2544
- return data;
2545
- }
2546
- switch (data.type) {
2547
- case import_v1023.ComponentType.ActionRow:
2548
- return new ActionRowBuilder(data);
2549
- case import_v1023.ComponentType.Button:
2550
- return new ButtonBuilder(data);
2551
- case import_v1023.ComponentType.StringSelect:
2552
- return new StringSelectMenuBuilder(data);
2553
- case import_v1023.ComponentType.TextInput:
2554
- return new TextInputBuilder(data);
2555
- case import_v1023.ComponentType.UserSelect:
2556
- return new UserSelectMenuBuilder(data);
2557
- case import_v1023.ComponentType.RoleSelect:
2558
- return new RoleSelectMenuBuilder(data);
2559
- case import_v1023.ComponentType.MentionableSelect:
2560
- return new MentionableSelectMenuBuilder(data);
2561
- case import_v1023.ComponentType.ChannelSelect:
2562
- return new ChannelSelectMenuBuilder(data);
2563
- case import_v1023.ComponentType.File:
2564
- return new FileBuilder(data);
2565
- case import_v1023.ComponentType.Container:
2566
- return new ContainerBuilder(data);
2567
- case import_v1023.ComponentType.Section:
2568
- return new SectionBuilder(data);
2569
- case import_v1023.ComponentType.Separator:
2570
- return new SeparatorBuilder(data);
2571
- case import_v1023.ComponentType.TextDisplay:
2572
- return new TextDisplayBuilder(data);
2573
- case import_v1023.ComponentType.Thumbnail:
2574
- return new ThumbnailBuilder(data);
2575
- case import_v1023.ComponentType.MediaGallery:
2576
- return new MediaGalleryBuilder(data);
2577
- case import_v1023.ComponentType.Label:
2578
- return new LabelBuilder(data);
2579
- case import_v1023.ComponentType.FileUpload:
2580
- return new FileUploadBuilder(data);
2581
- default:
2582
- throw new Error(`Cannot properly serialize component type: ${data.type}`);
2583
- }
2584
- }
2585
- __name(createComponentBuilder, "createComponentBuilder");
2586
- function isBuilder(builder, Constructor) {
2587
- return builder instanceof Constructor;
2588
- }
2589
- __name(isBuilder, "isBuilder");
2590
- function resolveBuilder(builder, Constructor) {
2591
- if (isBuilder(builder, Constructor)) {
2592
- return builder;
2593
- }
2594
- if (typeof builder === "function") {
2595
- return builder(new Constructor());
2596
- }
2597
- return new Constructor(builder);
2598
- }
2599
- __name(resolveBuilder, "resolveBuilder");
2600
-
2601
- // src/components/ActionRow.ts
2602
- var ActionRowBuilder = class extends ComponentBuilder {
2603
- static {
2604
- __name(this, "ActionRowBuilder");
2605
- }
2606
- /**
2607
- * The components within this action row.
2608
- */
2609
- components;
2610
- /**
2611
- * Creates a new action row from API data.
2612
- *
2613
- * @param data - The API data to create this action row with
2614
- * @example
2615
- * Creating an action row from an API data object:
2616
- * ```ts
2617
- * const actionRow = new ActionRowBuilder({
2618
- * components: [
2619
- * {
2620
- * custom_id: "custom id",
2621
- * label: "Type something",
2622
- * style: TextInputStyle.Short,
2623
- * type: ComponentType.TextInput,
2624
- * },
2625
- * ],
2626
- * });
2627
- * ```
2628
- * @example
2629
- * Creating an action row using setters and API data:
2630
- * ```ts
2631
- * const actionRow = new ActionRowBuilder({
2632
- * components: [
2633
- * {
2634
- * custom_id: "custom id",
2635
- * label: "Click me",
2636
- * style: ButtonStyle.Primary,
2637
- * type: ComponentType.Button,
2638
- * },
2639
- * ],
2640
- * })
2641
- * .addComponents(button2, button3);
2642
- * ```
2643
- */
2644
- constructor({ components, ...data } = {}) {
2645
- super({ type: import_v1024.ComponentType.ActionRow, ...data });
2646
- this.components = components?.map((component) => createComponentBuilder(component)) ?? [];
2647
- }
2648
- /**
2649
- * Adds components to this action row.
2650
- *
2651
- * @param components - The components to add
2652
- */
2653
- addComponents(...components) {
2654
- this.components.push(...normalizeArray(components));
2655
- return this;
2656
- }
2657
- /**
2658
- * Sets components for this action row.
2659
- *
2660
- * @param components - The components to set
2661
- */
2662
- setComponents(...components) {
2663
- this.components.splice(0, this.components.length, ...normalizeArray(components));
2664
- return this;
2665
- }
2666
- /**
2667
- * {@inheritDoc ComponentBuilder.toJSON}
2668
- */
2669
- toJSON() {
2670
- return {
2671
- ...this.data,
2672
- components: this.components.map((component) => component.toJSON())
2673
- };
2674
- }
2675
- };
2676
-
2677
- // src/interactions/modals/Modal.ts
2678
- var import_v1025 = require("discord-api-types/v10");
2679
-
2680
- // src/interactions/modals/Assertions.ts
2681
- var Assertions_exports8 = {};
2682
- __export(Assertions_exports8, {
2683
- componentsValidator: () => componentsValidator,
2684
- titleValidator: () => titleValidator,
2685
- validateRequiredParameters: () => validateRequiredParameters2
2686
- });
2687
- var import_shapeshift8 = require("@sapphire/shapeshift");
2688
- var titleValidator = import_shapeshift8.s.string().lengthGreaterThanOrEqual(1).lengthLessThanOrEqual(45).setValidationEnabled(isValidationEnabled);
2689
- var componentsValidator = import_shapeshift8.s.union([import_shapeshift8.s.instance(ActionRowBuilder), import_shapeshift8.s.instance(LabelBuilder), import_shapeshift8.s.instance(TextDisplayBuilder)]).array().lengthGreaterThanOrEqual(1).setValidationEnabled(isValidationEnabled);
2690
- function validateRequiredParameters2(customId, title, components) {
2691
- customIdValidator.parse(customId);
2692
- titleValidator.parse(title);
2693
- componentsValidator.parse(components);
2694
- }
2695
- __name(validateRequiredParameters2, "validateRequiredParameters");
2696
-
2697
- // src/interactions/modals/Modal.ts
2698
- var ModalBuilder = class {
2699
- static {
2700
- __name(this, "ModalBuilder");
2701
- }
2702
- /**
2703
- * The API data associated with this modal.
2704
- */
2705
- data;
2706
- /**
2707
- * The components within this modal.
2708
- */
2709
- components = [];
2710
- /**
2711
- * Creates a new modal from API data.
2712
- *
2713
- * @param data - The API data to create this modal with
2714
- */
2715
- constructor({ components, ...data } = {}) {
2716
- this.data = { ...data };
2717
- this.components = components?.map((component) => createComponentBuilder(component)) ?? [];
2718
- }
2719
- /**
2720
- * Sets the title of this modal.
2721
- *
2722
- * @param title - The title to use
2723
- */
2724
- setTitle(title) {
2725
- this.data.title = titleValidator.parse(title);
2726
- return this;
2727
- }
2728
- /**
2729
- * Sets the custom id of this modal.
2730
- *
2731
- * @param customId - The custom id to use
2732
- */
2733
- setCustomId(customId) {
2734
- this.data.custom_id = customIdValidator.parse(customId);
2735
- return this;
2736
- }
2737
- /**
2738
- * Adds components to this modal.
2739
- *
2740
- * @param components - The components to add
2741
- * @deprecated Use {@link ModalBuilder.addLabelComponents} or {@link ModalBuilder.addTextDisplayComponents} instead
2742
- */
2743
- addComponents(...components) {
2744
- this.components.push(
2745
- ...normalizeArray(components).map((component, idx) => {
2746
- if (component instanceof ActionRowBuilder || component instanceof LabelBuilder || component instanceof TextDisplayBuilder) {
2747
- return component;
2748
- }
2749
- if (component instanceof TextInputBuilder) {
2750
- return new ActionRowBuilder().addComponents(component);
2751
- }
2752
- if ("type" in component) {
2753
- if (component.type === import_v1025.ComponentType.ActionRow) {
2754
- return new ActionRowBuilder(component);
2755
- }
2756
- if (component.type === import_v1025.ComponentType.Label) {
2757
- return new LabelBuilder(component);
2758
- }
2759
- if (component.type === import_v1025.ComponentType.TextDisplay) {
2760
- return new TextDisplayBuilder(component);
2761
- }
2762
- if (component.type === import_v1025.ComponentType.TextInput) {
2763
- return new ActionRowBuilder().addComponents(
2764
- new TextInputBuilder(component)
2765
- );
2766
- }
2767
- }
2768
- throw new TypeError(`Invalid component passed in ModalBuilder.addComponents at index ${idx}!`);
2769
- })
2770
- );
2771
- return this;
2772
- }
2773
- /**
2774
- * Adds label components to this modal.
2775
- *
2776
- * @param components - The components to add
2777
- */
2778
- addLabelComponents(...components) {
2779
- const normalized = normalizeArray(components);
2780
- const resolved = normalized.map((label) => resolveBuilder(label, LabelBuilder));
2781
- this.components.push(...resolved);
2782
- return this;
2783
- }
2784
- /**
2785
- * Adds text display components to this modal.
2786
- *
2787
- * @param components - The components to add
2788
- */
2789
- addTextDisplayComponents(...components) {
2790
- const normalized = normalizeArray(components);
2791
- const resolved = normalized.map((row) => resolveBuilder(row, TextDisplayBuilder));
2792
- this.components.push(...resolved);
2793
- return this;
2794
- }
2795
- /**
2796
- * Adds action rows to this modal.
2797
- *
2798
- * @param components - The components to add
2799
- * @deprecated Use {@link ModalBuilder.addLabelComponents} instead
2800
- */
2801
- addActionRowComponents(...components) {
2802
- const normalized = normalizeArray(components);
2803
- const resolved = normalized.map((row) => resolveBuilder(row, ActionRowBuilder));
2804
- this.components.push(...resolved);
2805
- return this;
2806
- }
2807
- /**
2808
- * Sets the labels for this modal.
2809
- *
2810
- * @param components - The components to set
2811
- */
2812
- setLabelComponents(...components) {
2813
- const normalized = normalizeArray(components);
2814
- this.spliceLabelComponents(0, this.components.length, ...normalized);
2815
- return this;
2816
- }
2817
- /**
2818
- * Removes, replaces, or inserts labels for this modal.
2819
- *
2820
- * @remarks
2821
- * This method behaves similarly
2822
- * to {@link https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/splice | Array.prototype.splice()}.
2823
- * The maximum amount of labels that can be added is 5.
2824
- *
2825
- * It's useful for modifying and adjusting order of the already-existing labels of a modal.
2826
- * @example
2827
- * Remove the first label:
2828
- * ```ts
2829
- * modal.spliceLabelComponents(0, 1);
2830
- * ```
2831
- * @example
2832
- * Remove the first n labels:
2833
- * ```ts
2834
- * const n = 4;
2835
- * modal.spliceLabelComponents(0, n);
2836
- * ```
2837
- * @example
2838
- * Remove the last label:
2839
- * ```ts
2840
- * modal.spliceLabelComponents(-1, 1);
2841
- * ```
2842
- * @param index - The index to start at
2843
- * @param deleteCount - The number of labels to remove
2844
- * @param labels - The replacing label objects
2845
- */
2846
- spliceLabelComponents(index, deleteCount, ...labels) {
2847
- const resolved = labels.map((label) => resolveBuilder(label, LabelBuilder));
2848
- this.components.splice(index, deleteCount, ...resolved);
2849
- return this;
2850
- }
2851
- /**
2852
- * Sets components for this modal.
2853
- *
2854
- * @param components - The components to set
2855
- * @deprecated Use {@link ModalBuilder.setLabelComponents} instead
2856
- */
2857
- setComponents(...components) {
2858
- this.components.splice(0, this.components.length, ...normalizeArray(components));
2859
- return this;
2860
- }
2861
- /**
2862
- * {@inheritDoc ComponentBuilder.toJSON}
2863
- */
2864
- toJSON() {
2865
- validateRequiredParameters2(this.data.custom_id, this.data.title, this.components);
2866
- return {
2867
- ...this.data,
2868
- components: this.components.map((component) => component.toJSON())
2869
- };
2870
- }
2871
- };
2872
-
2873
- // src/interactions/slashCommands/Assertions.ts
2874
- var Assertions_exports9 = {};
2875
- __export(Assertions_exports9, {
2876
- assertReturnOfBuilder: () => assertReturnOfBuilder2,
2877
- contextsPredicate: () => contextsPredicate,
2878
- integrationTypesPredicate: () => integrationTypesPredicate,
2879
- localizationMapPredicate: () => localizationMapPredicate,
2880
- validateChoicesLength: () => validateChoicesLength,
2881
- validateDMPermission: () => validateDMPermission,
2882
- validateDefaultMemberPermissions: () => validateDefaultMemberPermissions,
2883
- validateDefaultPermission: () => validateDefaultPermission,
2884
- validateDescription: () => validateDescription,
2885
- validateLocale: () => validateLocale,
2886
- validateLocalizationMap: () => validateLocalizationMap,
2887
- validateMaxOptionsLength: () => validateMaxOptionsLength,
2888
- validateNSFW: () => validateNSFW,
2889
- validateName: () => validateName,
2890
- validateRequired: () => validateRequired,
2891
- validateRequiredParameters: () => validateRequiredParameters3
2892
- });
2893
- var import_shapeshift9 = require("@sapphire/shapeshift");
2894
- var import_v1026 = require("discord-api-types/v10");
2895
- var namePredicate = import_shapeshift9.s.string().lengthGreaterThanOrEqual(1).lengthLessThanOrEqual(32).regex(/^[\p{Ll}\p{Lm}\p{Lo}\p{N}\p{sc=Devanagari}\p{sc=Thai}_-]+$/u).setValidationEnabled(isValidationEnabled);
2896
- function validateName(name) {
2897
- namePredicate.parse(name);
2898
- }
2899
- __name(validateName, "validateName");
2900
- var descriptionPredicate3 = import_shapeshift9.s.string().lengthGreaterThanOrEqual(1).lengthLessThanOrEqual(100).setValidationEnabled(isValidationEnabled);
2901
- var localePredicate = import_shapeshift9.s.nativeEnum(import_v1026.Locale);
2902
- function validateDescription(description) {
2903
- descriptionPredicate3.parse(description);
2904
- }
2905
- __name(validateDescription, "validateDescription");
2906
- var maxArrayLengthPredicate = import_shapeshift9.s.unknown().array().lengthLessThanOrEqual(25).setValidationEnabled(isValidationEnabled);
2907
- function validateLocale(locale) {
2908
- return localePredicate.parse(locale);
2909
- }
2910
- __name(validateLocale, "validateLocale");
2911
- function validateMaxOptionsLength(options) {
2912
- maxArrayLengthPredicate.parse(options);
2913
- }
2914
- __name(validateMaxOptionsLength, "validateMaxOptionsLength");
2915
- function validateRequiredParameters3(name, description, options) {
2916
- validateName(name);
2917
- validateDescription(description);
2918
- validateMaxOptionsLength(options);
2919
- }
2920
- __name(validateRequiredParameters3, "validateRequiredParameters");
2921
- var booleanPredicate = import_shapeshift9.s.boolean();
2922
- function validateDefaultPermission(value) {
2923
- booleanPredicate.parse(value);
2924
- }
2925
- __name(validateDefaultPermission, "validateDefaultPermission");
2926
- function validateRequired(required) {
2927
- booleanPredicate.parse(required);
2928
- }
2929
- __name(validateRequired, "validateRequired");
2930
- var choicesLengthPredicate = import_shapeshift9.s.number().lessThanOrEqual(25).setValidationEnabled(isValidationEnabled);
2931
- function validateChoicesLength(amountAdding, choices) {
2932
- choicesLengthPredicate.parse((choices?.length ?? 0) + amountAdding);
2933
- }
2934
- __name(validateChoicesLength, "validateChoicesLength");
2935
- function assertReturnOfBuilder2(input, ExpectedInstanceOf) {
2936
- import_shapeshift9.s.instance(ExpectedInstanceOf).parse(input);
2937
- }
2938
- __name(assertReturnOfBuilder2, "assertReturnOfBuilder");
2939
- var localizationMapPredicate = import_shapeshift9.s.object(Object.fromEntries(Object.values(import_v1026.Locale).map((locale) => [locale, import_shapeshift9.s.string().nullish()]))).strict().nullish().setValidationEnabled(isValidationEnabled);
2940
- function validateLocalizationMap(value) {
2941
- localizationMapPredicate.parse(value);
2942
- }
2943
- __name(validateLocalizationMap, "validateLocalizationMap");
2944
- var dmPermissionPredicate = import_shapeshift9.s.boolean().nullish();
2945
- function validateDMPermission(value) {
2946
- dmPermissionPredicate.parse(value);
2947
- }
2948
- __name(validateDMPermission, "validateDMPermission");
2949
- var memberPermissionPredicate = import_shapeshift9.s.union([
2950
- import_shapeshift9.s.bigint().transform((value) => value.toString()),
2951
- import_shapeshift9.s.number().safeInt().transform((value) => value.toString()),
2952
- import_shapeshift9.s.string().regex(/^\d+$/)
2953
- ]).nullish();
2954
- function validateDefaultMemberPermissions(permissions) {
2955
- return memberPermissionPredicate.parse(permissions);
2956
- }
2957
- __name(validateDefaultMemberPermissions, "validateDefaultMemberPermissions");
2958
- function validateNSFW(value) {
2959
- booleanPredicate.parse(value);
2960
- }
2961
- __name(validateNSFW, "validateNSFW");
2962
- var contextsPredicate = import_shapeshift9.s.array(
2963
- import_shapeshift9.s.nativeEnum(import_v1026.InteractionContextType).setValidationEnabled(isValidationEnabled)
2964
- );
2965
- var integrationTypesPredicate = import_shapeshift9.s.array(
2966
- import_shapeshift9.s.nativeEnum(import_v1026.ApplicationIntegrationType).setValidationEnabled(isValidationEnabled)
2967
- );
2968
-
2969
- // src/interactions/slashCommands/SlashCommandBuilder.ts
2970
- var import_ts_mixer6 = require("ts-mixer");
2971
-
2972
- // src/interactions/slashCommands/mixins/NameAndDescription.ts
2973
- var SharedNameAndDescription = class {
2974
- static {
2975
- __name(this, "SharedNameAndDescription");
2976
- }
2977
- /**
2978
- * The name of this command.
2979
- */
2980
- name;
2981
- /**
2982
- * The name localizations of this command.
2983
- */
2984
- name_localizations;
2985
- /**
2986
- * The description of this command.
2987
- */
2988
- description;
2989
- /**
2990
- * The description localizations of this command.
2991
- */
2992
- description_localizations;
2993
- /**
2994
- * Sets the name of this command.
2995
- *
2996
- * @param name - The name to use
2997
- */
2998
- setName(name) {
2999
- validateName(name);
3000
- Reflect.set(this, "name", name);
3001
- return this;
3002
- }
3003
- /**
3004
- * Sets the description of this command.
3005
- *
3006
- * @param description - The description to use
3007
- */
3008
- setDescription(description) {
3009
- validateDescription(description);
3010
- Reflect.set(this, "description", description);
3011
- return this;
3012
- }
3013
- /**
3014
- * Sets a name localization for this command.
3015
- *
3016
- * @param locale - The locale to set
3017
- * @param localizedName - The localized name for the given `locale`
3018
- */
3019
- setNameLocalization(locale, localizedName) {
3020
- if (!this.name_localizations) {
3021
- Reflect.set(this, "name_localizations", {});
3022
- }
3023
- const parsedLocale = validateLocale(locale);
3024
- if (localizedName === null) {
3025
- this.name_localizations[parsedLocale] = null;
3026
- return this;
3027
- }
3028
- validateName(localizedName);
3029
- this.name_localizations[parsedLocale] = localizedName;
3030
- return this;
3031
- }
3032
- /**
3033
- * Sets the name localizations for this command.
3034
- *
3035
- * @param localizedNames - The object of localized names to set
3036
- */
3037
- setNameLocalizations(localizedNames) {
3038
- if (localizedNames === null) {
3039
- Reflect.set(this, "name_localizations", null);
3040
- return this;
3041
- }
3042
- Reflect.set(this, "name_localizations", {});
3043
- for (const args of Object.entries(localizedNames)) {
3044
- this.setNameLocalization(...args);
3045
- }
3046
- return this;
3047
- }
3048
- /**
3049
- * Sets a description localization for this command.
3050
- *
3051
- * @param locale - The locale to set
3052
- * @param localizedDescription - The localized description for the given locale
3053
- */
3054
- setDescriptionLocalization(locale, localizedDescription) {
3055
- if (!this.description_localizations) {
3056
- Reflect.set(this, "description_localizations", {});
3057
- }
3058
- const parsedLocale = validateLocale(locale);
3059
- if (localizedDescription === null) {
3060
- this.description_localizations[parsedLocale] = null;
3061
- return this;
3062
- }
3063
- validateDescription(localizedDescription);
3064
- this.description_localizations[parsedLocale] = localizedDescription;
3065
- return this;
3066
- }
3067
- /**
3068
- * Sets the description localizations for this command.
3069
- *
3070
- * @param localizedDescriptions - The object of localized descriptions to set
3071
- */
3072
- setDescriptionLocalizations(localizedDescriptions) {
3073
- if (localizedDescriptions === null) {
3074
- Reflect.set(this, "description_localizations", null);
3075
- return this;
3076
- }
3077
- Reflect.set(this, "description_localizations", {});
3078
- for (const args of Object.entries(localizedDescriptions)) {
3079
- this.setDescriptionLocalization(...args);
3080
- }
3081
- return this;
3082
- }
3083
- };
3084
-
3085
- // src/interactions/slashCommands/mixins/SharedSlashCommand.ts
3086
- var import_v1027 = require("discord-api-types/v10");
3087
- var SharedSlashCommand = class {
3088
- static {
3089
- __name(this, "SharedSlashCommand");
3090
- }
3091
- name = void 0;
3092
- name_localizations;
3093
- description = void 0;
3094
- description_localizations;
3095
- options = [];
3096
- contexts;
3097
- /**
3098
- * @deprecated Use {@link SharedSlashCommand.setDefaultMemberPermissions} or {@link SharedSlashCommand.setDMPermission} instead.
3099
- */
3100
- default_permission = void 0;
3101
- default_member_permissions = void 0;
3102
- /**
3103
- * @deprecated Use {@link SharedSlashCommand.contexts} instead.
3104
- */
3105
- dm_permission = void 0;
3106
- integration_types;
3107
- nsfw = void 0;
3108
- /**
3109
- * Sets the contexts of this command.
3110
- *
3111
- * @param contexts - The contexts
3112
- */
3113
- setContexts(...contexts) {
3114
- Reflect.set(this, "contexts", contextsPredicate.parse(normalizeArray(contexts)));
3115
- return this;
3116
- }
3117
- /**
3118
- * Sets the integration types of this command.
3119
- *
3120
- * @param integrationTypes - The integration types
3121
- */
3122
- setIntegrationTypes(...integrationTypes) {
3123
- Reflect.set(this, "integration_types", integrationTypesPredicate.parse(normalizeArray(integrationTypes)));
3124
- return this;
3125
- }
3126
- /**
3127
- * Sets whether the command is enabled by default when the application is added to a guild.
3128
- *
3129
- * @remarks
3130
- * If set to `false`, you will have to later `PUT` the permissions for this command.
3131
- * @param value - Whether or not to enable this command by default
3132
- * @see {@link https://discord.com/developers/docs/interactions/application-commands#permissions}
3133
- * @deprecated Use {@link SharedSlashCommand.setDefaultMemberPermissions} or {@link SharedSlashCommand.setDMPermission} instead.
3134
- */
3135
- setDefaultPermission(value) {
3136
- validateDefaultPermission(value);
3137
- Reflect.set(this, "default_permission", value);
3138
- return this;
3139
- }
3140
- /**
3141
- * Sets the default permissions a member should have in order to run the command.
3142
- *
3143
- * @remarks
3144
- * You can set this to `'0'` to disable the command by default.
3145
- * @param permissions - The permissions bit field to set
3146
- * @see {@link https://discord.com/developers/docs/interactions/application-commands#permissions}
3147
- */
3148
- setDefaultMemberPermissions(permissions) {
3149
- const permissionValue = validateDefaultMemberPermissions(permissions);
3150
- Reflect.set(this, "default_member_permissions", permissionValue);
3151
- return this;
3152
- }
3153
- /**
3154
- * Sets if the command is available in direct messages with the application.
3155
- *
3156
- * @remarks
3157
- * By default, commands are visible. This method is only for global commands.
3158
- * @param enabled - Whether the command should be enabled in direct messages
3159
- * @see {@link https://discord.com/developers/docs/interactions/application-commands#permissions}
3160
- * @deprecated
3161
- * Use {@link SharedSlashCommand.setContexts} instead.
3162
- */
3163
- setDMPermission(enabled) {
3164
- validateDMPermission(enabled);
3165
- Reflect.set(this, "dm_permission", enabled);
3166
- return this;
3167
- }
3168
- /**
3169
- * Sets whether this command is NSFW.
3170
- *
3171
- * @param nsfw - Whether this command is NSFW
3172
- */
3173
- setNSFW(nsfw = true) {
3174
- validateNSFW(nsfw);
3175
- Reflect.set(this, "nsfw", nsfw);
3176
- return this;
3177
- }
3178
- /**
3179
- * Serializes this builder to API-compatible JSON data.
3180
- *
3181
- * @remarks
3182
- * This method runs validations on the data before serializing it.
3183
- * As such, it may throw an error if the data is invalid.
3184
- */
3185
- toJSON() {
3186
- validateRequiredParameters3(this.name, this.description, this.options);
3187
- validateLocalizationMap(this.name_localizations);
3188
- validateLocalizationMap(this.description_localizations);
3189
- return {
3190
- ...this,
3191
- type: import_v1027.ApplicationCommandType.ChatInput,
3192
- options: this.options.map((option) => option.toJSON())
3193
- };
3194
- }
3195
- };
3196
-
3197
- // src/interactions/slashCommands/options/attachment.ts
3198
- var import_v1028 = require("discord-api-types/v10");
3199
-
3200
- // src/interactions/slashCommands/mixins/ApplicationCommandOptionBase.ts
3201
- var ApplicationCommandOptionBase = class extends SharedNameAndDescription {
3202
- static {
3203
- __name(this, "ApplicationCommandOptionBase");
3204
- }
3205
- /**
3206
- * Whether this option is required.
3207
- *
3208
- * @defaultValue `false`
3209
- */
3210
- required = false;
3211
- /**
3212
- * Sets whether this option is required.
3213
- *
3214
- * @param required - Whether this option should be required
3215
- */
3216
- setRequired(required) {
3217
- validateRequired(required);
3218
- Reflect.set(this, "required", required);
3219
- return this;
3220
- }
3221
- /**
3222
- * This method runs required validators on this builder.
3223
- */
3224
- runRequiredValidations() {
3225
- validateRequiredParameters3(this.name, this.description, []);
3226
- validateLocalizationMap(this.name_localizations);
3227
- validateLocalizationMap(this.description_localizations);
3228
- validateRequired(this.required);
3229
- }
3230
- };
3231
-
3232
- // src/interactions/slashCommands/options/attachment.ts
3233
- var SlashCommandAttachmentOption = class extends ApplicationCommandOptionBase {
3234
- static {
3235
- __name(this, "SlashCommandAttachmentOption");
3236
- }
3237
- /**
3238
- * The type of this option.
3239
- */
3240
- type = import_v1028.ApplicationCommandOptionType.Attachment;
3241
- /**
3242
- * {@inheritDoc ApplicationCommandOptionBase.toJSON}
3243
- */
3244
- toJSON() {
3245
- this.runRequiredValidations();
3246
- return { ...this };
3247
- }
3248
- };
3249
-
3250
- // src/interactions/slashCommands/options/boolean.ts
3251
- var import_v1029 = require("discord-api-types/v10");
3252
- var SlashCommandBooleanOption = class extends ApplicationCommandOptionBase {
3253
- static {
3254
- __name(this, "SlashCommandBooleanOption");
3255
- }
3256
- /**
3257
- * The type of this option.
3258
- */
3259
- type = import_v1029.ApplicationCommandOptionType.Boolean;
3260
- /**
3261
- * {@inheritDoc ApplicationCommandOptionBase.toJSON}
3262
- */
3263
- toJSON() {
3264
- this.runRequiredValidations();
3265
- return { ...this };
3266
- }
3267
- };
3268
-
3269
- // src/interactions/slashCommands/options/channel.ts
3270
- var import_v1031 = require("discord-api-types/v10");
3271
- var import_ts_mixer = require("ts-mixer");
3272
-
3273
- // src/interactions/slashCommands/mixins/ApplicationCommandOptionChannelTypesMixin.ts
3274
- var import_shapeshift10 = require("@sapphire/shapeshift");
3275
- var import_v1030 = require("discord-api-types/v10");
3276
- var allowedChannelTypes = [
3277
- import_v1030.ChannelType.GuildText,
3278
- import_v1030.ChannelType.GuildVoice,
3279
- import_v1030.ChannelType.GuildCategory,
3280
- import_v1030.ChannelType.GuildAnnouncement,
3281
- import_v1030.ChannelType.AnnouncementThread,
3282
- import_v1030.ChannelType.PublicThread,
3283
- import_v1030.ChannelType.PrivateThread,
3284
- import_v1030.ChannelType.GuildStageVoice,
3285
- import_v1030.ChannelType.GuildForum,
3286
- import_v1030.ChannelType.GuildMedia
3287
- ];
3288
- var channelTypesPredicate = import_shapeshift10.s.array(import_shapeshift10.s.union(allowedChannelTypes.map((type) => import_shapeshift10.s.literal(type))));
3289
- var ApplicationCommandOptionChannelTypesMixin = class {
3290
- static {
3291
- __name(this, "ApplicationCommandOptionChannelTypesMixin");
3292
- }
3293
- /**
3294
- * The channel types of this option.
3295
- */
3296
- channel_types;
3297
- /**
3298
- * Adds channel types to this option.
3299
- *
3300
- * @param channelTypes - The channel types
3301
- */
3302
- addChannelTypes(...channelTypes) {
3303
- if (this.channel_types === void 0) {
3304
- Reflect.set(this, "channel_types", []);
3305
- }
3306
- this.channel_types.push(...channelTypesPredicate.parse(normalizeArray(channelTypes)));
3307
- return this;
3308
- }
3309
- };
3310
-
3311
- // src/interactions/slashCommands/options/channel.ts
3312
- var SlashCommandChannelOption = class extends ApplicationCommandOptionBase {
3313
- /**
3314
- * The type of this option.
3315
- */
3316
- type = import_v1031.ApplicationCommandOptionType.Channel;
3317
- /**
3318
- * {@inheritDoc ApplicationCommandOptionBase.toJSON}
3319
- */
3320
- toJSON() {
3321
- this.runRequiredValidations();
3322
- return { ...this };
3323
- }
3324
- };
3325
- __name(SlashCommandChannelOption, "SlashCommandChannelOption");
3326
- SlashCommandChannelOption = __decorateClass([
3327
- (0, import_ts_mixer.mix)(ApplicationCommandOptionChannelTypesMixin)
3328
- ], SlashCommandChannelOption);
3329
-
3330
- // src/interactions/slashCommands/options/integer.ts
3331
- var import_shapeshift13 = require("@sapphire/shapeshift");
3332
- var import_v1033 = require("discord-api-types/v10");
3333
- var import_ts_mixer2 = require("ts-mixer");
3334
-
3335
- // src/interactions/slashCommands/mixins/ApplicationCommandNumericOptionMinMaxValueMixin.ts
3336
- var ApplicationCommandNumericOptionMinMaxValueMixin = class {
3337
- static {
3338
- __name(this, "ApplicationCommandNumericOptionMinMaxValueMixin");
3339
- }
3340
- /**
3341
- * The maximum value of this option.
3342
- */
3343
- max_value;
3344
- /**
3345
- * The minimum value of this option.
3346
- */
3347
- min_value;
3348
- };
3349
-
3350
- // src/interactions/slashCommands/mixins/ApplicationCommandOptionWithAutocompleteMixin.ts
3351
- var import_shapeshift11 = require("@sapphire/shapeshift");
3352
- var booleanPredicate2 = import_shapeshift11.s.boolean();
3353
- var ApplicationCommandOptionWithAutocompleteMixin = class {
3354
- static {
3355
- __name(this, "ApplicationCommandOptionWithAutocompleteMixin");
3356
- }
3357
- /**
3358
- * Whether this option utilizes autocomplete.
3359
- */
3360
- autocomplete;
3361
- /**
3362
- * The type of this option.
3363
- *
3364
- * @privateRemarks Since this is present and this is a mixin, this is needed.
3365
- */
3366
- type;
3367
- /**
3368
- * Whether this option uses autocomplete.
3369
- *
3370
- * @param autocomplete - Whether this option should use autocomplete
3371
- */
3372
- setAutocomplete(autocomplete) {
3373
- booleanPredicate2.parse(autocomplete);
3374
- if (autocomplete && "choices" in this && Array.isArray(this.choices) && this.choices.length > 0) {
3375
- throw new RangeError("Autocomplete and choices are mutually exclusive to each other.");
3376
- }
3377
- Reflect.set(this, "autocomplete", autocomplete);
3378
- return this;
3379
- }
3380
- };
3381
-
3382
- // src/interactions/slashCommands/mixins/ApplicationCommandOptionWithChoicesMixin.ts
3383
- var import_shapeshift12 = require("@sapphire/shapeshift");
3384
- var import_v1032 = require("discord-api-types/v10");
3385
- var stringPredicate = import_shapeshift12.s.string().lengthGreaterThanOrEqual(1).lengthLessThanOrEqual(100);
3386
- var numberPredicate = import_shapeshift12.s.number().greaterThan(Number.NEGATIVE_INFINITY).lessThan(Number.POSITIVE_INFINITY);
3387
- var choicesPredicate = import_shapeshift12.s.object({
3388
- name: stringPredicate,
3389
- name_localizations: localizationMapPredicate,
3390
- value: import_shapeshift12.s.union([stringPredicate, numberPredicate])
3391
- }).array();
3392
- var ApplicationCommandOptionWithChoicesMixin = class {
3393
- static {
3394
- __name(this, "ApplicationCommandOptionWithChoicesMixin");
3395
- }
3396
- /**
3397
- * The choices of this option.
3398
- */
3399
- choices;
3400
- /**
3401
- * The type of this option.
3402
- *
3403
- * @privateRemarks Since this is present and this is a mixin, this is needed.
3404
- */
3405
- type;
3406
- /**
3407
- * Adds multiple choices to this option.
3408
- *
3409
- * @param choices - The choices to add
3410
- */
3411
- addChoices(...choices) {
3412
- const normalizedChoices = normalizeArray(choices);
3413
- if (normalizedChoices.length > 0 && "autocomplete" in this && this.autocomplete) {
3414
- throw new RangeError("Autocomplete and choices are mutually exclusive to each other.");
3415
- }
3416
- choicesPredicate.parse(normalizedChoices);
3417
- if (this.choices === void 0) {
3418
- Reflect.set(this, "choices", []);
3419
- }
3420
- validateChoicesLength(normalizedChoices.length, this.choices);
3421
- for (const { name, name_localizations, value } of normalizedChoices) {
3422
- if (this.type === import_v1032.ApplicationCommandOptionType.String) {
3423
- stringPredicate.parse(value);
3424
- } else {
3425
- numberPredicate.parse(value);
3426
- }
3427
- this.choices.push({ name, name_localizations, value });
3428
- }
3429
- return this;
3430
- }
3431
- /**
3432
- * Sets multiple choices for this option.
3433
- *
3434
- * @param choices - The choices to set
3435
- */
3436
- setChoices(...choices) {
3437
- const normalizedChoices = normalizeArray(choices);
3438
- if (normalizedChoices.length > 0 && "autocomplete" in this && this.autocomplete) {
3439
- throw new RangeError("Autocomplete and choices are mutually exclusive to each other.");
3440
- }
3441
- choicesPredicate.parse(normalizedChoices);
3442
- Reflect.set(this, "choices", []);
3443
- this.addChoices(normalizedChoices);
3444
- return this;
3445
- }
3446
- };
3447
-
3448
- // src/interactions/slashCommands/options/integer.ts
3449
- var numberValidator = import_shapeshift13.s.number().int();
3450
- var SlashCommandIntegerOption = class extends ApplicationCommandOptionBase {
3451
- /**
3452
- * The type of this option.
3453
- */
3454
- type = import_v1033.ApplicationCommandOptionType.Integer;
3455
- /**
3456
- * {@inheritDoc ApplicationCommandNumericOptionMinMaxValueMixin.setMaxValue}
3457
- */
3458
- setMaxValue(max) {
3459
- numberValidator.parse(max);
3460
- Reflect.set(this, "max_value", max);
3461
- return this;
3462
- }
3463
- /**
3464
- * {@inheritDoc ApplicationCommandNumericOptionMinMaxValueMixin.setMinValue}
3465
- */
3466
- setMinValue(min) {
3467
- numberValidator.parse(min);
3468
- Reflect.set(this, "min_value", min);
3469
- return this;
3470
- }
3471
- /**
3472
- * {@inheritDoc ApplicationCommandOptionBase.toJSON}
3473
- */
3474
- toJSON() {
3475
- this.runRequiredValidations();
3476
- if (this.autocomplete && Array.isArray(this.choices) && this.choices.length > 0) {
3477
- throw new RangeError("Autocomplete and choices are mutually exclusive to each other.");
3478
- }
3479
- return { ...this };
3480
- }
3481
- };
3482
- __name(SlashCommandIntegerOption, "SlashCommandIntegerOption");
3483
- SlashCommandIntegerOption = __decorateClass([
3484
- (0, import_ts_mixer2.mix)(
3485
- ApplicationCommandNumericOptionMinMaxValueMixin,
3486
- ApplicationCommandOptionWithAutocompleteMixin,
3487
- ApplicationCommandOptionWithChoicesMixin
3488
- )
3489
- ], SlashCommandIntegerOption);
3490
-
3491
- // src/interactions/slashCommands/options/mentionable.ts
3492
- var import_v1034 = require("discord-api-types/v10");
3493
- var SlashCommandMentionableOption = class extends ApplicationCommandOptionBase {
3494
- static {
3495
- __name(this, "SlashCommandMentionableOption");
3496
- }
3497
- /**
3498
- * The type of this option.
3499
- */
3500
- type = import_v1034.ApplicationCommandOptionType.Mentionable;
3501
- /**
3502
- * {@inheritDoc ApplicationCommandOptionBase.toJSON}
3503
- */
3504
- toJSON() {
3505
- this.runRequiredValidations();
3506
- return { ...this };
3507
- }
3508
- };
3509
-
3510
- // src/interactions/slashCommands/options/number.ts
3511
- var import_shapeshift14 = require("@sapphire/shapeshift");
3512
- var import_v1035 = require("discord-api-types/v10");
3513
- var import_ts_mixer3 = require("ts-mixer");
3514
- var numberValidator2 = import_shapeshift14.s.number();
3515
- var SlashCommandNumberOption = class extends ApplicationCommandOptionBase {
3516
- /**
3517
- * The type of this option.
3518
- */
3519
- type = import_v1035.ApplicationCommandOptionType.Number;
3520
- /**
3521
- * {@inheritDoc ApplicationCommandNumericOptionMinMaxValueMixin.setMaxValue}
3522
- */
3523
- setMaxValue(max) {
3524
- numberValidator2.parse(max);
3525
- Reflect.set(this, "max_value", max);
3526
- return this;
3527
- }
3528
- /**
3529
- * {@inheritDoc ApplicationCommandNumericOptionMinMaxValueMixin.setMinValue}
3530
- */
3531
- setMinValue(min) {
3532
- numberValidator2.parse(min);
3533
- Reflect.set(this, "min_value", min);
3534
- return this;
3535
- }
3536
- /**
3537
- * {@inheritDoc ApplicationCommandOptionBase.toJSON}
3538
- */
3539
- toJSON() {
3540
- this.runRequiredValidations();
3541
- if (this.autocomplete && Array.isArray(this.choices) && this.choices.length > 0) {
3542
- throw new RangeError("Autocomplete and choices are mutually exclusive to each other.");
3543
- }
3544
- return { ...this };
3545
- }
3546
- };
3547
- __name(SlashCommandNumberOption, "SlashCommandNumberOption");
3548
- SlashCommandNumberOption = __decorateClass([
3549
- (0, import_ts_mixer3.mix)(
3550
- ApplicationCommandNumericOptionMinMaxValueMixin,
3551
- ApplicationCommandOptionWithAutocompleteMixin,
3552
- ApplicationCommandOptionWithChoicesMixin
3553
- )
3554
- ], SlashCommandNumberOption);
3555
-
3556
- // src/interactions/slashCommands/options/role.ts
3557
- var import_v1036 = require("discord-api-types/v10");
3558
- var SlashCommandRoleOption = class extends ApplicationCommandOptionBase {
3559
- static {
3560
- __name(this, "SlashCommandRoleOption");
3561
- }
3562
- /**
3563
- * The type of this option.
3564
- */
3565
- type = import_v1036.ApplicationCommandOptionType.Role;
3566
- /**
3567
- * {@inheritDoc ApplicationCommandOptionBase.toJSON}
3568
- */
3569
- toJSON() {
3570
- this.runRequiredValidations();
3571
- return { ...this };
3572
- }
3573
- };
3574
-
3575
- // src/interactions/slashCommands/options/string.ts
3576
- var import_shapeshift15 = require("@sapphire/shapeshift");
3577
- var import_v1037 = require("discord-api-types/v10");
3578
- var import_ts_mixer4 = require("ts-mixer");
3579
- var minLengthValidator2 = import_shapeshift15.s.number().greaterThanOrEqual(0).lessThanOrEqual(6e3);
3580
- var maxLengthValidator2 = import_shapeshift15.s.number().greaterThanOrEqual(1).lessThanOrEqual(6e3);
3581
- var SlashCommandStringOption = class extends ApplicationCommandOptionBase {
3582
- /**
3583
- * The type of this option.
3584
- */
3585
- type = import_v1037.ApplicationCommandOptionType.String;
3586
- /**
3587
- * The maximum length of this option.
3588
- */
3589
- max_length;
3590
- /**
3591
- * The minimum length of this option.
3592
- */
3593
- min_length;
3594
- /**
3595
- * Sets the maximum length of this string option.
3596
- *
3597
- * @param max - The maximum length this option can be
3598
- */
3599
- setMaxLength(max) {
3600
- maxLengthValidator2.parse(max);
3601
- Reflect.set(this, "max_length", max);
3602
- return this;
3603
- }
3604
- /**
3605
- * Sets the minimum length of this string option.
3606
- *
3607
- * @param min - The minimum length this option can be
3608
- */
3609
- setMinLength(min) {
3610
- minLengthValidator2.parse(min);
3611
- Reflect.set(this, "min_length", min);
3612
- return this;
3613
- }
3614
- /**
3615
- * {@inheritDoc ApplicationCommandOptionBase.toJSON}
3616
- */
3617
- toJSON() {
3618
- this.runRequiredValidations();
3619
- if (this.autocomplete && Array.isArray(this.choices) && this.choices.length > 0) {
3620
- throw new RangeError("Autocomplete and choices are mutually exclusive to each other.");
3621
- }
3622
- return { ...this };
3623
- }
3624
- };
3625
- __name(SlashCommandStringOption, "SlashCommandStringOption");
3626
- SlashCommandStringOption = __decorateClass([
3627
- (0, import_ts_mixer4.mix)(ApplicationCommandOptionWithAutocompleteMixin, ApplicationCommandOptionWithChoicesMixin)
3628
- ], SlashCommandStringOption);
3629
-
3630
- // src/interactions/slashCommands/options/user.ts
3631
- var import_v1038 = require("discord-api-types/v10");
3632
- var SlashCommandUserOption = class extends ApplicationCommandOptionBase {
3633
- static {
3634
- __name(this, "SlashCommandUserOption");
3635
- }
3636
- /**
3637
- * The type of this option.
3638
- */
3639
- type = import_v1038.ApplicationCommandOptionType.User;
3640
- /**
3641
- * {@inheritDoc ApplicationCommandOptionBase.toJSON}
3642
- */
3643
- toJSON() {
3644
- this.runRequiredValidations();
3645
- return { ...this };
3646
- }
3647
- };
3648
-
3649
- // src/interactions/slashCommands/mixins/SharedSlashCommandOptions.ts
3650
- var SharedSlashCommandOptions = class {
3651
- static {
3652
- __name(this, "SharedSlashCommandOptions");
3653
- }
3654
- options;
3655
- /**
3656
- * Adds a boolean option.
3657
- *
3658
- * @param input - A function that returns an option builder or an already built builder
3659
- */
3660
- addBooleanOption(input) {
3661
- return this._sharedAddOptionMethod(input, SlashCommandBooleanOption);
3662
- }
3663
- /**
3664
- * Adds a user option.
3665
- *
3666
- * @param input - A function that returns an option builder or an already built builder
3667
- */
3668
- addUserOption(input) {
3669
- return this._sharedAddOptionMethod(input, SlashCommandUserOption);
3670
- }
3671
- /**
3672
- * Adds a channel option.
3673
- *
3674
- * @param input - A function that returns an option builder or an already built builder
3675
- */
3676
- addChannelOption(input) {
3677
- return this._sharedAddOptionMethod(input, SlashCommandChannelOption);
3678
- }
3679
- /**
3680
- * Adds a role option.
3681
- *
3682
- * @param input - A function that returns an option builder or an already built builder
3683
- */
3684
- addRoleOption(input) {
3685
- return this._sharedAddOptionMethod(input, SlashCommandRoleOption);
3686
- }
3687
- /**
3688
- * Adds an attachment option.
3689
- *
3690
- * @param input - A function that returns an option builder or an already built builder
3691
- */
3692
- addAttachmentOption(input) {
3693
- return this._sharedAddOptionMethod(input, SlashCommandAttachmentOption);
3694
- }
3695
- /**
3696
- * Adds a mentionable option.
3697
- *
3698
- * @param input - A function that returns an option builder or an already built builder
3699
- */
3700
- addMentionableOption(input) {
3701
- return this._sharedAddOptionMethod(input, SlashCommandMentionableOption);
3702
- }
3703
- /**
3704
- * Adds a string option.
3705
- *
3706
- * @param input - A function that returns an option builder or an already built builder
3707
- */
3708
- addStringOption(input) {
3709
- return this._sharedAddOptionMethod(input, SlashCommandStringOption);
3710
- }
3711
- /**
3712
- * Adds an integer option.
3713
- *
3714
- * @param input - A function that returns an option builder or an already built builder
3715
- */
3716
- addIntegerOption(input) {
3717
- return this._sharedAddOptionMethod(input, SlashCommandIntegerOption);
3718
- }
3719
- /**
3720
- * Adds a number option.
3721
- *
3722
- * @param input - A function that returns an option builder or an already built builder
3723
- */
3724
- addNumberOption(input) {
3725
- return this._sharedAddOptionMethod(input, SlashCommandNumberOption);
3726
- }
3727
- /**
3728
- * Where the actual adding magic happens. ✨
3729
- *
3730
- * @param input - The input. What else?
3731
- * @param Instance - The instance of whatever is being added
3732
- * @internal
3733
- */
3734
- _sharedAddOptionMethod(input, Instance) {
3735
- const { options } = this;
3736
- validateMaxOptionsLength(options);
3737
- const result = typeof input === "function" ? input(new Instance()) : input;
3738
- assertReturnOfBuilder2(result, Instance);
3739
- options.push(result);
3740
- return this;
3741
- }
3742
- };
3743
-
3744
- // src/interactions/slashCommands/SlashCommandSubcommands.ts
3745
- var import_v1039 = require("discord-api-types/v10");
3746
- var import_ts_mixer5 = require("ts-mixer");
3747
- var SlashCommandSubcommandGroupBuilder = class {
3748
- /**
3749
- * The name of this subcommand group.
3750
- */
3751
- name = void 0;
3752
- /**
3753
- * The description of this subcommand group.
3754
- */
3755
- description = void 0;
3756
- /**
3757
- * The subcommands within this subcommand group.
3758
- */
3759
- options = [];
3760
- /**
3761
- * Adds a new subcommand to this group.
3762
- *
3763
- * @param input - A function that returns a subcommand builder or an already built builder
3764
- */
3765
- addSubcommand(input) {
3766
- const { options } = this;
3767
- validateMaxOptionsLength(options);
3768
- const result = typeof input === "function" ? input(new SlashCommandSubcommandBuilder()) : input;
3769
- assertReturnOfBuilder2(result, SlashCommandSubcommandBuilder);
3770
- options.push(result);
3771
- return this;
3772
- }
3773
- /**
3774
- * Serializes this builder to API-compatible JSON data.
3775
- *
3776
- * @remarks
3777
- * This method runs validations on the data before serializing it.
3778
- * As such, it may throw an error if the data is invalid.
3779
- */
3780
- toJSON() {
3781
- validateRequiredParameters3(this.name, this.description, this.options);
3782
- return {
3783
- type: import_v1039.ApplicationCommandOptionType.SubcommandGroup,
3784
- name: this.name,
3785
- name_localizations: this.name_localizations,
3786
- description: this.description,
3787
- description_localizations: this.description_localizations,
3788
- options: this.options.map((option) => option.toJSON())
3789
- };
3790
- }
3791
- };
3792
- __name(SlashCommandSubcommandGroupBuilder, "SlashCommandSubcommandGroupBuilder");
3793
- SlashCommandSubcommandGroupBuilder = __decorateClass([
3794
- (0, import_ts_mixer5.mix)(SharedNameAndDescription)
3795
- ], SlashCommandSubcommandGroupBuilder);
3796
- var SlashCommandSubcommandBuilder = class {
3797
- /**
3798
- * The name of this subcommand.
3799
- */
3800
- name = void 0;
3801
- /**
3802
- * The description of this subcommand.
3803
- */
3804
- description = void 0;
3805
- /**
3806
- * The options within this subcommand.
3807
- */
3808
- options = [];
3809
- /**
3810
- * Serializes this builder to API-compatible JSON data.
3811
- *
3812
- * @remarks
3813
- * This method runs validations on the data before serializing it.
3814
- * As such, it may throw an error if the data is invalid.
3815
- */
3816
- toJSON() {
3817
- validateRequiredParameters3(this.name, this.description, this.options);
3818
- return {
3819
- type: import_v1039.ApplicationCommandOptionType.Subcommand,
3820
- name: this.name,
3821
- name_localizations: this.name_localizations,
3822
- description: this.description,
3823
- description_localizations: this.description_localizations,
3824
- options: this.options.map((option) => option.toJSON())
3825
- };
3826
- }
3827
- };
3828
- __name(SlashCommandSubcommandBuilder, "SlashCommandSubcommandBuilder");
3829
- SlashCommandSubcommandBuilder = __decorateClass([
3830
- (0, import_ts_mixer5.mix)(SharedNameAndDescription, SharedSlashCommandOptions)
3831
- ], SlashCommandSubcommandBuilder);
3832
-
3833
- // src/interactions/slashCommands/mixins/SharedSubcommands.ts
3834
- var SharedSlashCommandSubcommands = class {
3835
- static {
3836
- __name(this, "SharedSlashCommandSubcommands");
3837
- }
3838
- options = [];
3839
- /**
3840
- * Adds a new subcommand group to this command.
3841
- *
3842
- * @param input - A function that returns a subcommand group builder or an already built builder
3843
- */
3844
- addSubcommandGroup(input) {
3845
- const { options } = this;
3846
- validateMaxOptionsLength(options);
3847
- const result = typeof input === "function" ? input(new SlashCommandSubcommandGroupBuilder()) : input;
3848
- assertReturnOfBuilder2(result, SlashCommandSubcommandGroupBuilder);
3849
- options.push(result);
3850
- return this;
3851
- }
3852
- /**
3853
- * Adds a new subcommand to this command.
3854
- *
3855
- * @param input - A function that returns a subcommand builder or an already built builder
3856
- */
3857
- addSubcommand(input) {
3858
- const { options } = this;
3859
- validateMaxOptionsLength(options);
3860
- const result = typeof input === "function" ? input(new SlashCommandSubcommandBuilder()) : input;
3861
- assertReturnOfBuilder2(result, SlashCommandSubcommandBuilder);
3862
- options.push(result);
3863
- return this;
3864
- }
3865
- };
3866
-
3867
- // src/interactions/slashCommands/SlashCommandBuilder.ts
3868
- var SlashCommandBuilder = class {
3869
- /**
3870
- * The name of this command.
3871
- */
3872
- name = void 0;
3873
- /**
3874
- * The name localizations of this command.
3875
- */
3876
- name_localizations;
3877
- /**
3878
- * The description of this command.
3879
- */
3880
- description = void 0;
3881
- /**
3882
- * The description localizations of this command.
3883
- */
3884
- description_localizations;
3885
- /**
3886
- * The options of this command.
3887
- */
3888
- options = [];
3889
- /**
3890
- * The contexts for this command.
3891
- */
3892
- contexts;
3893
- /**
3894
- * Whether this command is enabled by default when the application is added to a guild.
3895
- *
3896
- * @deprecated Use {@link SharedSlashCommand.setDefaultMemberPermissions} or {@link SharedSlashCommand.setDMPermission} instead.
3897
- */
3898
- default_permission = void 0;
3899
- /**
3900
- * The set of permissions represented as a bit set for the command.
3901
- */
3902
- default_member_permissions = void 0;
3903
- /**
3904
- * Indicates whether the command is available in direct messages with the application.
3905
- *
3906
- * @remarks
3907
- * By default, commands are visible. This property is only for global commands.
3908
- * @deprecated
3909
- * Use {@link SlashCommandBuilder.contexts} instead.
3910
- */
3911
- dm_permission = void 0;
3912
- /**
3913
- * The integration types for this command.
3914
- */
3915
- integration_types;
3916
- /**
3917
- * Whether this command is NSFW.
3918
- */
3919
- nsfw = void 0;
3920
- };
3921
- __name(SlashCommandBuilder, "SlashCommandBuilder");
3922
- SlashCommandBuilder = __decorateClass([
3923
- (0, import_ts_mixer6.mix)(SharedSlashCommandOptions, SharedNameAndDescription, SharedSlashCommandSubcommands, SharedSlashCommand)
3924
- ], SlashCommandBuilder);
3925
-
3926
- // src/interactions/contextMenuCommands/Assertions.ts
3927
- var Assertions_exports10 = {};
3928
- __export(Assertions_exports10, {
3929
- contextsPredicate: () => contextsPredicate2,
3930
- integrationTypesPredicate: () => integrationTypesPredicate2,
3931
- validateDMPermission: () => validateDMPermission2,
3932
- validateDefaultMemberPermissions: () => validateDefaultMemberPermissions2,
3933
- validateDefaultPermission: () => validateDefaultPermission2,
3934
- validateName: () => validateName2,
3935
- validateRequiredParameters: () => validateRequiredParameters4,
3936
- validateType: () => validateType
3937
- });
3938
- var import_shapeshift16 = require("@sapphire/shapeshift");
3939
- var import_v1040 = require("discord-api-types/v10");
3940
- var namePredicate2 = import_shapeshift16.s.string().lengthGreaterThanOrEqual(1).lengthLessThanOrEqual(32).regex(/\S/).setValidationEnabled(isValidationEnabled);
3941
- var typePredicate = import_shapeshift16.s.union([import_shapeshift16.s.literal(import_v1040.ApplicationCommandType.User), import_shapeshift16.s.literal(import_v1040.ApplicationCommandType.Message)]).setValidationEnabled(isValidationEnabled);
3942
- var booleanPredicate3 = import_shapeshift16.s.boolean();
3943
- function validateDefaultPermission2(value) {
3944
- booleanPredicate3.parse(value);
3945
- }
3946
- __name(validateDefaultPermission2, "validateDefaultPermission");
3947
- function validateName2(name) {
3948
- namePredicate2.parse(name);
3949
- }
3950
- __name(validateName2, "validateName");
3951
- function validateType(type) {
3952
- typePredicate.parse(type);
3953
- }
3954
- __name(validateType, "validateType");
3955
- function validateRequiredParameters4(name, type) {
3956
- validateName2(name);
3957
- validateType(type);
3958
- }
3959
- __name(validateRequiredParameters4, "validateRequiredParameters");
3960
- var dmPermissionPredicate2 = import_shapeshift16.s.boolean().nullish();
3961
- function validateDMPermission2(value) {
3962
- dmPermissionPredicate2.parse(value);
3963
- }
3964
- __name(validateDMPermission2, "validateDMPermission");
3965
- var memberPermissionPredicate2 = import_shapeshift16.s.union([
3966
- import_shapeshift16.s.bigint().transform((value) => value.toString()),
3967
- import_shapeshift16.s.number().safeInt().transform((value) => value.toString()),
3968
- import_shapeshift16.s.string().regex(/^\d+$/)
3969
- ]).nullish();
3970
- function validateDefaultMemberPermissions2(permissions) {
3971
- return memberPermissionPredicate2.parse(permissions);
3972
- }
3973
- __name(validateDefaultMemberPermissions2, "validateDefaultMemberPermissions");
3974
- var contextsPredicate2 = import_shapeshift16.s.array(
3975
- import_shapeshift16.s.nativeEnum(import_v1040.InteractionContextType).setValidationEnabled(isValidationEnabled)
3976
- );
3977
- var integrationTypesPredicate2 = import_shapeshift16.s.array(
3978
- import_shapeshift16.s.nativeEnum(import_v1040.ApplicationIntegrationType).setValidationEnabled(isValidationEnabled)
3979
- );
3980
-
3981
- // src/interactions/contextMenuCommands/ContextMenuCommandBuilder.ts
3982
- var ContextMenuCommandBuilder = class {
3983
- static {
3984
- __name(this, "ContextMenuCommandBuilder");
3985
- }
3986
- /**
3987
- * The name of this command.
3988
- */
3989
- name = void 0;
3990
- /**
3991
- * The name localizations of this command.
3992
- */
3993
- name_localizations;
3994
- /**
3995
- * The type of this command.
3996
- */
3997
- type = void 0;
3998
- /**
3999
- * The contexts for this command.
4000
- */
4001
- contexts;
4002
- /**
4003
- * Whether this command is enabled by default when the application is added to a guild.
4004
- *
4005
- * @deprecated Use {@link ContextMenuCommandBuilder.setDefaultMemberPermissions} or {@link ContextMenuCommandBuilder.setDMPermission} instead.
4006
- */
4007
- default_permission = void 0;
4008
- /**
4009
- * The set of permissions represented as a bit set for the command.
4010
- */
4011
- default_member_permissions = void 0;
4012
- /**
4013
- * Indicates whether the command is available in direct messages with the application.
4014
- *
4015
- * @remarks
4016
- * By default, commands are visible. This property is only for global commands.
4017
- * @deprecated
4018
- * Use {@link ContextMenuCommandBuilder.contexts} instead.
4019
- */
4020
- dm_permission = void 0;
4021
- /**
4022
- * The integration types for this command.
4023
- */
4024
- integration_types;
4025
- /**
4026
- * Sets the contexts of this command.
4027
- *
4028
- * @param contexts - The contexts
4029
- */
4030
- setContexts(...contexts) {
4031
- Reflect.set(this, "contexts", contextsPredicate2.parse(normalizeArray(contexts)));
4032
- return this;
4033
- }
4034
- /**
4035
- * Sets integration types of this command.
4036
- *
4037
- * @param integrationTypes - The integration types
4038
- */
4039
- setIntegrationTypes(...integrationTypes) {
4040
- Reflect.set(this, "integration_types", integrationTypesPredicate2.parse(normalizeArray(integrationTypes)));
4041
- return this;
4042
- }
4043
- /**
4044
- * Sets the name of this command.
4045
- *
4046
- * @param name - The name to use
4047
- */
4048
- setName(name) {
4049
- validateName2(name);
4050
- Reflect.set(this, "name", name);
4051
- return this;
4052
- }
4053
- /**
4054
- * Sets the type of this command.
4055
- *
4056
- * @param type - The type to use
4057
- */
4058
- setType(type) {
4059
- validateType(type);
4060
- Reflect.set(this, "type", type);
4061
- return this;
4062
- }
4063
- /**
4064
- * Sets whether the command is enabled by default when the application is added to a guild.
4065
- *
4066
- * @remarks
4067
- * If set to `false`, you will have to later `PUT` the permissions for this command.
4068
- * @param value - Whether to enable this command by default
4069
- * @see {@link https://discord.com/developers/docs/interactions/application-commands#permissions}
4070
- * @deprecated Use {@link ContextMenuCommandBuilder.setDefaultMemberPermissions} or {@link ContextMenuCommandBuilder.setDMPermission} instead.
4071
- */
4072
- setDefaultPermission(value) {
4073
- validateDefaultPermission2(value);
4074
- Reflect.set(this, "default_permission", value);
4075
- return this;
4076
- }
4077
- /**
4078
- * Sets the default permissions a member should have in order to run this command.
4079
- *
4080
- * @remarks
4081
- * You can set this to `'0'` to disable the command by default.
4082
- * @param permissions - The permissions bit field to set
4083
- * @see {@link https://discord.com/developers/docs/interactions/application-commands#permissions}
4084
- */
4085
- setDefaultMemberPermissions(permissions) {
4086
- const permissionValue = validateDefaultMemberPermissions2(permissions);
4087
- Reflect.set(this, "default_member_permissions", permissionValue);
4088
- return this;
4089
- }
4090
- /**
4091
- * Sets if the command is available in direct messages with the application.
4092
- *
4093
- * @remarks
4094
- * By default, commands are visible. This method is only for global commands.
4095
- * @param enabled - Whether the command should be enabled in direct messages
4096
- * @see {@link https://discord.com/developers/docs/interactions/application-commands#permissions}
4097
- * @deprecated Use {@link ContextMenuCommandBuilder.setContexts} instead.
4098
- */
4099
- setDMPermission(enabled) {
4100
- validateDMPermission2(enabled);
4101
- Reflect.set(this, "dm_permission", enabled);
4102
- return this;
4103
- }
4104
- /**
4105
- * Sets a name localization for this command.
4106
- *
4107
- * @param locale - The locale to set
4108
- * @param localizedName - The localized name for the given `locale`
4109
- */
4110
- setNameLocalization(locale, localizedName) {
4111
- if (!this.name_localizations) {
4112
- Reflect.set(this, "name_localizations", {});
4113
- }
4114
- const parsedLocale = validateLocale(locale);
4115
- if (localizedName === null) {
4116
- this.name_localizations[parsedLocale] = null;
4117
- return this;
4118
- }
4119
- validateName2(localizedName);
4120
- this.name_localizations[parsedLocale] = localizedName;
4121
- return this;
4122
- }
4123
- /**
4124
- * Sets the name localizations for this command.
4125
- *
4126
- * @param localizedNames - The object of localized names to set
4127
- */
4128
- setNameLocalizations(localizedNames) {
4129
- if (localizedNames === null) {
4130
- Reflect.set(this, "name_localizations", null);
4131
- return this;
4132
- }
4133
- Reflect.set(this, "name_localizations", {});
4134
- for (const args of Object.entries(localizedNames))
4135
- this.setNameLocalization(...args);
4136
- return this;
4137
- }
4138
- /**
4139
- * Serializes this builder to API-compatible JSON data.
4140
- *
4141
- * @remarks
4142
- * This method runs validations on the data before serializing it.
4143
- * As such, it may throw an error if the data is invalid.
4144
- */
4145
- toJSON() {
4146
- validateRequiredParameters4(this.name, this.type);
4147
- validateLocalizationMap(this.name_localizations);
4148
- return { ...this };
4149
- }
4150
- };
4151
-
4152
- // src/util/componentUtil.ts
4153
- function embedLength(data) {
4154
- return (data.title?.length ?? 0) + (data.description?.length ?? 0) + (data.fields?.reduce((prev, curr) => prev + curr.name.length + curr.value.length, 0) ?? 0) + (data.footer?.text.length ?? 0) + (data.author?.name.length ?? 0);
4155
- }
4156
- __name(embedLength, "embedLength");
4157
-
4158
- // src/index.ts
4159
- var version = "1.13.1";
4160
- // Annotate the CommonJS export names for ESM import in node:
4161
- 0 && (module.exports = {
4162
- ActionRowBuilder,
4163
- ApplicationCommandNumericOptionMinMaxValueMixin,
4164
- ApplicationCommandOptionBase,
4165
- ApplicationCommandOptionChannelTypesMixin,
4166
- ApplicationCommandOptionWithAutocompleteMixin,
4167
- ApplicationCommandOptionWithChoicesMixin,
4168
- BaseSelectMenuBuilder,
4169
- ButtonBuilder,
4170
- ChannelSelectMenuBuilder,
4171
- ComponentAssertions,
4172
- ComponentBuilder,
4173
- ComponentsV2Assertions,
4174
- ContainerBuilder,
4175
- ContextMenuCommandAssertions,
4176
- ContextMenuCommandBuilder,
4177
- EmbedAssertions,
4178
- EmbedBuilder,
4179
- FileBuilder,
4180
- FileUploadAssertions,
4181
- FileUploadBuilder,
4182
- LabelAssertions,
4183
- LabelBuilder,
4184
- MediaGalleryBuilder,
4185
- MediaGalleryItemBuilder,
4186
- MentionableSelectMenuBuilder,
4187
- ModalAssertions,
4188
- ModalBuilder,
4189
- RoleSelectMenuBuilder,
4190
- SectionBuilder,
4191
- SelectMenuAssertions,
4192
- SelectMenuBuilder,
4193
- SelectMenuOptionBuilder,
4194
- SeparatorBuilder,
4195
- SharedNameAndDescription,
4196
- SharedSlashCommand,
4197
- SharedSlashCommandOptions,
4198
- SharedSlashCommandSubcommands,
4199
- SlashCommandAssertions,
4200
- SlashCommandAttachmentOption,
4201
- SlashCommandBooleanOption,
4202
- SlashCommandBuilder,
4203
- SlashCommandChannelOption,
4204
- SlashCommandIntegerOption,
4205
- SlashCommandMentionableOption,
4206
- SlashCommandNumberOption,
4207
- SlashCommandRoleOption,
4208
- SlashCommandStringOption,
4209
- SlashCommandSubcommandBuilder,
4210
- SlashCommandSubcommandGroupBuilder,
4211
- SlashCommandUserOption,
4212
- StringSelectMenuBuilder,
4213
- StringSelectMenuOptionBuilder,
4214
- TextDisplayBuilder,
4215
- TextInputAssertions,
4216
- TextInputBuilder,
4217
- ThumbnailBuilder,
4218
- UserSelectMenuBuilder,
4219
- createComponentBuilder,
4220
- disableValidators,
4221
- embedLength,
4222
- enableValidators,
4223
- isValidationEnabled,
4224
- normalizeArray,
4225
- resolveBuilder,
4226
- version,
4227
- ...require("@discordjs/formatters")
4228
- });
4229
- //# sourceMappingURL=index.js.map