@fluxerjs/core 1.1.9 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Channel-JFQXR7SZ.mjs → Channel-4YUSB2MM.mjs} +1 -1
- package/dist/{ClientUser-2OHUFUV5.mjs → ClientUser-ET7FW3XL.mjs} +1 -1
- package/dist/{Guild-3PLQFT2I.mjs → Guild-4U4U422Z.mjs} +1 -1
- package/dist/{Message-QNWAPT55.mjs → Message-R7KSI5YU.mjs} +1 -1
- package/dist/{MessageReaction-MUBQ6GIN.mjs → MessageReaction-EYO7AJTL.mjs} +1 -1
- package/dist/{Webhook-EARQN5EG.mjs → Webhook-LWYP2BMI.mjs} +1 -1
- package/dist/{chunk-FHFXUKFP.mjs → chunk-3JVE6RW7.mjs} +2 -2
- package/dist/{chunk-TDQUAKUL.mjs → chunk-75ODDXY3.mjs} +1 -1
- package/dist/{chunk-4OEOU7G7.mjs → chunk-HVCL7QLT.mjs} +21 -3
- package/dist/{chunk-DJQXAQLR.mjs → chunk-IRDYSGQO.mjs} +7 -7
- package/dist/{chunk-JW4BRX5E.mjs → chunk-U33GNMEZ.mjs} +2 -2
- package/dist/{chunk-4SWR3ZEZ.mjs → chunk-YGXCMETR.mjs} +16 -3
- package/dist/guildUtils-FTEGCNNJ.mjs +17 -0
- package/dist/index.d.mts +84 -11
- package/dist/index.d.ts +84 -11
- package/dist/index.js +183 -31
- package/dist/index.mjs +146 -51
- package/package.json +7 -7
- package/dist/Channel-2WNJ445K.mjs +0 -17
- package/dist/Channel-3TAZVAC5.mjs +0 -21
- package/dist/Channel-4WVFDOCG.mjs +0 -22
- package/dist/Channel-ADRBK5JN.mjs +0 -19
- package/dist/Channel-AMX4IOLY.mjs +0 -20
- package/dist/Channel-BEZOW4VC.mjs +0 -17
- package/dist/Channel-BLJMK4T5.mjs +0 -19
- package/dist/Channel-DPLLHL7Y.mjs +0 -19
- package/dist/Channel-DTJWTA4N.mjs +0 -20
- package/dist/Channel-ELXWZIY4.mjs +0 -20
- package/dist/Channel-EYNPKHH2.mjs +0 -20
- package/dist/Channel-EZAKOCLZ.mjs +0 -19
- package/dist/Channel-EZSBZJTJ.mjs +0 -20
- package/dist/Channel-HBKXUNL5.mjs +0 -22
- package/dist/Channel-HK7VT35N.mjs +0 -22
- package/dist/Channel-HM2UY4DN.mjs +0 -17
- package/dist/Channel-ICWNKXBR.mjs +0 -19
- package/dist/Channel-IESEJJGP.mjs +0 -22
- package/dist/Channel-IGCIDQB3.mjs +0 -19
- package/dist/Channel-IKL3SJXN.mjs +0 -17
- package/dist/Channel-KILNV5V3.mjs +0 -17
- package/dist/Channel-KOTARBSF.mjs +0 -17
- package/dist/Channel-L6UE2MAF.mjs +0 -22
- package/dist/Channel-LPAK4B5K.mjs +0 -20
- package/dist/Channel-LXEGJ3BH.mjs +0 -20
- package/dist/Channel-MGABB7NZ.mjs +0 -19
- package/dist/Channel-MS2XLT5H.mjs +0 -19
- package/dist/Channel-MXKULRP2.mjs +0 -19
- package/dist/Channel-NBJUUPIA.mjs +0 -22
- package/dist/Channel-NFVAR3VH.mjs +0 -19
- package/dist/Channel-NKQB7NPD.mjs +0 -20
- package/dist/Channel-ON7O3D3M.mjs +0 -17
- package/dist/Channel-OSOB6ELO.mjs +0 -19
- package/dist/Channel-PCUCLDOG.mjs +0 -22
- package/dist/Channel-QEJBBSOB.mjs +0 -20
- package/dist/Channel-RB4X65FA.mjs +0 -19
- package/dist/Channel-SM7NMKEO.mjs +0 -19
- package/dist/Channel-TOAQGSRX.mjs +0 -17
- package/dist/Channel-UHN4IOM5.mjs +0 -19
- package/dist/Channel-UNCURQZU.mjs +0 -19
- package/dist/Channel-VENHOL7S.mjs +0 -17
- package/dist/Channel-VFCLGG5D.mjs +0 -22
- package/dist/Channel-WDHLDQJC.mjs +0 -22
- package/dist/Channel-WJZZSNML.mjs +0 -21
- package/dist/Channel-XUJNTC3R.mjs +0 -21
- package/dist/Channel-YB3LWDHZ.mjs +0 -22
- package/dist/Channel-YVGPVOVB.mjs +0 -17
- package/dist/Channel-ZABU3K5W.mjs +0 -19
- package/dist/Channel-ZNYZSC7R.mjs +0 -20
- package/dist/ClientUser-35IVTH2S.mjs +0 -8
- package/dist/ClientUser-4MC4EFLT.mjs +0 -8
- package/dist/ClientUser-4TYNCHEP.mjs +0 -7
- package/dist/ClientUser-576UGSIO.mjs +0 -8
- package/dist/ClientUser-5DS73MJV.mjs +0 -8
- package/dist/ClientUser-5KQNQHUB.mjs +0 -8
- package/dist/ClientUser-5NZXMF6I.mjs +0 -8
- package/dist/ClientUser-6HBAPU6H.mjs +0 -8
- package/dist/ClientUser-76LLHLHL.mjs +0 -8
- package/dist/ClientUser-7CQO74QQ.mjs +0 -8
- package/dist/ClientUser-A73AHVOW.mjs +0 -8
- package/dist/ClientUser-AJLODDUV.mjs +0 -8
- package/dist/ClientUser-ALGC4FNY.mjs +0 -8
- package/dist/ClientUser-BKDGVNAY.mjs +0 -8
- package/dist/ClientUser-CDU2QEMV.mjs +0 -8
- package/dist/ClientUser-D3ZNDAJU.mjs +0 -8
- package/dist/ClientUser-DJO2FS7P.mjs +0 -8
- package/dist/ClientUser-GBD34QB5.mjs +0 -9
- package/dist/ClientUser-GISPHEM6.mjs +0 -8
- package/dist/ClientUser-ISZ3MTSZ.mjs +0 -8
- package/dist/ClientUser-J6HQVSDJ.mjs +0 -9
- package/dist/ClientUser-JCRVGIJL.mjs +0 -8
- package/dist/ClientUser-JG4EX6F4.mjs +0 -8
- package/dist/ClientUser-K2T5J3YS.mjs +0 -8
- package/dist/ClientUser-KWOQRQPD.mjs +0 -8
- package/dist/ClientUser-LBK6K4YD.mjs +0 -8
- package/dist/ClientUser-LLL6WX35.mjs +0 -8
- package/dist/ClientUser-MOMS7WLQ.mjs +0 -8
- package/dist/ClientUser-N7ZXYAQ3.mjs +0 -8
- package/dist/ClientUser-OGDA7D77.mjs +0 -8
- package/dist/ClientUser-PXAAKR2P.mjs +0 -8
- package/dist/ClientUser-QBJLDW5Y.mjs +0 -8
- package/dist/ClientUser-QQXLZ5WP.mjs +0 -8
- package/dist/ClientUser-RDGNVUVQ.mjs +0 -8
- package/dist/ClientUser-RNDKHQ3Z.mjs +0 -9
- package/dist/ClientUser-RXOB6K6C.mjs +0 -8
- package/dist/ClientUser-TN2LZ6NT.mjs +0 -8
- package/dist/ClientUser-TRA2WERQ.mjs +0 -8
- package/dist/ClientUser-U5TR5GIT.mjs +0 -8
- package/dist/ClientUser-UKG5K744.mjs +0 -8
- package/dist/ClientUser-V43WRWTN.mjs +0 -8
- package/dist/ClientUser-VZ2JS6RD.mjs +0 -8
- package/dist/ClientUser-WFID4IXD.mjs +0 -8
- package/dist/ClientUser-WWXUMO5O.mjs +0 -8
- package/dist/ClientUser-XX2PE3TB.mjs +0 -8
- package/dist/ClientUser-YEZNAK3W.mjs +0 -8
- package/dist/ClientUser-YQXVRO2A.mjs +0 -8
- package/dist/ClientUser-ZDE7A36W.mjs +0 -8
- package/dist/Guild-2LUH7U7B.mjs +0 -10
- package/dist/Guild-2OVJTJYO.mjs +0 -10
- package/dist/Guild-2P77HBQM.mjs +0 -11
- package/dist/Guild-36EGAAEW.mjs +0 -8
- package/dist/Guild-3ETPHHF5.mjs +0 -12
- package/dist/Guild-5UBZNIGD.mjs +0 -9
- package/dist/Guild-63VQBPKF.mjs +0 -11
- package/dist/Guild-AA7WOQRM.mjs +0 -12
- package/dist/Guild-AJNEG7LH.mjs +0 -10
- package/dist/Guild-ARMAVVJK.mjs +0 -10
- package/dist/Guild-AYHGH54T.mjs +0 -10
- package/dist/Guild-BRYNE2LO.mjs +0 -11
- package/dist/Guild-CA3W6DOD.mjs +0 -8
- package/dist/Guild-EATTLGFJ.mjs +0 -11
- package/dist/Guild-F6JU3UR6.mjs +0 -11
- package/dist/Guild-FE3A7REJ.mjs +0 -9
- package/dist/Guild-FMBCTAV4.mjs +0 -12
- package/dist/Guild-FSGTZATW.mjs +0 -12
- package/dist/Guild-FSIEY6C5.mjs +0 -11
- package/dist/Guild-FTMIT5T5.mjs +0 -10
- package/dist/Guild-GIXJJBFM.mjs +0 -9
- package/dist/Guild-GOQZ7XP4.mjs +0 -8
- package/dist/Guild-H7AUG7DI.mjs +0 -10
- package/dist/Guild-I4O63HEY.mjs +0 -12
- package/dist/Guild-IRBC63IR.mjs +0 -12
- package/dist/Guild-ITSZV3DE.mjs +0 -9
- package/dist/Guild-K5AJM2C7.mjs +0 -12
- package/dist/Guild-KKIQCGCV.mjs +0 -11
- package/dist/Guild-L6OWKAO6.mjs +0 -11
- package/dist/Guild-MDW7KF33.mjs +0 -12
- package/dist/Guild-NAD5F5DP.mjs +0 -12
- package/dist/Guild-NHNQ5TIA.mjs +0 -8
- package/dist/Guild-NNMSFIA6.mjs +0 -12
- package/dist/Guild-OKTDQS5K.mjs +0 -12
- package/dist/Guild-PO5D3NEA.mjs +0 -10
- package/dist/Guild-PS2BCXNB.mjs +0 -11
- package/dist/Guild-RPQGTXB7.mjs +0 -12
- package/dist/Guild-RSNXYHFM.mjs +0 -10
- package/dist/Guild-RXGLAN54.mjs +0 -12
- package/dist/Guild-S3AOK72T.mjs +0 -9
- package/dist/Guild-S3YWFZTC.mjs +0 -11
- package/dist/Guild-S436SLOP.mjs +0 -9
- package/dist/Guild-TM6YGJWB.mjs +0 -10
- package/dist/Guild-TZOCAXXV.mjs +0 -9
- package/dist/Guild-WAFXK2EX.mjs +0 -9
- package/dist/Guild-WGZEW2AP.mjs +0 -10
- package/dist/Guild-WNPS7DBT.mjs +0 -11
- package/dist/Guild-WQA4CPDE.mjs +0 -10
- package/dist/Guild-XPOMHZZG.mjs +0 -9
- package/dist/Guild-ZOFF5LFR.mjs +0 -8
- package/dist/GuildBan-M4PA3HAA.mjs +0 -7
- package/dist/GuildEmoji-LP55RVIV.mjs +0 -7
- package/dist/GuildEmoji-SOGQ4C32.mjs +0 -8
- package/dist/GuildMember-3PC5QAU4.mjs +0 -8
- package/dist/GuildMember-43B5E5CH.mjs +0 -9
- package/dist/GuildMember-B7IFPCWC.mjs +0 -9
- package/dist/GuildMember-BJJNCL6W.mjs +0 -8
- package/dist/GuildMember-DW2N6ITI.mjs +0 -7
- package/dist/GuildMember-E72JU6JE.mjs +0 -9
- package/dist/GuildMember-F5FZJOHD.mjs +0 -9
- package/dist/GuildMember-FX2JAWES.mjs +0 -8
- package/dist/GuildMember-GS72FCQD.mjs +0 -9
- package/dist/GuildMember-H7CP2HMW.mjs +0 -9
- package/dist/GuildMember-K5FLBNHV.mjs +0 -8
- package/dist/GuildMember-L35WIMIH.mjs +0 -9
- package/dist/GuildMember-OXTGJ3MF.mjs +0 -9
- package/dist/GuildMember-RGVPVUAG.mjs +0 -9
- package/dist/GuildMember-RZWZ3OCG.mjs +0 -7
- package/dist/GuildMember-UBNHZBCO.mjs +0 -8
- package/dist/GuildMember-UU26WJGN.mjs +0 -8
- package/dist/GuildMember-XF7K2R45.mjs +0 -9
- package/dist/GuildMember-YWXA2FVO.mjs +0 -8
- package/dist/GuildSticker-3QYT6ZIY.mjs +0 -8
- package/dist/GuildSticker-STHUU6RM.mjs +0 -7
- package/dist/Invite-4WSFNMH4.mjs +0 -7
- package/dist/Message-23Z3RPCZ.mjs +0 -9
- package/dist/Message-2MPW7ZWA.mjs +0 -7
- package/dist/Message-33APPS76.mjs +0 -9
- package/dist/Message-3XJH5D7I.mjs +0 -7
- package/dist/Message-43PACCS7.mjs +0 -8
- package/dist/Message-5RFJTHNU.mjs +0 -7
- package/dist/Message-6IYEYSV6.mjs +0 -7
- package/dist/Message-6RSAGIRP.mjs +0 -8
- package/dist/Message-6YRGUZSW.mjs +0 -9
- package/dist/Message-AKOXO3LZ.mjs +0 -7
- package/dist/Message-C4A23STA.mjs +0 -9
- package/dist/Message-DXBXIQIJ.mjs +0 -9
- package/dist/Message-E3WU3J2Q.mjs +0 -8
- package/dist/Message-EMJ3JUVX.mjs +0 -8
- package/dist/Message-F3K5GNIB.mjs +0 -8
- package/dist/Message-F4SCFNF5.mjs +0 -8
- package/dist/Message-G4KR7O2J.mjs +0 -7
- package/dist/Message-O4CXWR57.mjs +0 -7
- package/dist/Message-OFIVTTAZ.mjs +0 -9
- package/dist/Message-ONWLVMU7.mjs +0 -8
- package/dist/Message-OXTQHFCF.mjs +0 -8
- package/dist/Message-PZUU7ZFR.mjs +0 -9
- package/dist/Message-QSDAA2HG.mjs +0 -9
- package/dist/Message-QXPHQOVC.mjs +0 -8
- package/dist/Message-R7GZYIQQ.mjs +0 -8
- package/dist/Message-SHUOVKB5.mjs +0 -7
- package/dist/Message-U3UPCS7C.mjs +0 -7
- package/dist/Message-W624MHJF.mjs +0 -8
- package/dist/Message-XB5WNMHL.mjs +0 -9
- package/dist/Message-ZCS7IGJX.mjs +0 -8
- package/dist/Message-ZL2PJPQA.mjs +0 -8
- package/dist/MessageReaction-AYSOCOMX.mjs +0 -8
- package/dist/MessageReaction-FSX3HHRZ.mjs +0 -7
- package/dist/MessageReaction-GNM5YJ4V.mjs +0 -8
- package/dist/MessageReaction-ME5KGEG4.mjs +0 -8
- package/dist/MessageReaction-MFK2N3AD.mjs +0 -8
- package/dist/MessageReaction-NIAHV3EM.mjs +0 -8
- package/dist/MessageReaction-PZ53DNAW.mjs +0 -8
- package/dist/MessageReaction-TQFIS53C.mjs +0 -8
- package/dist/MessageReaction-V4UZ7OXE.mjs +0 -7
- package/dist/MessageReaction-XRPYZDSC.mjs +0 -7
- package/dist/Role-5MWSGL66.mjs +0 -7
- package/dist/Role-DWZ2YDFB.mjs +0 -7
- package/dist/Role-J7ENREP6.mjs +0 -7
- package/dist/Role-N2ZEMRUQ.mjs +0 -7
- package/dist/Role-SVLWIAMN.mjs +0 -7
- package/dist/Webhook-2MQESB7Z.mjs +0 -7
- package/dist/Webhook-2RHBXH7R.mjs +0 -7
- package/dist/Webhook-32VJD4AL.mjs +0 -7
- package/dist/Webhook-6BCEHBZ6.mjs +0 -8
- package/dist/Webhook-A5KZ4S4N.mjs +0 -10
- package/dist/Webhook-AG6QFM2I.mjs +0 -7
- package/dist/Webhook-GB77DXAF.mjs +0 -10
- package/dist/Webhook-H4IMADRQ.mjs +0 -10
- package/dist/Webhook-H7VKDOJX.mjs +0 -7
- package/dist/Webhook-IHLGW7NL.mjs +0 -8
- package/dist/Webhook-IWPKKMWD.mjs +0 -10
- package/dist/Webhook-L2D43K5N.mjs +0 -7
- package/dist/Webhook-LEYRYH23.mjs +0 -7
- package/dist/Webhook-NPIXOCEH.mjs +0 -10
- package/dist/Webhook-NUQCJAWZ.mjs +0 -7
- package/dist/Webhook-OXXVFNNU.mjs +0 -9
- package/dist/Webhook-RWDDYW2Q.mjs +0 -10
- package/dist/Webhook-SNLT45PN.mjs +0 -7
- package/dist/Webhook-TGAZZRQQ.mjs +0 -7
- package/dist/Webhook-WIF6OGPA.mjs +0 -10
- package/dist/Webhook-YL3NNZDI.mjs +0 -8
- package/dist/Webhook-ZL7A4766.mjs +0 -10
- package/dist/chunk-2245SAIA.mjs +0 -147
- package/dist/chunk-226TVUXE.mjs +0 -136
- package/dist/chunk-23KVLHIZ.mjs +0 -147
- package/dist/chunk-25Q2GMSK.mjs +0 -137
- package/dist/chunk-26GCIGHL.mjs +0 -52
- package/dist/chunk-2CIZJCEO.mjs +0 -132
- package/dist/chunk-2FIZRRSO.mjs +0 -88
- package/dist/chunk-2GXOBRSF.mjs +0 -184
- package/dist/chunk-2HH5NZT3.mjs +0 -137
- package/dist/chunk-2QU3TS4S.mjs +0 -496
- package/dist/chunk-367NAOYQ.mjs +0 -127
- package/dist/chunk-3BJ4OOCQ.mjs +0 -86
- package/dist/chunk-3CNUPFDI.mjs +0 -59
- package/dist/chunk-3KOM5WYW.mjs +0 -502
- package/dist/chunk-3UJYRWDI.mjs +0 -132
- package/dist/chunk-4DBGMFOQ.mjs +0 -14
- package/dist/chunk-4F765HVV.mjs +0 -137
- package/dist/chunk-4OQ4XACY.mjs +0 -190
- package/dist/chunk-4PLHVYRY.mjs +0 -579
- package/dist/chunk-4QKSUNTV.mjs +0 -263
- package/dist/chunk-4S42USSG.mjs +0 -137
- package/dist/chunk-4XJIM6SC.mjs +0 -315
- package/dist/chunk-52L544OS.mjs +0 -259
- package/dist/chunk-53Y37KRG.mjs +0 -111
- package/dist/chunk-5APVDWQU.mjs +0 -184
- package/dist/chunk-5HQRX3KJ.mjs +0 -70
- package/dist/chunk-5I54OXBG.mjs +0 -111
- package/dist/chunk-5JEDVRKU.mjs +0 -193
- package/dist/chunk-5MPQG6OV.mjs +0 -120
- package/dist/chunk-5QRROWJS.mjs +0 -56
- package/dist/chunk-5RCTNYPY.mjs +0 -151
- package/dist/chunk-5VIV7EPG.mjs +0 -180
- package/dist/chunk-62S4AB2S.mjs +0 -54
- package/dist/chunk-6C3LYAUX.mjs +0 -496
- package/dist/chunk-6CEFV56Z.mjs +0 -142
- package/dist/chunk-6CEMF2LO.mjs +0 -14
- package/dist/chunk-6EBNOON4.mjs +0 -86
- package/dist/chunk-6GF5H3JH.mjs +0 -137
- package/dist/chunk-6IGR45JC.mjs +0 -137
- package/dist/chunk-6LREQZXU.mjs +0 -259
- package/dist/chunk-6VWXGTX2.mjs +0 -585
- package/dist/chunk-72OY7B3D.mjs +0 -72
- package/dist/chunk-737R7BFN.mjs +0 -112
- package/dist/chunk-7EPDZMZS.mjs +0 -264
- package/dist/chunk-7FYM4D2E.mjs +0 -50
- package/dist/chunk-7GZN6JXT.mjs +0 -50
- package/dist/chunk-7H3TKJUT.mjs +0 -53
- package/dist/chunk-7K35BCCD.mjs +0 -263
- package/dist/chunk-7SIS5CUA.mjs +0 -14
- package/dist/chunk-ABGLEIZG.mjs +0 -191
- package/dist/chunk-AC7PFILS.mjs +0 -107
- package/dist/chunk-AI5E6LS5.mjs +0 -361
- package/dist/chunk-AK6Q62VE.mjs +0 -109
- package/dist/chunk-AKJZBSCE.mjs +0 -155
- package/dist/chunk-B6F5LWNS.mjs +0 -64
- package/dist/chunk-BAZBIWMG.mjs +0 -209
- package/dist/chunk-BF7OCTE6.mjs +0 -142
- package/dist/chunk-BFSGXVZ7.mjs +0 -148
- package/dist/chunk-BGJSL6JI.mjs +0 -14
- package/dist/chunk-BI2MRKB7.mjs +0 -150
- package/dist/chunk-BMAFJS7T.mjs +0 -575
- package/dist/chunk-BRIU4HGS.mjs +0 -579
- package/dist/chunk-BUEXP5SZ.mjs +0 -70
- package/dist/chunk-BUIHWKTK.mjs +0 -132
- package/dist/chunk-BYTAODAO.mjs +0 -70
- package/dist/chunk-CEABHTAF.mjs +0 -43
- package/dist/chunk-CJLJBBFO.mjs +0 -54
- package/dist/chunk-CJVQNARM.mjs +0 -145
- package/dist/chunk-CNCPVNXS.mjs +0 -160
- package/dist/chunk-CNXK6SYW.mjs +0 -220
- package/dist/chunk-CQ5ZVTLX.mjs +0 -71
- package/dist/chunk-CQ7MDBHD.mjs +0 -199
- package/dist/chunk-CREI4MOS.mjs +0 -406
- package/dist/chunk-DJBCSVZX.mjs +0 -102
- package/dist/chunk-DLROMCIJ.mjs +0 -50
- package/dist/chunk-DLVBAJTE.mjs +0 -52
- package/dist/chunk-DNDCNIN2.mjs +0 -263
- package/dist/chunk-DO7MLFT6.mjs +0 -579
- package/dist/chunk-DPZHAYCK.mjs +0 -71
- package/dist/chunk-DQ4TNBPG.mjs +0 -63
- package/dist/chunk-DSPSRPHF.mjs +0 -200
- package/dist/chunk-DUQAD7F6.mjs +0 -173
- package/dist/chunk-E27LKSSS.mjs +0 -142
- package/dist/chunk-E6SU3TR5.mjs +0 -64
- package/dist/chunk-E75ZVY3I.mjs +0 -14
- package/dist/chunk-EC4ES5VH.mjs +0 -171
- package/dist/chunk-EF32ILJL.mjs +0 -102
- package/dist/chunk-EI2LRVWJ.mjs +0 -207
- package/dist/chunk-EUKEYW72.mjs +0 -496
- package/dist/chunk-F2EEQP5O.mjs +0 -86
- package/dist/chunk-F3JU2ZCE.mjs +0 -575
- package/dist/chunk-FGFWZMUQ.mjs +0 -64
- package/dist/chunk-FH6ICLNP.mjs +0 -142
- package/dist/chunk-FJS5FBXO.mjs +0 -233
- package/dist/chunk-FK5X6HFL.mjs +0 -111
- package/dist/chunk-FNFID6QB.mjs +0 -45
- package/dist/chunk-FRVZ7D6D.mjs +0 -293
- package/dist/chunk-FSXTONUR.mjs +0 -147
- package/dist/chunk-FVZY7IZ4.mjs +0 -575
- package/dist/chunk-G2YVDCRB.mjs +0 -137
- package/dist/chunk-G4L7WAJS.mjs +0 -64
- package/dist/chunk-GCIJYVRC.mjs +0 -86
- package/dist/chunk-GEPISSKR.mjs +0 -263
- package/dist/chunk-GFUJVQ7L.mjs +0 -64
- package/dist/chunk-GIIJQKAV.mjs +0 -164
- package/dist/chunk-GUNWHOQO.mjs +0 -42
- package/dist/chunk-GWSLXZES.mjs +0 -263
- package/dist/chunk-H5KYMLLB.mjs +0 -14
- package/dist/chunk-HAUQAFOF.mjs +0 -97
- package/dist/chunk-HBF5QEDH.mjs +0 -42
- package/dist/chunk-HQMYRYMY.mjs +0 -6
- package/dist/chunk-I2MHQEEZ.mjs +0 -575
- package/dist/chunk-IE3V5VLN.mjs +0 -64
- package/dist/chunk-IPHFDI2L.mjs +0 -68
- package/dist/chunk-J3EIGOXQ.mjs +0 -72
- package/dist/chunk-JHNKZIHY.mjs +0 -137
- package/dist/chunk-JJHZBWZM.mjs +0 -118
- package/dist/chunk-JOUNLDB6.mjs +0 -225
- package/dist/chunk-JS55BGBM.mjs +0 -157
- package/dist/chunk-JTL3CVFU.mjs +0 -114
- package/dist/chunk-JVEOQFUX.mjs +0 -52
- package/dist/chunk-K2ZJWUV6.mjs +0 -86
- package/dist/chunk-K6NLD6SB.mjs +0 -64
- package/dist/chunk-KALJBR6Z.mjs +0 -142
- package/dist/chunk-KBXXX7L4.mjs +0 -209
- package/dist/chunk-KHE3G7SG.mjs +0 -184
- package/dist/chunk-KOTF4TTZ.mjs +0 -403
- package/dist/chunk-KQNLUUBZ.mjs +0 -137
- package/dist/chunk-KQXR3GN2.mjs +0 -140
- package/dist/chunk-KUMLJGXY.mjs +0 -58
- package/dist/chunk-KWA5TKXS.mjs +0 -574
- package/dist/chunk-KXI2IOJM.mjs +0 -97
- package/dist/chunk-KXJLNURI.mjs +0 -153
- package/dist/chunk-KXY2PTDQ.mjs +0 -263
- package/dist/chunk-L25ON7WB.mjs +0 -52
- package/dist/chunk-LBBIQOSH.mjs +0 -53
- package/dist/chunk-LD7ATCWW.mjs +0 -97
- package/dist/chunk-LDR7MZLX.mjs +0 -227
- package/dist/chunk-LRMB4VBU.mjs +0 -112
- package/dist/chunk-LTO3TVUW.mjs +0 -71
- package/dist/chunk-LU2SNC5G.mjs +0 -392
- package/dist/chunk-LVMFPATK.mjs +0 -54
- package/dist/chunk-MILMGDQ2.mjs +0 -15
- package/dist/chunk-MKEHOFA2.mjs +0 -43
- package/dist/chunk-MSMABD52.mjs +0 -72
- package/dist/chunk-MTGPR7WY.mjs +0 -142
- package/dist/chunk-MTMKXMB3.mjs +0 -496
- package/dist/chunk-MWRADLNP.mjs +0 -86
- package/dist/chunk-N65TF5SP.mjs +0 -184
- package/dist/chunk-NCBAWY7A.mjs +0 -139
- package/dist/chunk-ND223BOF.mjs +0 -256
- package/dist/chunk-NGJKJ4R2.mjs +0 -184
- package/dist/chunk-NISGA2YZ.mjs +0 -55
- package/dist/chunk-NM6PHRGO.mjs +0 -263
- package/dist/chunk-NMMHN5LB.mjs +0 -579
- package/dist/chunk-NNKU4OZY.mjs +0 -147
- package/dist/chunk-NNZUZLG3.mjs +0 -416
- package/dist/chunk-NOLYW3V4.mjs +0 -140
- package/dist/chunk-NYEWIYVQ.mjs +0 -86
- package/dist/chunk-NZJJ7FRK.mjs +0 -339
- package/dist/chunk-O77KTDMH.mjs +0 -44
- package/dist/chunk-OALSL7C2.mjs +0 -212
- package/dist/chunk-OGJSTE4A.mjs +0 -86
- package/dist/chunk-OHIHIQAS.mjs +0 -102
- package/dist/chunk-OJJADMUB.mjs +0 -71
- package/dist/chunk-OMFDQURC.mjs +0 -84
- package/dist/chunk-ORRPH43K.mjs +0 -127
- package/dist/chunk-OXO3HVCT.mjs +0 -124
- package/dist/chunk-P4IRDGB4.mjs +0 -43
- package/dist/chunk-PD42OYFT.mjs +0 -150
- package/dist/chunk-PJ62NB7Z.mjs +0 -319
- package/dist/chunk-PL26CDZN.mjs +0 -97
- package/dist/chunk-PM2IUGNR.mjs +0 -29
- package/dist/chunk-PO5JZQVN.mjs +0 -111
- package/dist/chunk-PQR6WIIY.mjs +0 -348
- package/dist/chunk-PS6PZL5W.mjs +0 -86
- package/dist/chunk-PTBV5DCB.mjs +0 -97
- package/dist/chunk-PU73YRKJ.mjs +0 -27
- package/dist/chunk-PXZCOEZ6.mjs +0 -184
- package/dist/chunk-PYYXC7US.mjs +0 -76
- package/dist/chunk-Q4W4ODBP.mjs +0 -319
- package/dist/chunk-QAJ4C5RT.mjs +0 -263
- package/dist/chunk-QDCFQF6J.mjs +0 -36
- package/dist/chunk-QDNFJVVE.mjs +0 -70
- package/dist/chunk-QG7OB5MD.mjs +0 -86
- package/dist/chunk-QM7TE5C3.mjs +0 -97
- package/dist/chunk-QRQG2BI2.mjs +0 -67
- package/dist/chunk-QXJNV5EJ.mjs +0 -110
- package/dist/chunk-QYAZXDXI.mjs +0 -142
- package/dist/chunk-RCP27MRC.mjs +0 -33
- package/dist/chunk-RGLEJWLU.mjs +0 -173
- package/dist/chunk-RIXU6NZ2.mjs +0 -122
- package/dist/chunk-RNDHAIPS.mjs +0 -64
- package/dist/chunk-RTSLRXJC.mjs +0 -122
- package/dist/chunk-RWFKZ3DF.mjs +0 -413
- package/dist/chunk-RWZ3ORIM.mjs +0 -136
- package/dist/chunk-RXHJYGSJ.mjs +0 -53
- package/dist/chunk-S25KNTHZ.mjs +0 -137
- package/dist/chunk-SCOVKXZ7.mjs +0 -223
- package/dist/chunk-SGIJ36LI.mjs +0 -259
- package/dist/chunk-SHYMRCLT.mjs +0 -221
- package/dist/chunk-SQVCCSNN.mjs +0 -41
- package/dist/chunk-SU26BEIK.mjs +0 -86
- package/dist/chunk-SW6KNICI.mjs +0 -52
- package/dist/chunk-SY6DVJKB.mjs +0 -184
- package/dist/chunk-T23OBCRC.mjs +0 -295
- package/dist/chunk-T2NSVWBH.mjs +0 -77
- package/dist/chunk-T3PPEX64.mjs +0 -164
- package/dist/chunk-TE5IC7IP.mjs +0 -36
- package/dist/chunk-TKASBGF7.mjs +0 -62
- package/dist/chunk-TMDZALIN.mjs +0 -110
- package/dist/chunk-TU4VVM34.mjs +0 -23
- package/dist/chunk-U2WETRQJ.mjs +0 -86
- package/dist/chunk-U3RZV7XO.mjs +0 -58
- package/dist/chunk-USHLLE7C.mjs +0 -137
- package/dist/chunk-UU6LVKA3.mjs +0 -112
- package/dist/chunk-UXODHQZH.mjs +0 -41
- package/dist/chunk-V37YOE4P.mjs +0 -184
- package/dist/chunk-V6QVJWJR.mjs +0 -86
- package/dist/chunk-V6T5VMWD.mjs +0 -26
- package/dist/chunk-V72EJZDX.mjs +0 -137
- package/dist/chunk-V7LPVPGH.mjs +0 -305
- package/dist/chunk-VESIRBN4.mjs +0 -263
- package/dist/chunk-VGKL2ALO.mjs +0 -184
- package/dist/chunk-VPZEDAAB.mjs +0 -184
- package/dist/chunk-VQHHSD7C.mjs +0 -97
- package/dist/chunk-VZPN7FNH.mjs +0 -308
- package/dist/chunk-WB5BPM5Q.mjs +0 -55
- package/dist/chunk-WFONGZGK.mjs +0 -42
- package/dist/chunk-WKZ2ZIPO.mjs +0 -112
- package/dist/chunk-WVRHFGGB.mjs +0 -97
- package/dist/chunk-WYSHH4LR.mjs +0 -141
- package/dist/chunk-WZVY7DA6.mjs +0 -44
- package/dist/chunk-X3GPLJGD.mjs +0 -152
- package/dist/chunk-X6K3ZD62.mjs +0 -53
- package/dist/chunk-X77DFNE3.mjs +0 -136
- package/dist/chunk-XRLFLKHG.mjs +0 -14
- package/dist/chunk-XTDZQD4A.mjs +0 -110
- package/dist/chunk-XTFNK6PX.mjs +0 -220
- package/dist/chunk-XXCBJJZE.mjs +0 -88
- package/dist/chunk-Y3PX242G.mjs +0 -225
- package/dist/chunk-Y57QWXS4.mjs +0 -122
- package/dist/chunk-YKP7JHV2.mjs +0 -102
- package/dist/chunk-YRCBBEPB.mjs +0 -142
- package/dist/chunk-YSKZR66G.mjs +0 -102
- package/dist/chunk-YUDOACNS.mjs +0 -184
- package/dist/chunk-YVNZMBZ6.mjs +0 -501
- package/dist/chunk-YWE5AILJ.mjs +0 -137
- package/dist/chunk-YYER5QOG.mjs +0 -44
- package/dist/chunk-Z6LVSACJ.mjs +0 -86
- package/dist/chunk-ZFLKX6WD.mjs +0 -97
- package/dist/chunk-ZGMM6IPQ.mjs +0 -79
- package/dist/chunk-ZHNFS3MK.mjs +0 -56
- package/dist/chunk-ZHRQQZ4X.mjs +0 -102
- package/dist/chunk-ZJCAKCMN.mjs +0 -89
- package/dist/chunk-ZKKBIQBA.mjs +0 -413
- package/dist/chunk-ZMIMAMO2.mjs +0 -14
- package/dist/chunk-ZR53XY37.mjs +0 -499
- package/dist/chunk-ZR6MFTT7.mjs +0 -142
- package/dist/chunk-ZVFZIZM2.mjs +0 -150
package/dist/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import * as _fluxerjs_types from '@fluxerjs/types';
|
|
|
2
2
|
import { APISticker, APIEmoji, APIEmbed, APIWebhook, APIWebhookUpdateRequest, APIWebhookTokenUpdateRequest, APIChannelOverwrite, APIChannel, APIChannelPartial, ChannelType, GatewayReactionEmoji, GatewayMessageReactionAddDispatchData, GatewayMessageReactionRemoveDispatchData, APIMessageAttachment, MessageType, APIMessageSticker, APIMessageReaction, APIMessageReference, APIMessageSnapshot, APIMessageCall, APIMessage, APIUserPartial, APIGuildMember, APIRole, RESTUpdateRoleBody, APIBan, GuildFeature, GuildVerificationLevel, DefaultMessageNotifications, GuildExplicitContentFilter, GuildMFALevel, APIGuild, RESTCreateRoleBody, APIGuildAuditLog, APIVanityURL, APIGuildPartial, APIInvite, GatewayPresenceUpdateData, APIProfileResponse, GatewayMessageReactionRemoveAllDispatchData, GatewayMessageReactionRemoveEmojiDispatchData, GatewayVoiceStateUpdateDispatchData, GatewayVoiceServerUpdateDispatchData, GatewayGuildEmojisUpdateDispatchData, GatewayGuildStickersUpdateDispatchData, GatewayGuildIntegrationsUpdateDispatchData, GatewayGuildScheduledEventCreateDispatchData, GatewayGuildScheduledEventUpdateDispatchData, GatewayGuildScheduledEventDeleteDispatchData, GatewayChannelPinsUpdateDispatchData, GatewayPresenceUpdateDispatchData, GatewayWebhooksUpdateDispatchData, APIInstance, GatewaySendPayload, Routes } from '@fluxerjs/types';
|
|
3
3
|
export { GatewayOpcodes, MessageAttachmentFlags, Routes } from '@fluxerjs/types';
|
|
4
4
|
import { PermissionResolvable } from '@fluxerjs/util';
|
|
5
|
-
export { PermissionFlags, PermissionResolvable, PermissionString, PermissionsBitField, UserFlagsBitField, UserFlagsBits, UserFlagsResolvable, UserFlagsString, resolvePermissionsToBitfield, resolveTenorToImageUrl } from '@fluxerjs/util';
|
|
5
|
+
export { PermissionFlags, PermissionResolvable, PermissionString, PermissionsBitField, UserFlagsBitField, UserFlagsBits, UserFlagsResolvable, UserFlagsString, parsePrefixCommand, parseUserMention, resolvePermissionsToBitfield, resolveTenorToImageUrl } from '@fluxerjs/util';
|
|
6
6
|
import { Collection } from '@fluxerjs/collection';
|
|
7
7
|
import { EmbedBuilder } from '@fluxerjs/builders';
|
|
8
8
|
export { AttachmentBuilder, EmbedBuilder, MessagePayload } from '@fluxerjs/builders';
|
|
@@ -141,9 +141,12 @@ interface MessageAttachmentMeta {
|
|
|
141
141
|
/** MessageAttachmentFlags: IS_SPOILER (8), CONTAINS_EXPLICIT_MEDIA (16), IS_ANIMATED (32) */
|
|
142
142
|
flags?: number;
|
|
143
143
|
}
|
|
144
|
-
/** Options for sending a message (content, embeds, files). Used by Message.send, Channel.send, ChannelManager.send.
|
|
144
|
+
/** Options for sending a message (content, embeds, files). Used by Message.send, Channel.send, ChannelManager.send.
|
|
145
|
+
* EmbedBuilder instances are auto-converted to API format—no need to call .toJSON().
|
|
146
|
+
*/
|
|
145
147
|
type MessageSendOptions = string | {
|
|
146
148
|
content?: string;
|
|
149
|
+
/** EmbedBuilder instances are auto-converted; raw APIEmbed also supported. */
|
|
147
150
|
embeds?: (APIEmbed | EmbedBuilder)[];
|
|
148
151
|
/** File attachments. When present, request uses multipart/form-data. */
|
|
149
152
|
files?: MessageFileData[];
|
|
@@ -221,7 +224,7 @@ declare class Webhook extends Base {
|
|
|
221
224
|
* @throws Error if token is not available
|
|
222
225
|
* @example
|
|
223
226
|
* await webhook.send('Hello!');
|
|
224
|
-
* await webhook.send({ embeds: [embed
|
|
227
|
+
* await webhook.send({ embeds: [embed] });
|
|
225
228
|
* await webhook.send({ content: 'File attached', files: [{ name: 'data.txt', data: buffer }] });
|
|
226
229
|
* const msg = await webhook.send({ content: 'Hi' }, true);
|
|
227
230
|
*/
|
|
@@ -570,6 +573,17 @@ declare class Message extends Base {
|
|
|
570
573
|
get channel(): Channel | null;
|
|
571
574
|
/** Guild where this message was sent. Resolved from cache; null for DMs or if not cached. */
|
|
572
575
|
get guild(): Guild | null;
|
|
576
|
+
/**
|
|
577
|
+
* Resolve the channel (from cache or API). Use when you need the channel and it may not be cached.
|
|
578
|
+
* @returns The channel
|
|
579
|
+
* @throws FluxerError with CHANNEL_NOT_FOUND if the channel does not exist
|
|
580
|
+
*/
|
|
581
|
+
resolveChannel(): Promise<Channel>;
|
|
582
|
+
/**
|
|
583
|
+
* Resolve the guild (from cache or API). Returns null for DMs.
|
|
584
|
+
* @returns The guild, or null if this is a DM or guild not found
|
|
585
|
+
*/
|
|
586
|
+
resolveGuild(): Promise<Guild | null>;
|
|
573
587
|
/** @param data - API message from POST/PATCH /channels/{id}/messages or gateway MESSAGE_CREATE */
|
|
574
588
|
constructor(client: Client, data: APIMessage);
|
|
575
589
|
/**
|
|
@@ -577,7 +591,7 @@ declare class Message extends Base {
|
|
|
577
591
|
* @param options - Text content or object with content, embeds, and/or files
|
|
578
592
|
* @example
|
|
579
593
|
* await message.send('Pong!');
|
|
580
|
-
* await message.send({ embeds: [embed
|
|
594
|
+
* await message.send({ embeds: [embed] }); // EmbedBuilder auto-converted
|
|
581
595
|
* await message.send({ content: 'File', files: [{ name: 'data.txt', data }] });
|
|
582
596
|
*/
|
|
583
597
|
send(options: MessageSendOptions): Promise<Message>;
|
|
@@ -587,12 +601,15 @@ declare class Message extends Base {
|
|
|
587
601
|
* @param options - Text content or object with content and/or embeds
|
|
588
602
|
* @example
|
|
589
603
|
* await message.sendTo(logChannelId, 'User ' + message.author.username + ' said: ' + message.content);
|
|
590
|
-
* await message.sendTo(announceChannelId, { embeds: [embed
|
|
604
|
+
* await message.sendTo(announceChannelId, { embeds: [embed] });
|
|
591
605
|
*/
|
|
592
606
|
sendTo(channelId: string, options: MessageSendOptions): Promise<Message>;
|
|
593
607
|
/**
|
|
594
|
-
* Reply to this message.
|
|
608
|
+
* Reply to this message (shows as a reply in the client).
|
|
595
609
|
* @param options - Text content or object with content, embeds, and/or files
|
|
610
|
+
* @example
|
|
611
|
+
* await message.reply('Pong!');
|
|
612
|
+
* await message.reply({ embeds: [embed] });
|
|
596
613
|
*/
|
|
597
614
|
reply(options: MessageSendOptions): Promise<Message>;
|
|
598
615
|
/**
|
|
@@ -857,6 +874,17 @@ declare class GuildMember extends Base {
|
|
|
857
874
|
declare class GuildMemberManager extends Collection<string, GuildMember> {
|
|
858
875
|
private readonly guild;
|
|
859
876
|
constructor(guild: Guild);
|
|
877
|
+
/**
|
|
878
|
+
* Get a guild member from cache or fetch from the API if not present.
|
|
879
|
+
* Convenience helper to avoid repeating `guild.members.get(userId) ?? (await guild.fetchMember(userId))`.
|
|
880
|
+
* @param userId - Snowflake of the user
|
|
881
|
+
* @returns The guild member
|
|
882
|
+
* @throws FluxerError with MEMBER_NOT_FOUND if user is not in the guild (404)
|
|
883
|
+
* @example
|
|
884
|
+
* const member = await guild.members.resolve(userId);
|
|
885
|
+
* console.log(member.displayName);
|
|
886
|
+
*/
|
|
887
|
+
resolve(userId: string): Promise<GuildMember>;
|
|
860
888
|
/**
|
|
861
889
|
* The current bot user as a GuildMember in this guild.
|
|
862
890
|
* Returns null if the bot's member is not cached or client.user is null.
|
|
@@ -1279,7 +1307,20 @@ interface PartialMessage {
|
|
|
1279
1307
|
*/
|
|
1280
1308
|
declare class ChannelManager extends Collection<string, Channel> {
|
|
1281
1309
|
private readonly client;
|
|
1310
|
+
private readonly maxSize;
|
|
1282
1311
|
constructor(client: Client);
|
|
1312
|
+
set(key: string, value: Channel): this;
|
|
1313
|
+
/**
|
|
1314
|
+
* Get a channel from cache or fetch from the API if not present.
|
|
1315
|
+
* Convenience helper to avoid repeating `client.channels.get(id) ?? (await client.channels.fetch(id))`.
|
|
1316
|
+
* @param channelId - Snowflake of the channel
|
|
1317
|
+
* @returns The channel
|
|
1318
|
+
* @throws FluxerError with CHANNEL_NOT_FOUND if the channel does not exist
|
|
1319
|
+
* @example
|
|
1320
|
+
* const channel = await client.channels.resolve(message.channelId);
|
|
1321
|
+
* if (channel?.isSendable()) await channel.send('Hello!');
|
|
1322
|
+
*/
|
|
1323
|
+
resolve(channelId: string): Promise<Channel>;
|
|
1283
1324
|
/**
|
|
1284
1325
|
* Fetch a channel by ID from the API (or return from cache if present).
|
|
1285
1326
|
* @param channelId - Snowflake of the channel
|
|
@@ -1296,9 +1337,9 @@ declare class ChannelManager extends Collection<string, Channel> {
|
|
|
1296
1337
|
* @param messageId - Snowflake of the message
|
|
1297
1338
|
* @returns The message
|
|
1298
1339
|
* @throws FluxerError with MESSAGE_NOT_FOUND if the message does not exist
|
|
1299
|
-
* @deprecated Use channel.messages.fetch(messageId). Prefer (await client.channels.
|
|
1340
|
+
* @deprecated Use channel.messages.fetch(messageId). Prefer (await client.channels.resolve(channelId))?.messages?.fetch(messageId).
|
|
1300
1341
|
* @example
|
|
1301
|
-
* const channel = await client.channels.
|
|
1342
|
+
* const channel = await client.channels.resolve(channelId);
|
|
1302
1343
|
* const message = await channel?.messages?.fetch(messageId);
|
|
1303
1344
|
*/
|
|
1304
1345
|
fetchMessage(channelId: string, messageId: string): Promise<Message>;
|
|
@@ -1310,7 +1351,7 @@ declare class ChannelManager extends Collection<string, Channel> {
|
|
|
1310
1351
|
* @returns The created message
|
|
1311
1352
|
* @example
|
|
1312
1353
|
* await client.channels.send(logChannelId, 'User joined!');
|
|
1313
|
-
* await client.channels.send(channelId, { embeds: [embed
|
|
1354
|
+
* await client.channels.send(channelId, { embeds: [embed] });
|
|
1314
1355
|
* await client.channels.send(channelId, { content: 'Report', files: [{ name: 'log.txt', data }] });
|
|
1315
1356
|
*/
|
|
1316
1357
|
send(channelId: string, payload: MessageSendOptions): Promise<Message>;
|
|
@@ -1322,7 +1363,19 @@ declare class ChannelManager extends Collection<string, Channel> {
|
|
|
1322
1363
|
*/
|
|
1323
1364
|
declare class GuildManager extends Collection<string, Guild> {
|
|
1324
1365
|
private readonly client;
|
|
1366
|
+
private readonly maxSize;
|
|
1325
1367
|
constructor(client: Client);
|
|
1368
|
+
set(key: string, value: Guild): this;
|
|
1369
|
+
/**
|
|
1370
|
+
* Get a guild from cache or fetch from the API if not present.
|
|
1371
|
+
* Convenience helper to avoid repeating `client.guilds.get(id) ?? (await client.guilds.fetch(id))`.
|
|
1372
|
+
* @param guildId - Snowflake of the guild
|
|
1373
|
+
* @returns The guild, or null if not found
|
|
1374
|
+
* @example
|
|
1375
|
+
* const guild = await client.guilds.resolve(message.guildId);
|
|
1376
|
+
* if (guild) console.log(guild.name);
|
|
1377
|
+
*/
|
|
1378
|
+
resolve(guildId: string): Promise<Guild | null>;
|
|
1326
1379
|
/**
|
|
1327
1380
|
* Create a guild. POST /guilds.
|
|
1328
1381
|
* @param options - name (required), icon (base64), empty_features
|
|
@@ -1344,9 +1397,20 @@ declare class GuildManager extends Collection<string, Guild> {
|
|
|
1344
1397
|
fetch(guildId: string): Promise<Guild | null>;
|
|
1345
1398
|
}
|
|
1346
1399
|
|
|
1400
|
+
/** Optional cache size limits. When exceeded, oldest entries are evicted (FIFO). Omit or use 0 for unbounded. */
|
|
1401
|
+
interface CacheSizeLimits {
|
|
1402
|
+
channels?: number;
|
|
1403
|
+
guilds?: number;
|
|
1404
|
+
users?: number;
|
|
1405
|
+
}
|
|
1347
1406
|
interface ClientOptions {
|
|
1348
1407
|
rest?: Partial<ConstructorParameters<typeof REST>[0]>;
|
|
1408
|
+
/** Gateway intents. Not yet supported by Fluxer—value is always sent as 0. Set suppressIntentWarning to silence the warning. */
|
|
1349
1409
|
intents?: number;
|
|
1410
|
+
/** Suppress the warning when intents are set (Fluxer does not support intents yet). */
|
|
1411
|
+
suppressIntentWarning?: boolean;
|
|
1412
|
+
/** Cache size limits (channels, guilds, users). When exceeded, oldest entries are evicted. Omit or 0 = unbounded. */
|
|
1413
|
+
cache?: CacheSizeLimits;
|
|
1350
1414
|
/** Initial presence (status, custom_status, etc.) sent on identify. Can also update via PresenceUpdate after connect. */
|
|
1351
1415
|
presence?: GatewayPresenceUpdateData;
|
|
1352
1416
|
/** Optional WebSocket constructor (e.g. `require('ws')` in Node for compatibility) */
|
|
@@ -1446,7 +1510,9 @@ interface FetchedUserWithProfile {
|
|
|
1446
1510
|
*/
|
|
1447
1511
|
declare class UsersManager extends Collection<string, User> {
|
|
1448
1512
|
private readonly client;
|
|
1513
|
+
private readonly maxSize;
|
|
1449
1514
|
constructor(client: Client);
|
|
1515
|
+
set(key: string, value: User): this;
|
|
1450
1516
|
/**
|
|
1451
1517
|
* Fetch a user by ID from the API.
|
|
1452
1518
|
* Updates cache if user already exists.
|
|
@@ -1609,9 +1675,9 @@ declare class Client extends EventEmitter {
|
|
|
1609
1675
|
* @param messageId - Snowflake of the message
|
|
1610
1676
|
* @returns The message
|
|
1611
1677
|
* @throws FluxerError with MESSAGE_NOT_FOUND if the message does not exist
|
|
1612
|
-
* @deprecated Use channel.messages.fetch(messageId). For IDs-only: (await client.channels.
|
|
1678
|
+
* @deprecated Use channel.messages.fetch(messageId). For IDs-only: (await client.channels.resolve(channelId))?.messages?.fetch(messageId)
|
|
1613
1679
|
* @example
|
|
1614
|
-
* const channel = await client.channels.
|
|
1680
|
+
* const channel = await client.channels.resolve(channelId);
|
|
1615
1681
|
* const message = await channel?.messages?.fetch(messageId);
|
|
1616
1682
|
*/
|
|
1617
1683
|
fetchMessage(channelId: string, messageId: string): Promise<Message>;
|
|
@@ -1648,6 +1714,13 @@ declare class Client extends EventEmitter {
|
|
|
1648
1714
|
isReady(): this is Client & {
|
|
1649
1715
|
user: NonNullable<Client['user']>;
|
|
1650
1716
|
};
|
|
1717
|
+
/**
|
|
1718
|
+
* Throws if the client is not ready. Use before accessing client.user or other post-ready state.
|
|
1719
|
+
* @throws FluxerError with CLIENT_NOT_READY if client has not received Ready yet
|
|
1720
|
+
*/
|
|
1721
|
+
assertReady(): asserts this is Client & {
|
|
1722
|
+
user: NonNullable<Client['user']>;
|
|
1723
|
+
};
|
|
1651
1724
|
static get Routes(): typeof Routes;
|
|
1652
1725
|
}
|
|
1653
1726
|
|
package/dist/index.js
CHANGED
|
@@ -292,6 +292,21 @@ var init_Message = __esm({
|
|
|
292
292
|
get guild() {
|
|
293
293
|
return this.guildId ? this.client.guilds.get(this.guildId) ?? null : null;
|
|
294
294
|
}
|
|
295
|
+
/**
|
|
296
|
+
* Resolve the channel (from cache or API). Use when you need the channel and it may not be cached.
|
|
297
|
+
* @returns The channel
|
|
298
|
+
* @throws FluxerError with CHANNEL_NOT_FOUND if the channel does not exist
|
|
299
|
+
*/
|
|
300
|
+
async resolveChannel() {
|
|
301
|
+
return this.client.channels.resolve(this.channelId);
|
|
302
|
+
}
|
|
303
|
+
/**
|
|
304
|
+
* Resolve the guild (from cache or API). Returns null for DMs.
|
|
305
|
+
* @returns The guild, or null if this is a DM or guild not found
|
|
306
|
+
*/
|
|
307
|
+
async resolveGuild() {
|
|
308
|
+
return this.guildId ? this.client.guilds.resolve(this.guildId) : null;
|
|
309
|
+
}
|
|
295
310
|
/** @param data - API message from POST/PATCH /channels/{id}/messages or gateway MESSAGE_CREATE */
|
|
296
311
|
constructor(client, data) {
|
|
297
312
|
super();
|
|
@@ -327,7 +342,7 @@ var init_Message = __esm({
|
|
|
327
342
|
* @param options - Text content or object with content, embeds, and/or files
|
|
328
343
|
* @example
|
|
329
344
|
* await message.send('Pong!');
|
|
330
|
-
* await message.send({ embeds: [embed
|
|
345
|
+
* await message.send({ embeds: [embed] }); // EmbedBuilder auto-converted
|
|
331
346
|
* await message.send({ content: 'File', files: [{ name: 'data.txt', data }] });
|
|
332
347
|
*/
|
|
333
348
|
async send(options) {
|
|
@@ -344,14 +359,17 @@ var init_Message = __esm({
|
|
|
344
359
|
* @param options - Text content or object with content and/or embeds
|
|
345
360
|
* @example
|
|
346
361
|
* await message.sendTo(logChannelId, 'User ' + message.author.username + ' said: ' + message.content);
|
|
347
|
-
* await message.sendTo(announceChannelId, { embeds: [embed
|
|
362
|
+
* await message.sendTo(announceChannelId, { embeds: [embed] });
|
|
348
363
|
*/
|
|
349
364
|
async sendTo(channelId, options) {
|
|
350
365
|
return this.client.channels.send(channelId, options);
|
|
351
366
|
}
|
|
352
367
|
/**
|
|
353
|
-
* Reply to this message.
|
|
368
|
+
* Reply to this message (shows as a reply in the client).
|
|
354
369
|
* @param options - Text content or object with content, embeds, and/or files
|
|
370
|
+
* @example
|
|
371
|
+
* await message.reply('Pong!');
|
|
372
|
+
* await message.reply({ embeds: [embed] });
|
|
355
373
|
*/
|
|
356
374
|
async reply(options) {
|
|
357
375
|
const opts = typeof options === "string" ? { content: options } : options;
|
|
@@ -743,7 +761,7 @@ var init_Webhook = __esm({
|
|
|
743
761
|
* @throws Error if token is not available
|
|
744
762
|
* @example
|
|
745
763
|
* await webhook.send('Hello!');
|
|
746
|
-
* await webhook.send({ embeds: [embed
|
|
764
|
+
* await webhook.send({ embeds: [embed] });
|
|
747
765
|
* await webhook.send({ content: 'File attached', files: [{ name: 'data.txt', data: buffer }] });
|
|
748
766
|
* const msg = await webhook.send({ content: 'Hi' }, true);
|
|
749
767
|
*/
|
|
@@ -1484,6 +1502,19 @@ var init_GuildMemberManager = __esm({
|
|
|
1484
1502
|
super();
|
|
1485
1503
|
this.guild = guild;
|
|
1486
1504
|
}
|
|
1505
|
+
/**
|
|
1506
|
+
* Get a guild member from cache or fetch from the API if not present.
|
|
1507
|
+
* Convenience helper to avoid repeating `guild.members.get(userId) ?? (await guild.fetchMember(userId))`.
|
|
1508
|
+
* @param userId - Snowflake of the user
|
|
1509
|
+
* @returns The guild member
|
|
1510
|
+
* @throws FluxerError with MEMBER_NOT_FOUND if user is not in the guild (404)
|
|
1511
|
+
* @example
|
|
1512
|
+
* const member = await guild.members.resolve(userId);
|
|
1513
|
+
* console.log(member.displayName);
|
|
1514
|
+
*/
|
|
1515
|
+
async resolve(userId) {
|
|
1516
|
+
return this.get(userId) ?? this.guild.fetchMember(userId);
|
|
1517
|
+
}
|
|
1487
1518
|
/**
|
|
1488
1519
|
* The current bot user as a GuildMember in this guild.
|
|
1489
1520
|
* Returns null if the bot's member is not cached or client.user is null.
|
|
@@ -2490,6 +2521,30 @@ var init_MessageReaction = __esm({
|
|
|
2490
2521
|
}
|
|
2491
2522
|
});
|
|
2492
2523
|
|
|
2524
|
+
// src/util/guildUtils.ts
|
|
2525
|
+
var guildUtils_exports = {};
|
|
2526
|
+
__export(guildUtils_exports, {
|
|
2527
|
+
normalizeGuildPayload: () => normalizeGuildPayload
|
|
2528
|
+
});
|
|
2529
|
+
function normalizeGuildPayload(raw) {
|
|
2530
|
+
if (!raw || typeof raw !== "object") {
|
|
2531
|
+
return null;
|
|
2532
|
+
}
|
|
2533
|
+
if ("properties" in raw && raw.properties != null && typeof raw.properties === "object") {
|
|
2534
|
+
const r = raw;
|
|
2535
|
+
return {
|
|
2536
|
+
...r.properties,
|
|
2537
|
+
roles: r.roles
|
|
2538
|
+
};
|
|
2539
|
+
}
|
|
2540
|
+
return raw;
|
|
2541
|
+
}
|
|
2542
|
+
var init_guildUtils = __esm({
|
|
2543
|
+
"src/util/guildUtils.ts"() {
|
|
2544
|
+
"use strict";
|
|
2545
|
+
}
|
|
2546
|
+
});
|
|
2547
|
+
|
|
2493
2548
|
// src/client/ClientUser.ts
|
|
2494
2549
|
var ClientUser_exports = {};
|
|
2495
2550
|
__export(ClientUser_exports, {
|
|
@@ -2584,6 +2639,8 @@ __export(index_exports, {
|
|
|
2584
2639
|
cdnDisplayAvatarURL: () => cdnDisplayAvatarURL,
|
|
2585
2640
|
cdnMemberAvatarURL: () => cdnMemberAvatarURL,
|
|
2586
2641
|
cdnMemberBannerURL: () => cdnMemberBannerURL,
|
|
2642
|
+
parsePrefixCommand: () => import_util8.parsePrefixCommand,
|
|
2643
|
+
parseUserMention: () => import_util8.parseUserMention,
|
|
2587
2644
|
resolvePermissionsToBitfield: () => import_util9.resolvePermissionsToBitfield,
|
|
2588
2645
|
resolveTenorToImageUrl: () => import_util8.resolveTenorToImageUrl
|
|
2589
2646
|
});
|
|
@@ -2607,6 +2664,28 @@ var ChannelManager = class extends import_collection4.Collection {
|
|
|
2607
2664
|
constructor(client) {
|
|
2608
2665
|
super();
|
|
2609
2666
|
this.client = client;
|
|
2667
|
+
this.maxSize = client.options?.cache?.channels ?? 0;
|
|
2668
|
+
}
|
|
2669
|
+
maxSize;
|
|
2670
|
+
set(key, value) {
|
|
2671
|
+
if (this.maxSize > 0 && this.size >= this.maxSize && !this.has(key)) {
|
|
2672
|
+
const firstKey = this.keys().next().value;
|
|
2673
|
+
if (firstKey !== void 0) this.delete(firstKey);
|
|
2674
|
+
}
|
|
2675
|
+
return super.set(key, value);
|
|
2676
|
+
}
|
|
2677
|
+
/**
|
|
2678
|
+
* Get a channel from cache or fetch from the API if not present.
|
|
2679
|
+
* Convenience helper to avoid repeating `client.channels.get(id) ?? (await client.channels.fetch(id))`.
|
|
2680
|
+
* @param channelId - Snowflake of the channel
|
|
2681
|
+
* @returns The channel
|
|
2682
|
+
* @throws FluxerError with CHANNEL_NOT_FOUND if the channel does not exist
|
|
2683
|
+
* @example
|
|
2684
|
+
* const channel = await client.channels.resolve(message.channelId);
|
|
2685
|
+
* if (channel?.isSendable()) await channel.send('Hello!');
|
|
2686
|
+
*/
|
|
2687
|
+
async resolve(channelId) {
|
|
2688
|
+
return this.get(channelId) ?? this.fetch(channelId);
|
|
2610
2689
|
}
|
|
2611
2690
|
/**
|
|
2612
2691
|
* Fetch a channel by ID from the API (or return from cache if present).
|
|
@@ -2632,6 +2711,10 @@ var ChannelManager = class extends import_collection4.Collection {
|
|
|
2632
2711
|
});
|
|
2633
2712
|
}
|
|
2634
2713
|
this.set(channel.id, channel);
|
|
2714
|
+
if ("guildId" in channel && channel.guildId) {
|
|
2715
|
+
const guild = this.client.guilds.get(channel.guildId);
|
|
2716
|
+
if (guild) guild.channels.set(channel.id, channel);
|
|
2717
|
+
}
|
|
2635
2718
|
return channel;
|
|
2636
2719
|
} catch (err) {
|
|
2637
2720
|
if (err instanceof import_rest2.RateLimitError) throw err;
|
|
@@ -2650,15 +2733,15 @@ var ChannelManager = class extends import_collection4.Collection {
|
|
|
2650
2733
|
* @param messageId - Snowflake of the message
|
|
2651
2734
|
* @returns The message
|
|
2652
2735
|
* @throws FluxerError with MESSAGE_NOT_FOUND if the message does not exist
|
|
2653
|
-
* @deprecated Use channel.messages.fetch(messageId). Prefer (await client.channels.
|
|
2736
|
+
* @deprecated Use channel.messages.fetch(messageId). Prefer (await client.channels.resolve(channelId))?.messages?.fetch(messageId).
|
|
2654
2737
|
* @example
|
|
2655
|
-
* const channel = await client.channels.
|
|
2738
|
+
* const channel = await client.channels.resolve(channelId);
|
|
2656
2739
|
* const message = await channel?.messages?.fetch(messageId);
|
|
2657
2740
|
*/
|
|
2658
2741
|
async fetchMessage(channelId, messageId) {
|
|
2659
2742
|
(0, import_util2.emitDeprecationWarning)(
|
|
2660
2743
|
"ChannelManager.fetchMessage()",
|
|
2661
|
-
"Use channel.messages.fetch(messageId). Prefer (await client.channels.
|
|
2744
|
+
"Use channel.messages.fetch(messageId). Prefer (await client.channels.resolve(channelId))?.messages?.fetch(messageId)."
|
|
2662
2745
|
);
|
|
2663
2746
|
try {
|
|
2664
2747
|
const { Message: Message2 } = await Promise.resolve().then(() => (init_Message(), Message_exports));
|
|
@@ -2685,7 +2768,7 @@ var ChannelManager = class extends import_collection4.Collection {
|
|
|
2685
2768
|
* @returns The created message
|
|
2686
2769
|
* @example
|
|
2687
2770
|
* await client.channels.send(logChannelId, 'User joined!');
|
|
2688
|
-
* await client.channels.send(channelId, { embeds: [embed
|
|
2771
|
+
* await client.channels.send(channelId, { embeds: [embed] });
|
|
2689
2772
|
* await client.channels.send(channelId, { content: 'Report', files: [{ name: 'log.txt', data }] });
|
|
2690
2773
|
*/
|
|
2691
2774
|
async send(channelId, payload) {
|
|
@@ -2706,6 +2789,27 @@ var GuildManager = class extends import_collection7.Collection {
|
|
|
2706
2789
|
constructor(client) {
|
|
2707
2790
|
super();
|
|
2708
2791
|
this.client = client;
|
|
2792
|
+
this.maxSize = client.options?.cache?.guilds ?? 0;
|
|
2793
|
+
}
|
|
2794
|
+
maxSize;
|
|
2795
|
+
set(key, value) {
|
|
2796
|
+
if (this.maxSize > 0 && this.size >= this.maxSize && !this.has(key)) {
|
|
2797
|
+
const firstKey = this.keys().next().value;
|
|
2798
|
+
if (firstKey !== void 0) this.delete(firstKey);
|
|
2799
|
+
}
|
|
2800
|
+
return super.set(key, value);
|
|
2801
|
+
}
|
|
2802
|
+
/**
|
|
2803
|
+
* Get a guild from cache or fetch from the API if not present.
|
|
2804
|
+
* Convenience helper to avoid repeating `client.guilds.get(id) ?? (await client.guilds.fetch(id))`.
|
|
2805
|
+
* @param guildId - Snowflake of the guild
|
|
2806
|
+
* @returns The guild, or null if not found
|
|
2807
|
+
* @example
|
|
2808
|
+
* const guild = await client.guilds.resolve(message.guildId);
|
|
2809
|
+
* if (guild) console.log(guild.name);
|
|
2810
|
+
*/
|
|
2811
|
+
async resolve(guildId) {
|
|
2812
|
+
return this.get(guildId) ?? this.fetch(guildId);
|
|
2709
2813
|
}
|
|
2710
2814
|
/**
|
|
2711
2815
|
* Create a guild. POST /guilds.
|
|
@@ -2762,6 +2866,15 @@ var UsersManager = class extends import_collection8.Collection {
|
|
|
2762
2866
|
constructor(client) {
|
|
2763
2867
|
super();
|
|
2764
2868
|
this.client = client;
|
|
2869
|
+
this.maxSize = client.options?.cache?.users ?? 0;
|
|
2870
|
+
}
|
|
2871
|
+
maxSize;
|
|
2872
|
+
set(key, value) {
|
|
2873
|
+
if (this.maxSize > 0 && this.size >= this.maxSize && !this.has(key)) {
|
|
2874
|
+
const firstKey = this.keys().next().value;
|
|
2875
|
+
if (firstKey !== void 0) this.delete(firstKey);
|
|
2876
|
+
}
|
|
2877
|
+
return super.set(key, value);
|
|
2765
2878
|
}
|
|
2766
2879
|
/**
|
|
2767
2880
|
* Fetch a user by ID from the API.
|
|
@@ -2904,14 +3017,18 @@ handlers.set("GUILD_CREATE", async (client, d) => {
|
|
|
2904
3017
|
const { Guild: Guild2 } = await Promise.resolve().then(() => (init_Guild(), Guild_exports));
|
|
2905
3018
|
const { Channel: Channel2 } = await Promise.resolve().then(() => (init_Channel(), Channel_exports));
|
|
2906
3019
|
const { GuildMember: GuildMember2 } = await Promise.resolve().then(() => (init_GuildMember(), GuildMember_exports));
|
|
2907
|
-
const
|
|
2908
|
-
const guildData =
|
|
3020
|
+
const { normalizeGuildPayload: normalizeGuildPayload2 } = await Promise.resolve().then(() => (init_guildUtils(), guildUtils_exports));
|
|
3021
|
+
const guildData = normalizeGuildPayload2(d);
|
|
3022
|
+
if (!guildData) return;
|
|
2909
3023
|
const guild = new Guild2(client, guildData);
|
|
2910
3024
|
client.guilds.set(guild.id, guild);
|
|
2911
3025
|
const g = d;
|
|
2912
3026
|
for (const ch of g.channels ?? []) {
|
|
2913
3027
|
const channel = Channel2.from(client, ch);
|
|
2914
|
-
if (channel)
|
|
3028
|
+
if (channel) {
|
|
3029
|
+
client.channels.set(channel.id, channel);
|
|
3030
|
+
guild.channels.set(channel.id, channel);
|
|
3031
|
+
}
|
|
2915
3032
|
}
|
|
2916
3033
|
for (const m of g.members ?? []) {
|
|
2917
3034
|
if (m?.user?.id) {
|
|
@@ -2927,8 +3044,9 @@ handlers.set("GUILD_CREATE", async (client, d) => {
|
|
|
2927
3044
|
});
|
|
2928
3045
|
handlers.set("GUILD_UPDATE", async (client, d) => {
|
|
2929
3046
|
const { Guild: Guild2 } = await Promise.resolve().then(() => (init_Guild(), Guild_exports));
|
|
2930
|
-
const
|
|
2931
|
-
const guildData =
|
|
3047
|
+
const { normalizeGuildPayload: normalizeGuildPayload2 } = await Promise.resolve().then(() => (init_guildUtils(), guildUtils_exports));
|
|
3048
|
+
const guildData = normalizeGuildPayload2(d);
|
|
3049
|
+
if (!guildData) return;
|
|
2932
3050
|
const old = client.guilds.get(guildData.id);
|
|
2933
3051
|
const updated = new Guild2(client, guildData);
|
|
2934
3052
|
client.guilds.set(updated.id, updated);
|
|
@@ -2947,6 +3065,10 @@ handlers.set("CHANNEL_CREATE", async (client, d) => {
|
|
|
2947
3065
|
const ch = Channel2.from(client, d);
|
|
2948
3066
|
if (ch) {
|
|
2949
3067
|
client.channels.set(ch.id, ch);
|
|
3068
|
+
if ("guildId" in ch && ch.guildId) {
|
|
3069
|
+
const guild = client.guilds.get(ch.guildId);
|
|
3070
|
+
if (guild) guild.channels.set(ch.id, ch);
|
|
3071
|
+
}
|
|
2950
3072
|
client.emit(Events.ChannelCreate, ch);
|
|
2951
3073
|
}
|
|
2952
3074
|
});
|
|
@@ -2957,6 +3079,10 @@ handlers.set("CHANNEL_UPDATE", async (client, d) => {
|
|
|
2957
3079
|
const newCh = Channel2.from(client, ch);
|
|
2958
3080
|
if (newCh) {
|
|
2959
3081
|
client.channels.set(newCh.id, newCh);
|
|
3082
|
+
if ("guildId" in newCh && newCh.guildId) {
|
|
3083
|
+
const guild = client.guilds.get(newCh.guildId);
|
|
3084
|
+
if (guild) guild.channels.set(newCh.id, newCh);
|
|
3085
|
+
}
|
|
2960
3086
|
client.emit(Events.ChannelUpdate, oldCh ?? newCh, newCh);
|
|
2961
3087
|
}
|
|
2962
3088
|
});
|
|
@@ -2964,6 +3090,10 @@ handlers.set("CHANNEL_DELETE", async (client, d) => {
|
|
|
2964
3090
|
const ch = d;
|
|
2965
3091
|
const channel = client.channels.get(ch.id);
|
|
2966
3092
|
if (channel) {
|
|
3093
|
+
if ("guildId" in channel && channel.guildId) {
|
|
3094
|
+
const guild = client.guilds.get(channel.guildId);
|
|
3095
|
+
if (guild) guild.channels.delete(channel.id);
|
|
3096
|
+
}
|
|
2967
3097
|
client.channels.delete(ch.id);
|
|
2968
3098
|
client.emit(Events.ChannelDelete, channel);
|
|
2969
3099
|
}
|
|
@@ -3029,7 +3159,12 @@ handlers.set("MESSAGE_DELETE_BULK", async (client, d) => {
|
|
|
3029
3159
|
handlers.set("GUILD_BAN_ADD", async (client, d) => {
|
|
3030
3160
|
const data = d;
|
|
3031
3161
|
const { GuildBan: GuildBan2 } = await Promise.resolve().then(() => (init_GuildBan(), GuildBan_exports));
|
|
3032
|
-
const
|
|
3162
|
+
const banData = {
|
|
3163
|
+
user: data.user,
|
|
3164
|
+
reason: data.reason ?? null,
|
|
3165
|
+
guild_id: data.guild_id
|
|
3166
|
+
};
|
|
3167
|
+
const ban = new GuildBan2(client, banData, data.guild_id);
|
|
3033
3168
|
client.emit(Events.GuildBanAdd, ban);
|
|
3034
3169
|
});
|
|
3035
3170
|
handlers.set("GUILD_BAN_REMOVE", async (client, d) => {
|
|
@@ -3190,9 +3325,9 @@ var Client = class extends import_events3.EventEmitter {
|
|
|
3190
3325
|
}
|
|
3191
3326
|
return (0, import_util7.formatEmoji)(parsed);
|
|
3192
3327
|
}
|
|
3193
|
-
if (!/^\w+$/.test(parsed.name)) return
|
|
3328
|
+
if (!/^\w+$/.test(parsed.name)) return parsed.name;
|
|
3194
3329
|
const unicodeFromShortcode = (0, import_util7.getUnicodeFromShortcode)(parsed.name);
|
|
3195
|
-
if (unicodeFromShortcode) return
|
|
3330
|
+
if (unicodeFromShortcode) return unicodeFromShortcode;
|
|
3196
3331
|
if (guildId) {
|
|
3197
3332
|
const emojis = await this.rest.get(import_types20.Routes.guildEmojis(guildId));
|
|
3198
3333
|
const list = Array.isArray(emojis) ? emojis : Object.values(emojis ?? {});
|
|
@@ -3207,7 +3342,7 @@ var Client = class extends import_events3.EventEmitter {
|
|
|
3207
3342
|
`Custom emoji ":${parsed.name}:" requires guild context. Use message.react() in a guild channel, or pass guildId to client.resolveEmoji().`
|
|
3208
3343
|
);
|
|
3209
3344
|
}
|
|
3210
|
-
return
|
|
3345
|
+
return parsed.name;
|
|
3211
3346
|
}
|
|
3212
3347
|
/**
|
|
3213
3348
|
* Asserts that a custom emoji (by id) belongs to the given guild.
|
|
@@ -3237,15 +3372,15 @@ var Client = class extends import_events3.EventEmitter {
|
|
|
3237
3372
|
* @param messageId - Snowflake of the message
|
|
3238
3373
|
* @returns The message
|
|
3239
3374
|
* @throws FluxerError with MESSAGE_NOT_FOUND if the message does not exist
|
|
3240
|
-
* @deprecated Use channel.messages.fetch(messageId). For IDs-only: (await client.channels.
|
|
3375
|
+
* @deprecated Use channel.messages.fetch(messageId). For IDs-only: (await client.channels.resolve(channelId))?.messages?.fetch(messageId)
|
|
3241
3376
|
* @example
|
|
3242
|
-
* const channel = await client.channels.
|
|
3377
|
+
* const channel = await client.channels.resolve(channelId);
|
|
3243
3378
|
* const message = await channel?.messages?.fetch(messageId);
|
|
3244
3379
|
*/
|
|
3245
3380
|
async fetchMessage(channelId, messageId) {
|
|
3246
3381
|
(0, import_util7.emitDeprecationWarning)(
|
|
3247
3382
|
"Client.fetchMessage()",
|
|
3248
|
-
"Use channel.messages.fetch(messageId). For IDs-only: (await client.channels.
|
|
3383
|
+
"Use channel.messages.fetch(messageId). For IDs-only: (await client.channels.resolve(channelId))?.messages?.fetch(messageId)"
|
|
3249
3384
|
);
|
|
3250
3385
|
return this.channels.fetchMessage(channelId, messageId);
|
|
3251
3386
|
}
|
|
@@ -3306,12 +3441,14 @@ var Client = class extends import_events3.EventEmitter {
|
|
|
3306
3441
|
this.rest.setToken(token);
|
|
3307
3442
|
let intents = this.options.intents ?? 0;
|
|
3308
3443
|
if (intents !== 0) {
|
|
3309
|
-
if (
|
|
3310
|
-
|
|
3311
|
-
|
|
3312
|
-
|
|
3313
|
-
|
|
3314
|
-
|
|
3444
|
+
if (!this.options.suppressIntentWarning) {
|
|
3445
|
+
if (typeof process !== "undefined" && process.emitWarning) {
|
|
3446
|
+
process.emitWarning("Fluxer does not support intents yet. Value has been set to 0.", {
|
|
3447
|
+
type: "FluxerIntents"
|
|
3448
|
+
});
|
|
3449
|
+
} else {
|
|
3450
|
+
console.warn("Fluxer does not support intents yet. Value has been set to 0.");
|
|
3451
|
+
}
|
|
3315
3452
|
}
|
|
3316
3453
|
intents = 0;
|
|
3317
3454
|
}
|
|
@@ -3337,17 +3474,19 @@ var Client = class extends import_events3.EventEmitter {
|
|
|
3337
3474
|
const { Guild: Guild2 } = await Promise.resolve().then(() => (init_Guild(), Guild_exports));
|
|
3338
3475
|
const { Channel: Channel2 } = await Promise.resolve().then(() => (init_Channel(), Channel_exports));
|
|
3339
3476
|
this.user = new ClientUser2(this, data.user);
|
|
3477
|
+
const { normalizeGuildPayload: normalizeGuildPayload2 } = await Promise.resolve().then(() => (init_guildUtils(), guildUtils_exports));
|
|
3340
3478
|
for (const g of data.guilds ?? []) {
|
|
3341
|
-
const guildData = g
|
|
3342
|
-
|
|
3343
|
-
roles: g.roles
|
|
3344
|
-
} : g;
|
|
3479
|
+
const guildData = normalizeGuildPayload2(g);
|
|
3480
|
+
if (!guildData) continue;
|
|
3345
3481
|
const guild = new Guild2(this, guildData);
|
|
3346
3482
|
this.guilds.set(guild.id, guild);
|
|
3347
3483
|
const withCh = g;
|
|
3348
3484
|
for (const ch of withCh.channels ?? []) {
|
|
3349
3485
|
const channel = Channel2.from(this, ch);
|
|
3350
|
-
if (channel)
|
|
3486
|
+
if (channel) {
|
|
3487
|
+
this.channels.set(channel.id, channel);
|
|
3488
|
+
guild.channels.set(channel.id, channel);
|
|
3489
|
+
}
|
|
3351
3490
|
}
|
|
3352
3491
|
if (withCh.voice_states?.length) {
|
|
3353
3492
|
this.emit(Events.VoiceStatesSync, {
|
|
@@ -3382,6 +3521,17 @@ var Client = class extends import_events3.EventEmitter {
|
|
|
3382
3521
|
isReady() {
|
|
3383
3522
|
return this.readyAt !== null && this.user !== null;
|
|
3384
3523
|
}
|
|
3524
|
+
/**
|
|
3525
|
+
* Throws if the client is not ready. Use before accessing client.user or other post-ready state.
|
|
3526
|
+
* @throws FluxerError with CLIENT_NOT_READY if client has not received Ready yet
|
|
3527
|
+
*/
|
|
3528
|
+
assertReady() {
|
|
3529
|
+
if (!this.isReady()) {
|
|
3530
|
+
throw new FluxerError("Client is not ready yet. Wait for the Ready event before accessing client.user.", {
|
|
3531
|
+
code: ErrorCodes.ClientNotReady
|
|
3532
|
+
});
|
|
3533
|
+
}
|
|
3534
|
+
}
|
|
3385
3535
|
static get Routes() {
|
|
3386
3536
|
return import_types20.Routes;
|
|
3387
3537
|
}
|
|
@@ -3465,6 +3615,8 @@ init_cdn();
|
|
|
3465
3615
|
cdnDisplayAvatarURL,
|
|
3466
3616
|
cdnMemberAvatarURL,
|
|
3467
3617
|
cdnMemberBannerURL,
|
|
3618
|
+
parsePrefixCommand,
|
|
3619
|
+
parseUserMention,
|
|
3468
3620
|
resolvePermissionsToBitfield,
|
|
3469
3621
|
resolveTenorToImageUrl
|
|
3470
3622
|
});
|