@fluxerjs/core 1.1.9 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +1149 -997
- package/dist/index.d.ts +1149 -997
- package/dist/index.js +2586 -2608
- package/dist/index.mjs +2721 -264
- package/package.json +8 -8
- 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-JFQXR7SZ.mjs +0 -22
- 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-2OHUFUV5.mjs +0 -9
- 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-3PLQFT2I.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-7CXLTPKY.mjs +0 -7
- package/dist/GuildBan-M4PA3HAA.mjs +0 -7
- package/dist/GuildEmoji-LP55RVIV.mjs +0 -7
- package/dist/GuildEmoji-OCXBPS6I.mjs +0 -8
- 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-FSGDPKUU.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-B7AZADJR.mjs +0 -8
- package/dist/GuildSticker-STHUU6RM.mjs +0 -7
- package/dist/Invite-4WSFNMH4.mjs +0 -7
- package/dist/Invite-UM5BU5A6.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-QNWAPT55.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-MUBQ6GIN.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-SERSJFJC.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-EARQN5EG.mjs +0 -10
- 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-24E6OQID.mjs +0 -193
- 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-2ZSMLDEI.mjs +0 -114
- 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-4OEOU7G7.mjs +0 -319
- 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-4SWR3ZEZ.mjs +0 -579
- 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-6S3BDHBI.mjs +0 -28
- 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-AH7KYH2Z.mjs +0 -50
- 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-BKPVGBOT.mjs +0 -8
- 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-DJQXAQLR.mjs +0 -496
- 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-FHFXUKFP.mjs +0 -147
- 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-G6F6VL4O.mjs +0 -54
- 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-IHXSHE2Z.mjs +0 -56
- 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-JW4BRX5E.mjs +0 -140
- 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-KR26CBFE.mjs +0 -58
- 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-QEXIYXXU.mjs +0 -62
- 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-TDQUAKUL.mjs +0 -64
- 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-UXIF75BV.mjs +0 -36
- 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-VJDH54HJ.mjs +0 -56
- 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-XNS4O6QJ.mjs +0 -7
- 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.mts
CHANGED
|
@@ -1,126 +1,13 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
1
|
+
import { EventEmitter } from 'events';
|
|
2
|
+
import { REST } from '@fluxerjs/rest';
|
|
3
|
+
import { WebSocketManager } from '@fluxerjs/ws';
|
|
4
|
+
import { APIEmbed, APIUserPartial, APIRole, RESTUpdateRoleBody, APIGuildMember, APIWebhook, APIWebhookUpdateRequest, APIWebhookTokenUpdateRequest, APIBan, APIEmoji, APISticker, GuildFeature, GuildVerificationLevel, DefaultMessageNotifications, GuildExplicitContentFilter, GuildMFALevel, APIGuild, RESTCreateRoleBody, APIGuildAuditLog, APIVanityURL, GatewayReactionEmoji, GatewayMessageReactionAddDispatchData, GatewayMessageReactionRemoveDispatchData, APIMessageAttachment, MessageType, APIMessageSticker, APIMessageReaction, APIMessageReference, APIMessageSnapshot, APIMessageCall, APIMessage, APIGuildPartial, APIChannelPartial, APIInvite, APIChannelOverwrite, APIChannel, ChannelType, GatewayPresenceUpdateData, APIProfileResponse, GatewayMessageReactionRemoveAllDispatchData, GatewayMessageReactionRemoveEmojiDispatchData, APIApplicationCommandInteraction, GatewayVoiceStateUpdateDispatchData, GatewayVoiceServerUpdateDispatchData, GatewayMessageDeleteBulkDispatchData, GatewayGuildEmojisUpdateDispatchData, GatewayGuildStickersUpdateDispatchData, GatewayGuildIntegrationsUpdateDispatchData, GatewayGuildRoleCreateDispatchData, GatewayGuildRoleUpdateDispatchData, GatewayGuildRoleDeleteDispatchData, GatewayGuildScheduledEventCreateDispatchData, GatewayGuildScheduledEventUpdateDispatchData, GatewayGuildScheduledEventDeleteDispatchData, GatewayChannelPinsUpdateDispatchData, GatewayInviteDeleteDispatchData, GatewayTypingStartDispatchData, GatewayUserUpdateDispatchData, GatewayPresenceUpdateDispatchData, GatewayWebhooksUpdateDispatchData, APIInstance, GatewaySendPayload, Routes } from '@fluxerjs/types';
|
|
3
5
|
export { GatewayOpcodes, MessageAttachmentFlags, Routes } from '@fluxerjs/types';
|
|
4
|
-
import { PermissionResolvable } from '@fluxerjs/util';
|
|
5
|
-
export { PermissionFlags, PermissionResolvable, PermissionString, PermissionsBitField, UserFlagsBitField, UserFlagsBits, UserFlagsResolvable, UserFlagsString, 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';
|
|
9
|
-
import {
|
|
10
|
-
|
|
11
|
-
import { WebSocketManager } from '@fluxerjs/ws';
|
|
12
|
-
|
|
13
|
-
/** Base class for all Fluxer structures. Provides the client reference. */
|
|
14
|
-
declare abstract class Base {
|
|
15
|
-
/** The client instance this structure belongs to. */
|
|
16
|
-
abstract readonly client: Client;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
/** Represents a custom sticker in a guild. */
|
|
20
|
-
declare class GuildSticker extends Base {
|
|
21
|
-
readonly client: Client;
|
|
22
|
-
readonly id: string;
|
|
23
|
-
readonly guildId: string;
|
|
24
|
-
name: string;
|
|
25
|
-
description: string;
|
|
26
|
-
readonly tags: string[];
|
|
27
|
-
readonly animated: boolean;
|
|
28
|
-
/** @param data - API sticker from GET /guilds/{id}/stickers or guild sticker events */
|
|
29
|
-
constructor(client: Client, data: APISticker & {
|
|
30
|
-
guild_id?: string;
|
|
31
|
-
}, guildId: string);
|
|
32
|
-
/** CDN URL for this sticker image. */
|
|
33
|
-
get url(): string;
|
|
34
|
-
/** Delete this sticker. Requires Manage Emojis and Stickers permission. */
|
|
35
|
-
delete(): Promise<void>;
|
|
36
|
-
/**
|
|
37
|
-
* Edit this sticker's name and/or description.
|
|
38
|
-
* Requires Manage Emojis and Stickers permission.
|
|
39
|
-
*/
|
|
40
|
-
edit(options: {
|
|
41
|
-
name?: string;
|
|
42
|
-
description?: string;
|
|
43
|
-
}): Promise<GuildSticker>;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
/** Represents a custom emoji in a guild. */
|
|
47
|
-
declare class GuildEmoji extends Base {
|
|
48
|
-
readonly client: Client;
|
|
49
|
-
readonly id: string;
|
|
50
|
-
readonly guildId: string;
|
|
51
|
-
name: string;
|
|
52
|
-
readonly animated: boolean;
|
|
53
|
-
/** @param data - API emoji from GET /guilds/{id}/emojis or guild emoji events */
|
|
54
|
-
constructor(client: Client, data: APIEmoji & {
|
|
55
|
-
guild_id?: string;
|
|
56
|
-
}, guildId: string);
|
|
57
|
-
/** CDN URL for this emoji image. */
|
|
58
|
-
get url(): string;
|
|
59
|
-
/** Emoji identifier for use in reactions: `name:id` */
|
|
60
|
-
get identifier(): string;
|
|
61
|
-
/** Delete this emoji. Requires Manage Emojis and Stickers permission. */
|
|
62
|
-
delete(): Promise<void>;
|
|
63
|
-
/**
|
|
64
|
-
* Edit this emoji's name.
|
|
65
|
-
* Requires Manage Emojis and Stickers permission.
|
|
66
|
-
*/
|
|
67
|
-
edit(options: {
|
|
68
|
-
name: string;
|
|
69
|
-
}): Promise<GuildEmoji>;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
/**
|
|
73
|
-
* Manages messages for a channel. Access via channel.messages.
|
|
74
|
-
* @example
|
|
75
|
-
* const message = await channel.messages.fetch(messageId);
|
|
76
|
-
* if (message) await message.edit({ content: 'Updated!' });
|
|
77
|
-
*/
|
|
78
|
-
declare class MessageManager {
|
|
79
|
-
private readonly client;
|
|
80
|
-
private readonly channelId;
|
|
81
|
-
constructor(client: Client, channelId: string);
|
|
82
|
-
/**
|
|
83
|
-
* Fetch a message by ID from this channel.
|
|
84
|
-
* @param messageId - Snowflake of the message
|
|
85
|
-
* @returns The message
|
|
86
|
-
* @throws FluxerError with MESSAGE_NOT_FOUND if the message does not exist
|
|
87
|
-
*/
|
|
88
|
-
fetch(messageId: string): Promise<Message>;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
interface MessageCollectorOptions {
|
|
92
|
-
/** Filter function. Return true to collect the message. */
|
|
93
|
-
filter?: (message: Message) => boolean;
|
|
94
|
-
/** Max duration in ms. Collector stops when time expires. */
|
|
95
|
-
time?: number;
|
|
96
|
-
/** Max messages to collect. Collector stops when limit reached. */
|
|
97
|
-
max?: number;
|
|
98
|
-
}
|
|
99
|
-
type MessageCollectorEndReason = 'time' | 'limit' | 'user';
|
|
100
|
-
interface MessageCollectorEvents {
|
|
101
|
-
collect: [message: Message];
|
|
102
|
-
end: [collected: Collection<string, Message>, reason: MessageCollectorEndReason];
|
|
103
|
-
}
|
|
104
|
-
/**
|
|
105
|
-
* Collects messages in a channel. Use channel.createMessageCollector().
|
|
106
|
-
* @example
|
|
107
|
-
* const collector = channel.createMessageCollector({ filter: m => m.author.id === userId, time: 10000 });
|
|
108
|
-
* collector.on('collect', m => console.log(m.content));
|
|
109
|
-
* collector.on('end', (collected, reason) => console.log(`Stopped: ${reason}`));
|
|
110
|
-
*/
|
|
111
|
-
declare class MessageCollector extends EventEmitter {
|
|
112
|
-
readonly client: Client;
|
|
113
|
-
readonly channelId: string;
|
|
114
|
-
readonly options: Required<MessageCollectorOptions>;
|
|
115
|
-
readonly collected: Collection<string, Message>;
|
|
116
|
-
private _timeout;
|
|
117
|
-
private _ended;
|
|
118
|
-
private _listener;
|
|
119
|
-
constructor(client: Client, channelId: string, options?: MessageCollectorOptions);
|
|
120
|
-
stop(reason?: MessageCollectorEndReason): void;
|
|
121
|
-
on<K extends keyof MessageCollectorEvents>(event: K, listener: (...args: MessageCollectorEvents[K]) => void): this;
|
|
122
|
-
emit<K extends keyof MessageCollectorEvents>(event: K, ...args: MessageCollectorEvents[K]): boolean;
|
|
123
|
-
}
|
|
9
|
+
import { PermissionResolvable } from '@fluxerjs/util';
|
|
10
|
+
export { PermissionFlags, PermissionResolvable, PermissionString, PermissionsBitField, UserFlagsBitField, UserFlagsBits, UserFlagsResolvable, UserFlagsString, parsePrefixCommand, parseUserMention, resolvePermissionsToBitfield, resolveTenorToImageUrl } from '@fluxerjs/util';
|
|
124
11
|
|
|
125
12
|
/** File data for message attachment uploads. Use `data` for buffers or `url` to fetch from a URL. */
|
|
126
13
|
type MessageFileData = {
|
|
@@ -141,9 +28,12 @@ interface MessageAttachmentMeta {
|
|
|
141
28
|
/** MessageAttachmentFlags: IS_SPOILER (8), CONTAINS_EXPLICIT_MEDIA (16), IS_ANIMATED (32) */
|
|
142
29
|
flags?: number;
|
|
143
30
|
}
|
|
144
|
-
/** Options for sending a message (content, embeds, files). Used by Message.send, Channel.send, ChannelManager.send.
|
|
31
|
+
/** Options for sending a message (content, embeds, files). Used by Message.send, Channel.send, ChannelManager.send.
|
|
32
|
+
* EmbedBuilder instances are auto-converted to API format—no need to call .toJSON().
|
|
33
|
+
*/
|
|
145
34
|
type MessageSendOptions = string | {
|
|
146
35
|
content?: string;
|
|
36
|
+
/** EmbedBuilder instances are auto-converted; raw APIEmbed also supported. */
|
|
147
37
|
embeds?: (APIEmbed | EmbedBuilder)[];
|
|
148
38
|
/** File attachments. When present, request uses multipart/form-data. */
|
|
149
39
|
files?: MessageFileData[];
|
|
@@ -151,319 +41,803 @@ type MessageSendOptions = string | {
|
|
|
151
41
|
attachments?: MessageAttachmentMeta[];
|
|
152
42
|
};
|
|
153
43
|
|
|
154
|
-
/**
|
|
155
|
-
|
|
156
|
-
/**
|
|
157
|
-
|
|
158
|
-
id: number;
|
|
159
|
-
filename: string;
|
|
160
|
-
title?: string | null;
|
|
161
|
-
description?: string | null;
|
|
162
|
-
/** MessageAttachmentFlags: IS_SPOILER (8), CONTAINS_EXPLICIT_MEDIA (16), IS_ANIMATED (32) */
|
|
163
|
-
flags?: number;
|
|
164
|
-
}
|
|
165
|
-
/** Options for sending a message via webhook. Aligns with WebhookMessageRequest in the API. */
|
|
166
|
-
interface WebhookSendOptions {
|
|
167
|
-
/** Message text content (up to 2000 characters) */
|
|
168
|
-
content?: string;
|
|
169
|
-
/** Embed objects. Use EmbedBuilder or APIEmbed; EmbedBuilder is serialized automatically. */
|
|
170
|
-
embeds?: (APIEmbed | EmbedBuilder)[];
|
|
171
|
-
/** Override the webhook's default username for this message */
|
|
172
|
-
username?: string;
|
|
173
|
-
/** Override the webhook's default avatar URL for this message */
|
|
174
|
-
avatar_url?: string;
|
|
175
|
-
/** Text-to-speech */
|
|
176
|
-
tts?: boolean;
|
|
177
|
-
/** File attachments. When present, uses multipart/form-data (same as channel.send). */
|
|
178
|
-
files?: WebhookFileData[];
|
|
179
|
-
/** Attachment metadata for files (id = index). Use when files are provided. */
|
|
180
|
-
attachments?: WebhookAttachmentMeta[];
|
|
44
|
+
/** Base class for all Fluxer structures. Provides the client reference. */
|
|
45
|
+
declare abstract class Base {
|
|
46
|
+
/** The client instance this structure belongs to. */
|
|
47
|
+
abstract readonly client: Client;
|
|
181
48
|
}
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
*/
|
|
186
|
-
declare class Webhook extends Base {
|
|
49
|
+
|
|
50
|
+
/** Represents a user (or bot) on Fluxer. */
|
|
51
|
+
declare class User extends Base {
|
|
187
52
|
readonly client: Client;
|
|
188
53
|
readonly id: string;
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
54
|
+
username: string;
|
|
55
|
+
discriminator: string;
|
|
56
|
+
globalName: string | null;
|
|
192
57
|
avatar: string | null;
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
58
|
+
readonly bot: boolean;
|
|
59
|
+
/** RGB avatar color (e.g. 7577782). Null if not set. */
|
|
60
|
+
avatarColor: number | null;
|
|
61
|
+
/** Public flags bitfield. Null if not set. */
|
|
62
|
+
flags: number | null;
|
|
63
|
+
/** Whether this is an official system user. */
|
|
64
|
+
readonly system: boolean;
|
|
65
|
+
/** Banner hash (from profile, member, or invite context). Null when not available. */
|
|
66
|
+
banner: string | null;
|
|
67
|
+
/** @param data - API user from message author, GET /users/{id}, or GET /users/@me */
|
|
68
|
+
constructor(client: Client, data: APIUserPartial);
|
|
69
|
+
/** Update mutable fields from fresh API data. Used by getOrCreateUser cache. */
|
|
70
|
+
_patch(data: APIUserPartial): void;
|
|
201
71
|
/**
|
|
202
|
-
* Get the URL for this
|
|
203
|
-
*
|
|
72
|
+
* Get the URL for this user's avatar.
|
|
73
|
+
* Auto-detects animated avatars (hash starting with `a_`) and uses gif extension.
|
|
74
|
+
* @param options - Optional `size` and `extension` (default: png, or gif for animated)
|
|
204
75
|
*/
|
|
205
76
|
avatarURL(options?: {
|
|
206
77
|
size?: number;
|
|
207
78
|
extension?: string;
|
|
208
79
|
}): string | null;
|
|
209
|
-
/**
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
* @returns This webhook instance with updated fields
|
|
215
|
-
*/
|
|
216
|
-
edit(options: APIWebhookUpdateRequest | APIWebhookTokenUpdateRequest): Promise<Webhook>;
|
|
80
|
+
/** Get the avatar URL, or the default avatar if none set (Fluxer: fluxerstatic.com). */
|
|
81
|
+
displayAvatarURL(options?: {
|
|
82
|
+
size?: number;
|
|
83
|
+
extension?: string;
|
|
84
|
+
}): string;
|
|
217
85
|
/**
|
|
218
|
-
*
|
|
219
|
-
*
|
|
220
|
-
* @param wait - If true, waits for the API and returns the created Message; otherwise returns void (204)
|
|
221
|
-
* @throws Error if token is not available
|
|
222
|
-
* @example
|
|
223
|
-
* await webhook.send('Hello!');
|
|
224
|
-
* await webhook.send({ embeds: [embed.toJSON()] });
|
|
225
|
-
* await webhook.send({ content: 'File attached', files: [{ name: 'data.txt', data: buffer }] });
|
|
226
|
-
* const msg = await webhook.send({ content: 'Hi' }, true);
|
|
86
|
+
* Get the URL for this user's banner.
|
|
87
|
+
* Returns null if the user has no banner (only available when fetched from profile/member context).
|
|
227
88
|
*/
|
|
228
|
-
|
|
89
|
+
bannerURL(options?: {
|
|
90
|
+
size?: number;
|
|
91
|
+
extension?: string;
|
|
92
|
+
}): string | null;
|
|
93
|
+
/** Returns a mention string (e.g. `<@123456>`). */
|
|
94
|
+
toString(): string;
|
|
229
95
|
/**
|
|
230
|
-
*
|
|
231
|
-
* @
|
|
232
|
-
* @param webhookId - The webhook ID
|
|
233
|
-
* @returns Webhook without token (cannot send)
|
|
96
|
+
* Create or get a DM channel with this user.
|
|
97
|
+
* Returns the DM channel; use {@link DMChannel.send} to send messages.
|
|
234
98
|
*/
|
|
235
|
-
|
|
99
|
+
createDM(): Promise<DMChannel>;
|
|
236
100
|
/**
|
|
237
|
-
*
|
|
238
|
-
*
|
|
239
|
-
* @param webhookId - The webhook ID
|
|
240
|
-
* @param token - The webhook token (from createWebhook or stored)
|
|
241
|
-
* @param options - Optional channelId, guildId, name for display
|
|
101
|
+
* Send a DM to this user.
|
|
102
|
+
* Convenience method that creates the DM channel and sends the message.
|
|
242
103
|
*/
|
|
243
|
-
|
|
244
|
-
channelId?: string;
|
|
245
|
-
guildId?: string;
|
|
246
|
-
name?: string;
|
|
247
|
-
}): Webhook;
|
|
104
|
+
send(options: MessageSendOptions): Promise<Message>;
|
|
248
105
|
}
|
|
249
106
|
|
|
250
|
-
/**
|
|
251
|
-
declare
|
|
252
|
-
/** Whether this channel has a send method (TextChannel, DMChannel). */
|
|
253
|
-
isSendable(): this is TextChannel | DMChannel;
|
|
254
|
-
/** Whether this channel is a DM or Group DM. */
|
|
255
|
-
isDM(): boolean;
|
|
256
|
-
/** Whether this channel is voice-based (VoiceChannel). */
|
|
257
|
-
isVoice(): boolean;
|
|
258
|
-
/** Create a DM channel from API data (type DM or GroupDM). */
|
|
259
|
-
static createDM(client: Client, data: APIChannelPartial): DMChannel;
|
|
107
|
+
/** Represents a role in a guild. */
|
|
108
|
+
declare class Role extends Base {
|
|
260
109
|
readonly client: Client;
|
|
261
110
|
readonly id: string;
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
111
|
+
readonly guildId: string;
|
|
112
|
+
name: string;
|
|
113
|
+
color: number;
|
|
114
|
+
position: number;
|
|
115
|
+
permissions: string;
|
|
116
|
+
hoist: boolean;
|
|
117
|
+
mentionable: boolean;
|
|
118
|
+
unicodeEmoji: string | null;
|
|
119
|
+
/** Separately sorted position for hoisted roles. Null if not set. */
|
|
120
|
+
hoistPosition: number | null;
|
|
121
|
+
/** @param client - The client instance */
|
|
122
|
+
/** @param data - API role from GET /guilds/{id}/roles or gateway role events */
|
|
123
|
+
/** @param guildId - The guild this role belongs to */
|
|
124
|
+
constructor(client: Client, data: APIRole, guildId: string);
|
|
125
|
+
/** Update mutable fields from fresh API data. Used by edit and gateway events. */
|
|
126
|
+
_patch(data: Partial<APIRole>): void;
|
|
127
|
+
/** Returns a mention string (e.g. `<@&123456>`). */
|
|
128
|
+
toString(): string;
|
|
271
129
|
/**
|
|
272
|
-
*
|
|
273
|
-
* @param
|
|
274
|
-
* @
|
|
130
|
+
* Check if this role has a permission. Administrator grants all permissions.
|
|
131
|
+
* @param permission - Permission flag, name, or resolvable
|
|
132
|
+
* @returns true if the role has the permission
|
|
133
|
+
* @example
|
|
134
|
+
* if (role.has(PermissionFlags.BanMembers)) { ... }
|
|
135
|
+
* if (role.has('ManageChannels')) { ... }
|
|
275
136
|
*/
|
|
276
|
-
|
|
137
|
+
has(permission: PermissionResolvable): boolean;
|
|
277
138
|
/**
|
|
278
|
-
*
|
|
279
|
-
*
|
|
139
|
+
* Edit this role.
|
|
140
|
+
* Requires Manage Roles permission.
|
|
141
|
+
* @param options - Role updates (permissions accepts PermissionResolvable for convenience)
|
|
142
|
+
* @returns This role (updated in place)
|
|
143
|
+
* @example
|
|
144
|
+
* await role.edit({ name: 'Moderator', permissions: ['BanMembers', 'KickMembers'] });
|
|
280
145
|
*/
|
|
281
|
-
|
|
146
|
+
edit(options: RESTUpdateRoleBody & {
|
|
147
|
+
permissions?: string | PermissionResolvable;
|
|
148
|
+
}): Promise<Role>;
|
|
282
149
|
/**
|
|
283
|
-
*
|
|
284
|
-
*
|
|
150
|
+
* Delete this role.
|
|
151
|
+
* Requires Manage Roles permission.
|
|
285
152
|
*/
|
|
286
|
-
|
|
153
|
+
delete(): Promise<void>;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
/** Role ID or Role object for add/remove. */
|
|
157
|
+
type RoleResolvable = string | Role;
|
|
158
|
+
/**
|
|
159
|
+
* Manages a guild member's roles with add/remove/set and a cache of Role objects.
|
|
160
|
+
* Discord.js parity: member.roles.add(), member.roles.remove(), member.roles.set(), member.roles.cache
|
|
161
|
+
*
|
|
162
|
+
* @discordJsCompat https://discord.js.org/docs/packages/discord.js/main/GuildMemberRoleManager
|
|
163
|
+
* @example
|
|
164
|
+
* // Add a role (Discord.js style)
|
|
165
|
+
* await member.roles.add(roleId);
|
|
166
|
+
*
|
|
167
|
+
* @example
|
|
168
|
+
* // Remove a role
|
|
169
|
+
* await member.roles.remove(roleId);
|
|
170
|
+
*
|
|
171
|
+
* @example
|
|
172
|
+
* // Replace all roles
|
|
173
|
+
* await member.roles.set(['roleId1', 'roleId2']);
|
|
174
|
+
*
|
|
175
|
+
* @example
|
|
176
|
+
* // Check if member has a role
|
|
177
|
+
* if (member.roles.cache.has(roleId)) { ... }
|
|
178
|
+
*/
|
|
179
|
+
declare class GuildMemberRoleManager {
|
|
180
|
+
private readonly member;
|
|
181
|
+
private _roleIds;
|
|
182
|
+
constructor(member: GuildMember, initialRoleIds?: string[]);
|
|
183
|
+
/** Role IDs for this member. Used by permissions; prefer cache for Role objects. */
|
|
184
|
+
get roleIds(): readonly string[];
|
|
185
|
+
/** Check if the member has a role. Discord.js parity: member.roles.cache.has(roleId) */
|
|
186
|
+
has(roleOrId: RoleResolvable): boolean;
|
|
187
|
+
/**
|
|
188
|
+
* Collection of Role objects for this member's roles (from guild.roles).
|
|
189
|
+
* Discord.js parity: member.roles.cache
|
|
190
|
+
* @discordJsCompat https://discord.js.org/docs/packages/discord.js/main/GuildMemberRoleManager
|
|
191
|
+
*/
|
|
192
|
+
get cache(): Collection<string, Role>;
|
|
193
|
+
/** Resolve role ID from RoleResolvable. */
|
|
194
|
+
private _resolveId;
|
|
287
195
|
/**
|
|
288
|
-
*
|
|
196
|
+
* Add a role to this member.
|
|
197
|
+
* Discord.js parity: member.roles.add(roleId)
|
|
198
|
+
* Requires Manage Roles permission.
|
|
199
|
+
* @discordJsCompat https://discord.js.org/docs/packages/discord.js/main/GuildMemberRoleManager
|
|
289
200
|
*/
|
|
290
|
-
|
|
291
|
-
}
|
|
292
|
-
declare class GuildChannel extends Channel {
|
|
293
|
-
readonly guildId: string;
|
|
294
|
-
name: string | null;
|
|
295
|
-
position?: number;
|
|
296
|
-
parentId: string | null;
|
|
297
|
-
/** Permission overwrites for roles and members. */
|
|
298
|
-
permissionOverwrites: APIChannelOverwrite[];
|
|
299
|
-
constructor(client: Client, data: APIChannel);
|
|
201
|
+
add(roleOrId: RoleResolvable): Promise<void>;
|
|
300
202
|
/**
|
|
301
|
-
*
|
|
302
|
-
*
|
|
303
|
-
*
|
|
203
|
+
* Remove a role from this member.
|
|
204
|
+
* Discord.js parity: member.roles.remove(roleId)
|
|
205
|
+
* Requires Manage Roles permission.
|
|
206
|
+
* @discordJsCompat https://discord.js.org/docs/packages/discord.js/main/GuildMemberRoleManager
|
|
304
207
|
*/
|
|
305
|
-
|
|
306
|
-
name: string;
|
|
307
|
-
avatar?: string | null;
|
|
308
|
-
}): Promise<Webhook>;
|
|
208
|
+
remove(roleOrId: RoleResolvable): Promise<void>;
|
|
309
209
|
/**
|
|
310
|
-
*
|
|
311
|
-
*
|
|
210
|
+
* Replace all roles for this member. PATCH /guilds/{id}/members/{userId}
|
|
211
|
+
* Discord.js parity: member.roles.set(roleIds)
|
|
212
|
+
* Requires Manage Roles permission.
|
|
213
|
+
* @discordJsCompat https://discord.js.org/docs/packages/discord.js/main/GuildMemberRoleManager
|
|
312
214
|
*/
|
|
313
|
-
|
|
215
|
+
set(roleIds: string[]): Promise<void>;
|
|
314
216
|
/**
|
|
315
|
-
*
|
|
316
|
-
* @
|
|
317
|
-
* Requires Create Instant Invite permission.
|
|
217
|
+
* Update internal role IDs from API response. Called by GuildMember.edit().
|
|
218
|
+
* @internal
|
|
318
219
|
*/
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
220
|
+
_patch(roleIds: string[]): void;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
/** Represents a member of a guild. */
|
|
224
|
+
declare class GuildMember extends Base {
|
|
225
|
+
readonly client: Client;
|
|
226
|
+
readonly id: string;
|
|
227
|
+
readonly user: User;
|
|
228
|
+
readonly guild: Guild;
|
|
229
|
+
nick: string | null;
|
|
325
230
|
/**
|
|
326
|
-
*
|
|
327
|
-
*
|
|
231
|
+
* Role manager with add/remove/set and cache. Discord.js parity: member.roles.add(), member.roles.cache
|
|
232
|
+
* @discordJsCompat https://discord.js.org/docs/packages/discord.js/main/GuildMemberRoleManager
|
|
328
233
|
*/
|
|
329
|
-
|
|
234
|
+
readonly roles: GuildMemberRoleManager;
|
|
235
|
+
readonly joinedAt: Date;
|
|
236
|
+
communicationDisabledUntil: Date | null;
|
|
237
|
+
readonly mute: boolean;
|
|
238
|
+
readonly deaf: boolean;
|
|
239
|
+
readonly avatar: string | null;
|
|
240
|
+
readonly banner: string | null;
|
|
241
|
+
readonly accentColor: number | null;
|
|
242
|
+
readonly profileFlags: number | null;
|
|
243
|
+
/** @param data - API guild member from GET /guilds/{id}/members or GET /guilds/{id}/members/{user_id} */
|
|
244
|
+
constructor(client: Client, data: APIGuildMember & {
|
|
245
|
+
guild_id?: string;
|
|
246
|
+
}, guild: Guild);
|
|
247
|
+
/** Nickname, or global name, or username. */
|
|
248
|
+
get displayName(): string;
|
|
330
249
|
/**
|
|
331
|
-
*
|
|
332
|
-
*
|
|
333
|
-
* @param options - type (0=role, 1=member), allow, deny (permission bitfields)
|
|
250
|
+
* Get the guild-specific avatar URL for this member.
|
|
251
|
+
* Returns null if the member has no guild avatar (use displayAvatarURL for fallback).
|
|
334
252
|
*/
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
}): Promise<void>;
|
|
253
|
+
avatarURL(options?: {
|
|
254
|
+
size?: number;
|
|
255
|
+
extension?: string;
|
|
256
|
+
}): string | null;
|
|
340
257
|
/**
|
|
341
|
-
*
|
|
258
|
+
* Get the avatar URL to display for this member.
|
|
259
|
+
* Uses guild-specific avatar if set, otherwise falls back to the user's avatar.
|
|
342
260
|
*/
|
|
343
|
-
|
|
261
|
+
displayAvatarURL(options?: {
|
|
262
|
+
size?: number;
|
|
263
|
+
extension?: string;
|
|
264
|
+
}): string;
|
|
344
265
|
/**
|
|
345
|
-
*
|
|
346
|
-
*
|
|
266
|
+
* Get the guild-specific banner URL for this member.
|
|
267
|
+
* Returns null if the member has no guild banner.
|
|
347
268
|
*/
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
bitrate?: number | null;
|
|
353
|
-
user_limit?: number | null;
|
|
354
|
-
nsfw?: boolean;
|
|
355
|
-
rate_limit_per_user?: number;
|
|
356
|
-
rtc_region?: string | null;
|
|
357
|
-
permission_overwrites?: Array<{
|
|
358
|
-
id: string;
|
|
359
|
-
type: number;
|
|
360
|
-
allow?: string;
|
|
361
|
-
deny?: string;
|
|
362
|
-
}>;
|
|
363
|
-
}): Promise<this>;
|
|
269
|
+
bannerURL(options?: {
|
|
270
|
+
size?: number;
|
|
271
|
+
extension?: string;
|
|
272
|
+
}): string | null;
|
|
364
273
|
/**
|
|
365
|
-
*
|
|
366
|
-
*
|
|
274
|
+
* Add a role to this member.
|
|
275
|
+
* Prefer member.roles.add(roleId) for Discord.js parity.
|
|
276
|
+
* @param roleId - The role ID to add
|
|
277
|
+
* Requires Manage Roles permission.
|
|
367
278
|
*/
|
|
368
|
-
|
|
369
|
-
silent?: boolean;
|
|
370
|
-
}): Promise<void>;
|
|
371
|
-
}
|
|
372
|
-
declare class TextChannel extends GuildChannel {
|
|
373
|
-
topic?: string | null;
|
|
374
|
-
nsfw?: boolean;
|
|
375
|
-
rateLimitPerUser?: number;
|
|
376
|
-
lastMessageId?: string | null;
|
|
377
|
-
constructor(client: Client, data: APIChannel);
|
|
279
|
+
addRole(roleId: string): Promise<void>;
|
|
378
280
|
/**
|
|
379
|
-
*
|
|
380
|
-
*
|
|
281
|
+
* Remove a role from this member.
|
|
282
|
+
* Prefer member.roles.remove(roleId) for Discord.js parity.
|
|
283
|
+
* @param roleId - The role ID to remove
|
|
284
|
+
* Requires Manage Roles permission.
|
|
381
285
|
*/
|
|
382
|
-
|
|
383
|
-
/** Message manager for this channel. Use channel.messages.fetch(messageId). */
|
|
384
|
-
get messages(): MessageManager;
|
|
286
|
+
removeRole(roleId: string): Promise<void>;
|
|
385
287
|
/**
|
|
386
|
-
*
|
|
387
|
-
*
|
|
388
|
-
*
|
|
389
|
-
*
|
|
390
|
-
* const collector = channel.createMessageCollector({ filter: m => m.author.id === userId, time: 10000 });
|
|
391
|
-
* collector.on('collect', m => console.log(m.content));
|
|
392
|
-
* collector.on('end', (collected, reason) => { ... });
|
|
288
|
+
* Edit this guild member. PATCH /guilds/{id}/members/{userId} or /members/@me for the bot.
|
|
289
|
+
* For @me: nick, avatar, banner, bio, pronouns, accent_color, profile_flags, mute, deaf,
|
|
290
|
+
* communication_disabled_until, timeout_reason, channel_id, connection_id.
|
|
291
|
+
* For other members: same plus roles (array of role IDs).
|
|
393
292
|
*/
|
|
394
|
-
|
|
293
|
+
edit(options: {
|
|
294
|
+
nick?: string | null;
|
|
295
|
+
roles?: string[];
|
|
296
|
+
avatar?: string | null;
|
|
297
|
+
banner?: string | null;
|
|
298
|
+
bio?: string | null;
|
|
299
|
+
pronouns?: string | null;
|
|
300
|
+
accent_color?: number | null;
|
|
301
|
+
profile_flags?: number | null;
|
|
302
|
+
mute?: boolean;
|
|
303
|
+
deaf?: boolean;
|
|
304
|
+
communication_disabled_until?: string | null;
|
|
305
|
+
timeout_reason?: string | null;
|
|
306
|
+
channel_id?: string | null;
|
|
307
|
+
connection_id?: string | null;
|
|
308
|
+
}): Promise<this>;
|
|
395
309
|
/**
|
|
396
|
-
*
|
|
397
|
-
*
|
|
310
|
+
* Get the member's guild-level permissions (from roles only, no channel overwrites).
|
|
311
|
+
* Use this for server-wide permission checks (e.g. ban, kick, manage roles).
|
|
312
|
+
* @returns Object with has(permission) to check specific permissions
|
|
313
|
+
* @example
|
|
314
|
+
* const perms = member.permissions;
|
|
315
|
+
* if (perms.has(PermissionFlags.BanMembers)) { ... }
|
|
398
316
|
*/
|
|
399
|
-
|
|
317
|
+
get permissions(): {
|
|
318
|
+
has(permission: PermissionResolvable): boolean;
|
|
319
|
+
};
|
|
400
320
|
/**
|
|
401
|
-
*
|
|
402
|
-
*
|
|
403
|
-
* @
|
|
404
|
-
* @
|
|
321
|
+
* Compute the member's effective permissions in a guild channel.
|
|
322
|
+
* Applies role permissions and channel overwrites.
|
|
323
|
+
* @param channel - The guild channel to check permissions for
|
|
324
|
+
* @returns Object with has(permission) to check specific permissions
|
|
325
|
+
* @example
|
|
326
|
+
* const perms = member.permissionsIn(channel);
|
|
327
|
+
* if (perms.has(PermissionFlags.SendMessages)) { ... }
|
|
405
328
|
*/
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
329
|
+
permissionsIn(channel: GuildChannel): {
|
|
330
|
+
has(permission: PermissionResolvable): boolean;
|
|
331
|
+
};
|
|
332
|
+
private _computeBasePermissions;
|
|
409
333
|
}
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
334
|
+
|
|
335
|
+
/**
|
|
336
|
+
* Manages guild members with a Collection-like API.
|
|
337
|
+
* Extends Collection so you can use .get(), .set(), .filter(), etc.
|
|
338
|
+
* Provides guild.members.me for Discord.js parity.
|
|
339
|
+
*
|
|
340
|
+
* @discordJsCompat https://discord.js.org/docs/packages/discord.js/main/GuildMemberManager
|
|
341
|
+
*/
|
|
342
|
+
declare class GuildMemberManager extends Collection<string, GuildMember> {
|
|
343
|
+
private readonly guild;
|
|
344
|
+
constructor(guild: Guild);
|
|
345
|
+
/**
|
|
346
|
+
* Get a guild member from cache or fetch from the API if not present.
|
|
347
|
+
* Convenience helper to avoid repeating `guild.members.get(userId) ?? (await guild.fetchMember(userId))`.
|
|
348
|
+
* @param userId - Snowflake of the user
|
|
349
|
+
* @returns The guild member
|
|
350
|
+
* @throws FluxerError with MEMBER_NOT_FOUND if user is not in the guild (404)
|
|
351
|
+
* @example
|
|
352
|
+
* const member = await guild.members.resolve(userId);
|
|
353
|
+
* console.log(member.displayName);
|
|
354
|
+
*/
|
|
355
|
+
resolve(userId: string): Promise<GuildMember>;
|
|
356
|
+
/**
|
|
357
|
+
* The current bot user as a GuildMember in this guild.
|
|
358
|
+
* Returns null if the bot's member is not cached or client.user is null.
|
|
359
|
+
* Use fetchMe() to load the bot's member when not cached.
|
|
360
|
+
*
|
|
361
|
+
* @discordJsCompat https://discord.js.org/docs/packages/discord.js/main/GuildMemberManager
|
|
362
|
+
* @example
|
|
363
|
+
* const perms = guild.members.me?.permissions;
|
|
364
|
+
* if (perms?.has(PermissionFlags.BanMembers)) { ... }
|
|
365
|
+
*/
|
|
366
|
+
get me(): GuildMember | null;
|
|
367
|
+
/**
|
|
368
|
+
* Fetch the current bot user as a GuildMember in this guild.
|
|
369
|
+
* Caches the result in guild.members.
|
|
370
|
+
*
|
|
371
|
+
* @throws Error if client.user is null (client not ready)
|
|
372
|
+
* @example
|
|
373
|
+
* const me = await guild.members.fetchMe();
|
|
374
|
+
* console.log(me.displayName);
|
|
375
|
+
*/
|
|
376
|
+
fetchMe(): Promise<GuildMember>;
|
|
377
|
+
/**
|
|
378
|
+
* Fetch guild members with pagination. GET /guilds/{id}/members.
|
|
379
|
+
* @param options - limit (1-1000), after (user ID for pagination)
|
|
380
|
+
* @returns Array of GuildMember objects (cached in guild.members)
|
|
381
|
+
*/
|
|
382
|
+
fetch(options?: {
|
|
383
|
+
limit?: number;
|
|
384
|
+
after?: string;
|
|
385
|
+
}): Promise<GuildMember[]>;
|
|
415
386
|
}
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
387
|
+
|
|
388
|
+
/** File data for webhook attachment uploads. Use `data` for buffers or `url` to fetch from a URL. */
|
|
389
|
+
type WebhookFileData = MessageFileData;
|
|
390
|
+
/** Attachment metadata for webhook file uploads (id matches FormData index). */
|
|
391
|
+
interface WebhookAttachmentMeta {
|
|
392
|
+
id: number;
|
|
393
|
+
filename: string;
|
|
394
|
+
title?: string | null;
|
|
395
|
+
description?: string | null;
|
|
396
|
+
/** MessageAttachmentFlags: IS_SPOILER (8), CONTAINS_EXPLICIT_MEDIA (16), IS_ANIMATED (32) */
|
|
397
|
+
flags?: number;
|
|
419
398
|
}
|
|
420
|
-
/**
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
399
|
+
/** Options for sending a message via webhook. Aligns with WebhookMessageRequest in the API. */
|
|
400
|
+
interface WebhookSendOptions {
|
|
401
|
+
/** Message text content (up to 2000 characters) */
|
|
402
|
+
content?: string;
|
|
403
|
+
/** Embed objects. Use EmbedBuilder or APIEmbed; EmbedBuilder is serialized automatically. */
|
|
404
|
+
embeds?: (APIEmbed | EmbedBuilder)[];
|
|
405
|
+
/** Override the webhook's default username for this message */
|
|
406
|
+
username?: string;
|
|
407
|
+
/** Override the webhook's default avatar URL for this message */
|
|
408
|
+
avatar_url?: string;
|
|
409
|
+
/** Text-to-speech */
|
|
410
|
+
tts?: boolean;
|
|
411
|
+
/** File attachments. When present, uses multipart/form-data (same as channel.send). */
|
|
412
|
+
files?: WebhookFileData[];
|
|
413
|
+
/** Attachment metadata for files (id = index). Use when files are provided. */
|
|
414
|
+
attachments?: WebhookAttachmentMeta[];
|
|
415
|
+
}
|
|
416
|
+
/**
|
|
417
|
+
* Represents a Discord/Fluxer webhook. Supports creating, fetching, sending, and deleting.
|
|
418
|
+
* The token is only available when the webhook was created; fetched webhooks cannot send messages.
|
|
419
|
+
*/
|
|
420
|
+
declare class Webhook extends Base {
|
|
421
|
+
readonly client: Client;
|
|
422
|
+
readonly id: string;
|
|
423
|
+
readonly guildId: string;
|
|
424
|
+
channelId: string;
|
|
425
|
+
name: string;
|
|
426
|
+
avatar: string | null;
|
|
427
|
+
/** Present only when webhook was created via createWebhook(); not returned when fetching. */
|
|
428
|
+
readonly token: string | null;
|
|
429
|
+
/** User who created the webhook. */
|
|
430
|
+
readonly user: User;
|
|
431
|
+
/** @param data - API webhook from POST /channels/{id}/webhooks (has token) or GET /webhooks/{id} (no token) */
|
|
432
|
+
constructor(client: Client, data: APIWebhook & {
|
|
433
|
+
token?: string | null;
|
|
434
|
+
});
|
|
435
|
+
/**
|
|
436
|
+
* Get the URL for this webhook's avatar.
|
|
437
|
+
* Returns null if the webhook has no custom avatar.
|
|
438
|
+
*/
|
|
439
|
+
avatarURL(options?: {
|
|
440
|
+
size?: number;
|
|
441
|
+
extension?: string;
|
|
442
|
+
}): string | null;
|
|
443
|
+
/** Delete this webhook. Requires bot token with Manage Webhooks permission. */
|
|
444
|
+
delete(): Promise<void>;
|
|
445
|
+
/**
|
|
446
|
+
* Edit this webhook. With token: name and avatar only. Without token (bot auth): name, avatar, and channel_id.
|
|
447
|
+
* @param options - Fields to update (name, avatar, channel_id when using bot auth)
|
|
448
|
+
* @returns This webhook instance with updated fields
|
|
449
|
+
*/
|
|
450
|
+
edit(options: APIWebhookUpdateRequest | APIWebhookTokenUpdateRequest): Promise<Webhook>;
|
|
451
|
+
/**
|
|
452
|
+
* Send a message via this webhook. Requires the webhook token (only present when created, not when fetched).
|
|
453
|
+
* @param options - Text content or object with content, embeds, username, avatar_url, tts, files, attachments
|
|
454
|
+
* @param wait - If true, waits for the API and returns the created Message; otherwise returns void (204)
|
|
455
|
+
* @throws Error if token is not available
|
|
456
|
+
* @example
|
|
457
|
+
* await webhook.send('Hello!');
|
|
458
|
+
* await webhook.send({ embeds: [embed] });
|
|
459
|
+
* await webhook.send({ content: 'File attached', files: [{ name: 'data.txt', data: buffer }] });
|
|
460
|
+
* const msg = await webhook.send({ content: 'Hi' }, true);
|
|
461
|
+
*/
|
|
462
|
+
send(options: string | WebhookSendOptions, wait?: boolean): Promise<Message | undefined>;
|
|
463
|
+
/**
|
|
464
|
+
* Fetch a webhook by ID using bot auth.
|
|
465
|
+
* @param client - The client instance
|
|
466
|
+
* @param webhookId - The webhook ID
|
|
467
|
+
* @returns Webhook without token (cannot send)
|
|
468
|
+
*/
|
|
469
|
+
static fetch(client: Client, webhookId: string): Promise<Webhook>;
|
|
470
|
+
/**
|
|
471
|
+
* Create a Webhook instance from an ID and token (e.g. from a stored webhook URL).
|
|
472
|
+
* @param client - The client instance
|
|
473
|
+
* @param webhookId - The webhook ID
|
|
474
|
+
* @param token - The webhook token (from createWebhook or stored)
|
|
475
|
+
* @param options - Optional channelId, guildId, name for display
|
|
476
|
+
*/
|
|
477
|
+
static fromToken(client: Client, webhookId: string, token: string, options?: {
|
|
478
|
+
channelId?: string;
|
|
479
|
+
guildId?: string;
|
|
480
|
+
name?: string;
|
|
481
|
+
}): Webhook;
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
/** Represents a ban in a guild. */
|
|
485
|
+
declare class GuildBan extends Base {
|
|
486
|
+
readonly client: Client;
|
|
487
|
+
readonly guildId: string;
|
|
488
|
+
readonly user: User;
|
|
489
|
+
readonly reason: string | null;
|
|
490
|
+
/** ISO timestamp when a temporary ban expires. Null for permanent bans. */
|
|
491
|
+
readonly expiresAt: string | null;
|
|
492
|
+
/** @param data - API ban from GET /guilds/{id}/bans or gateway GUILD_BAN_ADD */
|
|
493
|
+
constructor(client: Client, data: APIBan & {
|
|
494
|
+
guild_id?: string;
|
|
495
|
+
}, guildId: string);
|
|
496
|
+
/**
|
|
497
|
+
* Remove this ban (unban the user).
|
|
498
|
+
* Requires Ban Members permission.
|
|
499
|
+
*/
|
|
500
|
+
unban(): Promise<void>;
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
/** Represents a custom emoji in a guild. */
|
|
504
|
+
declare class GuildEmoji extends Base {
|
|
505
|
+
readonly client: Client;
|
|
506
|
+
readonly id: string;
|
|
507
|
+
readonly guildId: string;
|
|
508
|
+
name: string;
|
|
509
|
+
readonly animated: boolean;
|
|
510
|
+
/** @param data - API emoji from GET /guilds/{id}/emojis or guild emoji events */
|
|
511
|
+
constructor(client: Client, data: APIEmoji & {
|
|
512
|
+
guild_id?: string;
|
|
513
|
+
}, guildId: string);
|
|
514
|
+
/** CDN URL for this emoji image. */
|
|
515
|
+
get url(): string;
|
|
516
|
+
/** Emoji identifier for use in reactions: `name:id` */
|
|
517
|
+
get identifier(): string;
|
|
518
|
+
/** Delete this emoji. Requires Manage Emojis and Stickers permission. */
|
|
519
|
+
delete(): Promise<void>;
|
|
520
|
+
/**
|
|
521
|
+
* Edit this emoji's name.
|
|
522
|
+
* Requires Manage Emojis and Stickers permission.
|
|
523
|
+
*/
|
|
524
|
+
edit(options: {
|
|
525
|
+
name: string;
|
|
526
|
+
}): Promise<GuildEmoji>;
|
|
527
|
+
}
|
|
528
|
+
|
|
529
|
+
/** Represents a custom sticker in a guild. */
|
|
530
|
+
declare class GuildSticker extends Base {
|
|
531
|
+
readonly client: Client;
|
|
532
|
+
readonly id: string;
|
|
533
|
+
readonly guildId: string;
|
|
534
|
+
name: string;
|
|
535
|
+
description: string;
|
|
536
|
+
readonly tags: string[];
|
|
537
|
+
readonly animated: boolean;
|
|
538
|
+
/** @param data - API sticker from GET /guilds/{id}/stickers or guild sticker events */
|
|
539
|
+
constructor(client: Client, data: APISticker & {
|
|
540
|
+
guild_id?: string;
|
|
541
|
+
}, guildId: string);
|
|
542
|
+
/** CDN URL for this sticker image. */
|
|
543
|
+
get url(): string;
|
|
544
|
+
/** Delete this sticker. Requires Manage Emojis and Stickers permission. */
|
|
545
|
+
delete(): Promise<void>;
|
|
546
|
+
/**
|
|
547
|
+
* Edit this sticker's name and/or description.
|
|
548
|
+
* Requires Manage Emojis and Stickers permission.
|
|
549
|
+
*/
|
|
550
|
+
edit(options: {
|
|
551
|
+
name?: string;
|
|
552
|
+
description?: string;
|
|
553
|
+
}): Promise<GuildSticker>;
|
|
554
|
+
}
|
|
555
|
+
|
|
556
|
+
/** Represents a Fluxer guild (server). */
|
|
557
|
+
declare class Guild extends Base {
|
|
558
|
+
readonly client: Client;
|
|
559
|
+
readonly id: string;
|
|
560
|
+
name: string;
|
|
561
|
+
icon: string | null;
|
|
562
|
+
banner: string | null;
|
|
563
|
+
readonly ownerId: string;
|
|
564
|
+
/** Invite splash image hash. Null if none. */
|
|
565
|
+
splash: string | null;
|
|
566
|
+
/** Custom vanity URL code (e.g. fluxer.gg/code). Null if none. */
|
|
567
|
+
vanityURLCode: string | null;
|
|
568
|
+
/** Enabled guild features. */
|
|
569
|
+
features: GuildFeature[];
|
|
570
|
+
verificationLevel: GuildVerificationLevel;
|
|
571
|
+
defaultMessageNotifications: DefaultMessageNotifications;
|
|
572
|
+
explicitContentFilter: GuildExplicitContentFilter;
|
|
573
|
+
/** AFK voice channel ID. Null if none. */
|
|
574
|
+
afkChannelId: string | null;
|
|
575
|
+
/** AFK timeout in seconds. */
|
|
576
|
+
afkTimeout: number;
|
|
577
|
+
/** System messages channel ID. Null if none. */
|
|
578
|
+
systemChannelId: string | null;
|
|
579
|
+
/** Rules/guidelines channel ID. Null if none. */
|
|
580
|
+
rulesChannelId: string | null;
|
|
581
|
+
nsfwLevel: number;
|
|
582
|
+
mfaLevel: GuildMFALevel;
|
|
583
|
+
/** Banner image width. Optional. */
|
|
584
|
+
bannerWidth?: number | null;
|
|
585
|
+
/** Banner image height. Optional. */
|
|
586
|
+
bannerHeight?: number | null;
|
|
587
|
+
/** Splash image width. Optional. */
|
|
588
|
+
splashWidth?: number | null;
|
|
589
|
+
/** Splash image height. Optional. */
|
|
590
|
+
splashHeight?: number | null;
|
|
591
|
+
members: GuildMemberManager;
|
|
592
|
+
channels: Collection<string, GuildChannel>;
|
|
593
|
+
roles: Collection<string, Role>;
|
|
594
|
+
emojis: Collection<string, GuildEmoji>;
|
|
595
|
+
/** @param data - API guild from GET /guilds/{id} or gateway GUILD_CREATE */
|
|
596
|
+
constructor(client: Client, data: APIGuild & {
|
|
597
|
+
roles?: APIRole[];
|
|
598
|
+
ownerId?: string;
|
|
599
|
+
});
|
|
600
|
+
/** Get the guild icon URL, or null if no icon. */
|
|
601
|
+
iconURL(options?: {
|
|
602
|
+
size?: number;
|
|
603
|
+
}): string | null;
|
|
604
|
+
/** Get the guild banner URL, or null if no banner. */
|
|
605
|
+
bannerURL(options?: {
|
|
606
|
+
size?: number;
|
|
607
|
+
}): string | null;
|
|
608
|
+
/** Get the guild splash (invite background) URL, or null if no splash. */
|
|
609
|
+
splashURL(options?: {
|
|
610
|
+
size?: number;
|
|
611
|
+
}): string | null;
|
|
612
|
+
/**
|
|
613
|
+
* Add a role to a member by user ID. Does not require fetching the member first.
|
|
614
|
+
* @param userId - The user ID of the member
|
|
615
|
+
* @param roleId - The role ID to add (or use guild.resolveRoleId for mention/name resolution)
|
|
616
|
+
* Requires Manage Roles permission.
|
|
617
|
+
*/
|
|
618
|
+
addRoleToMember(userId: string, roleId: string): Promise<void>;
|
|
619
|
+
/**
|
|
620
|
+
* Remove a role from a member by user ID. Does not require fetching the member first.
|
|
621
|
+
* @param userId - The user ID of the member
|
|
622
|
+
* @param roleId - The role ID to remove
|
|
623
|
+
* Requires Manage Roles permission.
|
|
624
|
+
*/
|
|
625
|
+
removeRoleFromMember(userId: string, roleId: string): Promise<void>;
|
|
626
|
+
/**
|
|
627
|
+
* Create a role in this guild.
|
|
628
|
+
* Requires Manage Roles permission.
|
|
629
|
+
* @param options - Role data (permissions accepts PermissionResolvable for convenience)
|
|
630
|
+
* @returns The created role
|
|
631
|
+
* @example
|
|
632
|
+
* const role = await guild.createRole({ name: 'Mod', permissions: ['KickMembers', 'BanMembers'] });
|
|
633
|
+
*/
|
|
634
|
+
createRole(options: RESTCreateRoleBody & {
|
|
635
|
+
permissions?: string | PermissionResolvable;
|
|
636
|
+
}): Promise<Role>;
|
|
637
|
+
/**
|
|
638
|
+
* Fetch all roles in this guild.
|
|
639
|
+
* @returns Array of Role objects (cached in guild.roles)
|
|
640
|
+
*/
|
|
641
|
+
fetchRoles(): Promise<Role[]>;
|
|
642
|
+
/**
|
|
643
|
+
* Fetch a role by ID.
|
|
644
|
+
* @param roleId - The role ID to fetch
|
|
645
|
+
* @returns The role
|
|
646
|
+
* @throws FluxerError with ROLE_NOT_FOUND if role does not exist (404)
|
|
647
|
+
*/
|
|
648
|
+
fetchRole(roleId: string): Promise<Role>;
|
|
649
|
+
/**
|
|
650
|
+
* Resolve a role ID from an argument (role mention, raw ID, or name).
|
|
651
|
+
* Fetches guild roles if name is provided.
|
|
652
|
+
* @param arg - Role mention (@role), role ID, or role name
|
|
653
|
+
* @returns The role ID, or null if not found
|
|
654
|
+
*/
|
|
655
|
+
resolveRoleId(arg: string): Promise<string | null>;
|
|
656
|
+
/**
|
|
657
|
+
* Ban a user from this guild.
|
|
658
|
+
* @param userId - The user ID to ban
|
|
659
|
+
* @param options - Optional reason, delete_message_days (0–7), and ban_duration_seconds (temporary ban).
|
|
660
|
+
* ban_duration_seconds: 0 = permanent, or use 3600, 43200, 86400, 259200, 432000, 604800, 1209600, 2592000.
|
|
661
|
+
* Requires Ban Members permission.
|
|
662
|
+
*/
|
|
663
|
+
ban(userId: string, options?: {
|
|
664
|
+
reason?: string;
|
|
665
|
+
delete_message_days?: number;
|
|
666
|
+
ban_duration_seconds?: number;
|
|
667
|
+
}): Promise<void>;
|
|
668
|
+
/**
|
|
669
|
+
* Fetch guild bans. Requires Ban Members permission.
|
|
670
|
+
* @returns List of GuildBan objects
|
|
671
|
+
*/
|
|
672
|
+
fetchBans(): Promise<GuildBan[]>;
|
|
673
|
+
/**
|
|
674
|
+
* Remove a ban (unban a user).
|
|
675
|
+
* @param userId - The user ID to unban
|
|
676
|
+
* Requires Ban Members permission.
|
|
677
|
+
*/
|
|
678
|
+
unban(userId: string): Promise<void>;
|
|
679
|
+
/**
|
|
680
|
+
* Kick a member from this guild.
|
|
681
|
+
* @param userId - The user ID to kick
|
|
682
|
+
* Requires Kick Members permission.
|
|
683
|
+
*/
|
|
684
|
+
kick(userId: string): Promise<void>;
|
|
685
|
+
/**
|
|
686
|
+
* Fetch a guild member by user ID.
|
|
687
|
+
* @param userId - The user ID of the member to fetch
|
|
688
|
+
* @returns The guild member
|
|
689
|
+
* @throws FluxerError with MEMBER_NOT_FOUND if user is not in the guild (404)
|
|
690
|
+
* @throws FluxerError with cause for permission denied (403) or other REST errors
|
|
691
|
+
*/
|
|
692
|
+
fetchMember(userId: string): Promise<GuildMember>;
|
|
693
|
+
/**
|
|
694
|
+
* Fetch guild audit logs. Requires View Audit Log permission.
|
|
695
|
+
* @param options - Optional limit, before, after, user_id, action_type for filtering
|
|
696
|
+
*/
|
|
697
|
+
fetchAuditLogs(options?: {
|
|
698
|
+
limit?: number;
|
|
699
|
+
before?: string;
|
|
700
|
+
after?: string;
|
|
701
|
+
userId?: string;
|
|
702
|
+
actionType?: number;
|
|
703
|
+
}): Promise<APIGuildAuditLog>;
|
|
704
|
+
/** Fetch all webhooks in this guild. Returned webhooks do not include the token (cannot send). */
|
|
705
|
+
fetchWebhooks(): Promise<Webhook[]>;
|
|
706
|
+
/**
|
|
707
|
+
* Create a channel in this guild.
|
|
708
|
+
* @param data - Channel data: type (0=text, 2=voice, 4=category, 5=link), name, and optional parent_id, topic, bitrate, user_limit, nsfw, permission_overwrites
|
|
709
|
+
* Requires Manage Channels permission.
|
|
710
|
+
*/
|
|
711
|
+
createChannel(data: {
|
|
712
|
+
type: 0 | 2 | 4 | 5;
|
|
713
|
+
name: string;
|
|
714
|
+
parent_id?: string | null;
|
|
715
|
+
topic?: string | null;
|
|
716
|
+
bitrate?: number | null;
|
|
717
|
+
user_limit?: number | null;
|
|
718
|
+
nsfw?: boolean;
|
|
719
|
+
permission_overwrites?: Array<{
|
|
720
|
+
id: string;
|
|
721
|
+
type: number;
|
|
722
|
+
allow: string;
|
|
723
|
+
deny: string;
|
|
724
|
+
}>;
|
|
725
|
+
}): Promise<GuildChannel>;
|
|
726
|
+
/**
|
|
727
|
+
* Fetch all channels in this guild.
|
|
728
|
+
* @returns Array of GuildChannel objects (cached in guild.channels and client.channels)
|
|
729
|
+
*/
|
|
730
|
+
fetchChannels(): Promise<GuildChannel[]>;
|
|
731
|
+
/**
|
|
732
|
+
* Edit this guild. PATCH /guilds/{id}.
|
|
733
|
+
* Requires guild owner or Administrator.
|
|
734
|
+
*/
|
|
735
|
+
edit(options: {
|
|
736
|
+
name?: string;
|
|
737
|
+
icon?: string | null;
|
|
738
|
+
system_channel_id?: string | null;
|
|
739
|
+
system_channel_flags?: number;
|
|
740
|
+
afk_channel_id?: string | null;
|
|
741
|
+
afk_timeout?: number;
|
|
742
|
+
default_message_notifications?: DefaultMessageNotifications;
|
|
743
|
+
verification_level?: GuildVerificationLevel;
|
|
744
|
+
mfa_level?: GuildMFALevel;
|
|
745
|
+
explicit_content_filter?: GuildExplicitContentFilter;
|
|
746
|
+
banner?: string | null;
|
|
747
|
+
splash?: string | null;
|
|
748
|
+
embed_splash?: string | null;
|
|
749
|
+
splash_card_alignment?: string;
|
|
750
|
+
features?: GuildFeature[];
|
|
751
|
+
}): Promise<this>;
|
|
752
|
+
/**
|
|
753
|
+
* Delete this guild. POST /guilds/{id}/delete.
|
|
754
|
+
* Must be the guild owner.
|
|
755
|
+
*/
|
|
756
|
+
delete(): Promise<void>;
|
|
757
|
+
/**
|
|
758
|
+
* Fetch vanity URL for this guild. GET /guilds/{id}/vanity-url.
|
|
759
|
+
* Requires Manage Guild permission.
|
|
760
|
+
*/
|
|
761
|
+
fetchVanityURL(): Promise<APIVanityURL>;
|
|
762
|
+
/**
|
|
763
|
+
* Transfer guild ownership to another user. POST /guilds/{id}/transfer-ownership.
|
|
764
|
+
* Must be the guild owner.
|
|
765
|
+
*/
|
|
766
|
+
transferOwnership(newOwnerId: string, password?: string): Promise<void>;
|
|
767
|
+
/**
|
|
768
|
+
* Set text channel flexible names feature. PATCH /guilds/{id}/text-channel-flexible-names.
|
|
769
|
+
*/
|
|
770
|
+
setTextChannelFlexibleNames(enabled: boolean): Promise<this>;
|
|
771
|
+
/**
|
|
772
|
+
* Set detached banner feature. PATCH /guilds/{id}/detached-banner.
|
|
773
|
+
*/
|
|
774
|
+
setDetachedBanner(enabled: boolean): Promise<this>;
|
|
775
|
+
/**
|
|
776
|
+
* Set disallow unclaimed accounts. PATCH /guilds/{id}/disallow-unclaimed-accounts.
|
|
777
|
+
*/
|
|
778
|
+
setDisallowUnclaimedAccounts(enabled: boolean): Promise<this>;
|
|
779
|
+
/**
|
|
780
|
+
* Update role positions. PATCH /guilds/{id}/roles.
|
|
781
|
+
* @param updates - Array of { id, position? }
|
|
782
|
+
*/
|
|
783
|
+
setRolePositions(updates: Array<{
|
|
784
|
+
id: string;
|
|
785
|
+
position?: number;
|
|
786
|
+
}>): Promise<APIRole[]>;
|
|
430
787
|
/**
|
|
431
|
-
*
|
|
432
|
-
* @param options - Text content or object with content, embeds, and/or files
|
|
788
|
+
* Update role hoist positions. PATCH /guilds/{id}/roles/hoist-positions.
|
|
433
789
|
*/
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
790
|
+
setRoleHoistPositions(updates: Array<{
|
|
791
|
+
id: string;
|
|
792
|
+
hoist_position?: number;
|
|
793
|
+
}>): Promise<APIRole[]>;
|
|
437
794
|
/**
|
|
438
|
-
*
|
|
439
|
-
* @param options - Filter, time (ms), and max count
|
|
795
|
+
* Reset role hoist positions. DELETE /guilds/{id}/roles/hoist-positions.
|
|
440
796
|
*/
|
|
441
|
-
|
|
797
|
+
resetRoleHoistPositions(): Promise<APIRole[]>;
|
|
442
798
|
/**
|
|
443
|
-
*
|
|
444
|
-
* @
|
|
799
|
+
* Update channel positions.
|
|
800
|
+
* @param updates - Array of { id, position?, parent_id?, lock_permissions? }
|
|
801
|
+
* Requires Manage Channels permission.
|
|
445
802
|
*/
|
|
446
|
-
|
|
803
|
+
setChannelPositions(updates: Array<{
|
|
804
|
+
id: string;
|
|
805
|
+
position?: number;
|
|
806
|
+
parent_id?: string | null;
|
|
807
|
+
lock_permissions?: boolean;
|
|
808
|
+
}>): Promise<void>;
|
|
447
809
|
/**
|
|
448
|
-
* Fetch
|
|
449
|
-
* @
|
|
450
|
-
* @returns The message, or null if not found
|
|
451
|
-
* @deprecated Use channel.messages.fetch(messageId) instead.
|
|
810
|
+
* Fetch all emojis in this guild.
|
|
811
|
+
* @returns Array of GuildEmoji objects (cached in guild.emojis)
|
|
452
812
|
*/
|
|
453
|
-
|
|
813
|
+
fetchEmojis(): Promise<GuildEmoji[]>;
|
|
454
814
|
/**
|
|
455
|
-
*
|
|
456
|
-
*
|
|
815
|
+
* Fetch a single emoji by ID.
|
|
816
|
+
* @param emojiId - The emoji ID to fetch
|
|
817
|
+
* @returns The guild emoji
|
|
818
|
+
* @throws FluxerError if emoji not found (404)
|
|
457
819
|
*/
|
|
458
|
-
|
|
820
|
+
fetchEmoji(emojiId: string): Promise<GuildEmoji>;
|
|
459
821
|
/**
|
|
460
|
-
*
|
|
461
|
-
*
|
|
462
|
-
* @
|
|
822
|
+
* Bulk create emojis. POST /guilds/{id}/emojis/bulk.
|
|
823
|
+
* @param emojis - Array of { name, image } (base64), 1-50 emojis
|
|
824
|
+
* @returns Array of created GuildEmoji objects
|
|
463
825
|
*/
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
826
|
+
createEmojisBulk(emojis: Array<{
|
|
827
|
+
name: string;
|
|
828
|
+
image: string;
|
|
829
|
+
}>): Promise<GuildEmoji[]>;
|
|
830
|
+
/**
|
|
831
|
+
* Bulk create stickers. POST /guilds/{id}/stickers/bulk.
|
|
832
|
+
* @param stickers - Array of { name, image, description?, tags? }, 1-50 stickers
|
|
833
|
+
* @returns Array of created GuildSticker objects
|
|
834
|
+
*/
|
|
835
|
+
createStickersBulk(stickers: Array<{
|
|
836
|
+
name: string;
|
|
837
|
+
image: string;
|
|
838
|
+
description?: string;
|
|
839
|
+
tags?: string[];
|
|
840
|
+
}>): Promise<GuildSticker[]>;
|
|
467
841
|
}
|
|
468
842
|
|
|
469
843
|
/** Represents a reaction added to or removed from a message. */
|
|
@@ -570,716 +944,460 @@ declare class Message extends Base {
|
|
|
570
944
|
get channel(): Channel | null;
|
|
571
945
|
/** Guild where this message was sent. Resolved from cache; null for DMs or if not cached. */
|
|
572
946
|
get guild(): Guild | null;
|
|
573
|
-
/** @param data - API message from POST/PATCH /channels/{id}/messages or gateway MESSAGE_CREATE */
|
|
574
|
-
constructor(client: Client, data: APIMessage);
|
|
575
947
|
/**
|
|
576
|
-
*
|
|
577
|
-
* @
|
|
578
|
-
* @
|
|
579
|
-
* await message.send('Pong!');
|
|
580
|
-
* await message.send({ embeds: [embed.toJSON()] });
|
|
581
|
-
* await message.send({ content: 'File', files: [{ name: 'data.txt', data }] });
|
|
948
|
+
* Resolve the channel (from cache or API). Use when you need the channel and it may not be cached.
|
|
949
|
+
* @returns The channel
|
|
950
|
+
* @throws FluxerError with CHANNEL_NOT_FOUND if the channel does not exist
|
|
582
951
|
*/
|
|
583
|
-
|
|
952
|
+
resolveChannel(): Promise<Channel>;
|
|
584
953
|
/**
|
|
585
|
-
*
|
|
586
|
-
* @
|
|
587
|
-
* @param options - Text content or object with content and/or embeds
|
|
588
|
-
* @example
|
|
589
|
-
* await message.sendTo(logChannelId, 'User ' + message.author.username + ' said: ' + message.content);
|
|
590
|
-
* await message.sendTo(announceChannelId, { embeds: [embed.toJSON()] });
|
|
954
|
+
* Resolve the guild (from cache or API). Returns null for DMs.
|
|
955
|
+
* @returns The guild, or null if this is a DM or guild not found
|
|
591
956
|
*/
|
|
592
|
-
|
|
957
|
+
resolveGuild(): Promise<Guild | null>;
|
|
958
|
+
/** @param data - API message from POST/PATCH /channels/{id}/messages or gateway MESSAGE_CREATE */
|
|
959
|
+
constructor(client: Client, data: APIMessage);
|
|
593
960
|
/**
|
|
594
|
-
*
|
|
961
|
+
* Send a message to this channel without replying. Use when you want a standalone message.
|
|
595
962
|
* @param options - Text content or object with content, embeds, and/or files
|
|
596
|
-
*/
|
|
597
|
-
reply(options: MessageSendOptions): Promise<Message>;
|
|
598
|
-
/**
|
|
599
|
-
* Edit this message. Only the author (or admins) can edit.
|
|
600
|
-
* @param options - New content and/or embeds
|
|
601
|
-
*/
|
|
602
|
-
edit(options: MessageEditOptions): Promise<Message>;
|
|
603
|
-
/**
|
|
604
|
-
* Create a reaction collector for this message.
|
|
605
|
-
* Collects reactions matching the filter until time expires or max is reached.
|
|
606
|
-
* @param options - Filter, time (ms), and max count
|
|
607
963
|
* @example
|
|
608
|
-
*
|
|
609
|
-
*
|
|
610
|
-
*
|
|
611
|
-
*/
|
|
612
|
-
|
|
613
|
-
/**
|
|
614
|
-
* Re-fetch this message from the API to get the latest content, embeds, reactions, etc.
|
|
615
|
-
* Use when you have a stale Message (e.g. from an old event or cache) and need fresh data.
|
|
616
|
-
* @returns The updated message
|
|
617
|
-
* @throws FluxerError with MESSAGE_NOT_FOUND if the message was deleted or does not exist
|
|
618
|
-
* @example
|
|
619
|
-
* const updated = await message.fetch();
|
|
620
|
-
* console.log('Latest content:', updated.content);
|
|
621
|
-
*/
|
|
622
|
-
fetch(): Promise<Message>;
|
|
623
|
-
/** Delete this message. */
|
|
624
|
-
delete(): Promise<void>;
|
|
625
|
-
/**
|
|
626
|
-
* Delete a specific attachment from this message.
|
|
627
|
-
* DELETE /channels/{id}/messages/{id}/attachments/{attachmentId}.
|
|
628
|
-
*/
|
|
629
|
-
deleteAttachment(attachmentId: string): Promise<void>;
|
|
630
|
-
/** Pin this message to the channel. Requires Manage Messages permission. */
|
|
631
|
-
pin(): Promise<void>;
|
|
632
|
-
/** Unpin this message from the channel. Requires Manage Messages permission. */
|
|
633
|
-
unpin(): Promise<void>;
|
|
634
|
-
/**
|
|
635
|
-
* Format emoji for reaction API: unicode string or "name:id" for custom.
|
|
636
|
-
* For string resolution (e.g. :name:), use client.resolveEmoji; Message methods resolve automatically when guildId is available.
|
|
637
|
-
*/
|
|
638
|
-
private static formatEmoji;
|
|
639
|
-
private resolveEmojiForReaction;
|
|
640
|
-
/**
|
|
641
|
-
* Add a reaction to this message (as the bot).
|
|
642
|
-
* @param emoji - Unicode emoji, custom `{ name, id }`, `:name:`, `name:id`, or `<:name:id>`
|
|
643
|
-
*/
|
|
644
|
-
react(emoji: string | {
|
|
645
|
-
name: string;
|
|
646
|
-
id?: string;
|
|
647
|
-
animated?: boolean;
|
|
648
|
-
}): Promise<void>;
|
|
649
|
-
/**
|
|
650
|
-
* Remove the bot's reaction, or a specific user's reaction if userId is provided.
|
|
651
|
-
* @param emoji - Unicode emoji, custom `{ name, id }`, `:name:`, `name:id`, or `<:name:id>`
|
|
652
|
-
* @param userId - If provided, removes that user's reaction (requires moderator permissions)
|
|
653
|
-
*/
|
|
654
|
-
removeReaction(emoji: string | {
|
|
655
|
-
name: string;
|
|
656
|
-
id?: string;
|
|
657
|
-
animated?: boolean;
|
|
658
|
-
}, userId?: string): Promise<void>;
|
|
659
|
-
/**
|
|
660
|
-
* Remove all reactions from this message.
|
|
661
|
-
* Requires moderator permissions.
|
|
662
|
-
*/
|
|
663
|
-
removeAllReactions(): Promise<void>;
|
|
664
|
-
/**
|
|
665
|
-
* Remove all reactions of a specific emoji from this message.
|
|
666
|
-
* @param emoji - Unicode emoji, custom `{ name, id }`, `:name:`, `name:id`, or `<:name:id>`. Requires moderator permissions.
|
|
667
|
-
*/
|
|
668
|
-
removeReactionEmoji(emoji: string | {
|
|
669
|
-
name: string;
|
|
670
|
-
id?: string;
|
|
671
|
-
animated?: boolean;
|
|
672
|
-
}): Promise<void>;
|
|
673
|
-
/**
|
|
674
|
-
* Fetch users who reacted with the given emoji.
|
|
675
|
-
* @param emoji - Unicode emoji or custom `{ name, id }`
|
|
676
|
-
* @param options - limit (1–100), after (user ID for pagination)
|
|
677
|
-
* @returns Array of User objects
|
|
678
|
-
*/
|
|
679
|
-
fetchReactionUsers(emoji: string | {
|
|
680
|
-
name: string;
|
|
681
|
-
id?: string;
|
|
682
|
-
animated?: boolean;
|
|
683
|
-
}, options?: {
|
|
684
|
-
limit?: number;
|
|
685
|
-
after?: string;
|
|
686
|
-
}): Promise<User[]>;
|
|
687
|
-
}
|
|
688
|
-
|
|
689
|
-
/** Represents a user (or bot) on Fluxer. */
|
|
690
|
-
declare class User extends Base {
|
|
691
|
-
readonly client: Client;
|
|
692
|
-
readonly id: string;
|
|
693
|
-
username: string;
|
|
694
|
-
discriminator: string;
|
|
695
|
-
globalName: string | null;
|
|
696
|
-
avatar: string | null;
|
|
697
|
-
readonly bot: boolean;
|
|
698
|
-
/** RGB avatar color (e.g. 7577782). Null if not set. */
|
|
699
|
-
avatarColor: number | null;
|
|
700
|
-
/** Public flags bitfield. Null if not set. */
|
|
701
|
-
flags: number | null;
|
|
702
|
-
/** Whether this is an official system user. */
|
|
703
|
-
readonly system: boolean;
|
|
704
|
-
/** Banner hash (from profile, member, or invite context). Null when not available. */
|
|
705
|
-
banner: string | null;
|
|
706
|
-
/** @param data - API user from message author, GET /users/{id}, or GET /users/@me */
|
|
707
|
-
constructor(client: Client, data: APIUserPartial);
|
|
708
|
-
/** Update mutable fields from fresh API data. Used by getOrCreateUser cache. */
|
|
709
|
-
_patch(data: APIUserPartial): void;
|
|
710
|
-
/**
|
|
711
|
-
* Get the URL for this user's avatar.
|
|
712
|
-
* Auto-detects animated avatars (hash starting with `a_`) and uses gif extension.
|
|
713
|
-
* @param options - Optional `size` and `extension` (default: png, or gif for animated)
|
|
714
|
-
*/
|
|
715
|
-
avatarURL(options?: {
|
|
716
|
-
size?: number;
|
|
717
|
-
extension?: string;
|
|
718
|
-
}): string | null;
|
|
719
|
-
/** Get the avatar URL, or the default avatar if none set (Fluxer: fluxerstatic.com). */
|
|
720
|
-
displayAvatarURL(options?: {
|
|
721
|
-
size?: number;
|
|
722
|
-
extension?: string;
|
|
723
|
-
}): string;
|
|
724
|
-
/**
|
|
725
|
-
* Get the URL for this user's banner.
|
|
726
|
-
* Returns null if the user has no banner (only available when fetched from profile/member context).
|
|
727
|
-
*/
|
|
728
|
-
bannerURL(options?: {
|
|
729
|
-
size?: number;
|
|
730
|
-
extension?: string;
|
|
731
|
-
}): string | null;
|
|
732
|
-
/** Returns a mention string (e.g. `<@123456>`). */
|
|
733
|
-
toString(): string;
|
|
734
|
-
/**
|
|
735
|
-
* Create or get a DM channel with this user.
|
|
736
|
-
* Returns the DM channel; use {@link DMChannel.send} to send messages.
|
|
737
|
-
*/
|
|
738
|
-
createDM(): Promise<DMChannel>;
|
|
739
|
-
/**
|
|
740
|
-
* Send a DM to this user.
|
|
741
|
-
* Convenience method that creates the DM channel and sends the message.
|
|
742
|
-
*/
|
|
743
|
-
send(options: MessageSendOptions): Promise<Message>;
|
|
744
|
-
}
|
|
745
|
-
|
|
746
|
-
/** Represents a member of a guild. */
|
|
747
|
-
declare class GuildMember extends Base {
|
|
748
|
-
readonly client: Client;
|
|
749
|
-
readonly id: string;
|
|
750
|
-
readonly user: User;
|
|
751
|
-
readonly guild: Guild;
|
|
752
|
-
nick: string | null;
|
|
753
|
-
readonly roles: string[];
|
|
754
|
-
readonly joinedAt: Date;
|
|
755
|
-
communicationDisabledUntil: Date | null;
|
|
756
|
-
readonly mute: boolean;
|
|
757
|
-
readonly deaf: boolean;
|
|
758
|
-
readonly avatar: string | null;
|
|
759
|
-
readonly banner: string | null;
|
|
760
|
-
readonly accentColor: number | null;
|
|
761
|
-
readonly profileFlags: number | null;
|
|
762
|
-
/** @param data - API guild member from GET /guilds/{id}/members or GET /guilds/{id}/members/{user_id} */
|
|
763
|
-
constructor(client: Client, data: APIGuildMember & {
|
|
764
|
-
guild_id?: string;
|
|
765
|
-
}, guild: Guild);
|
|
766
|
-
/** Nickname, or global name, or username. */
|
|
767
|
-
get displayName(): string;
|
|
964
|
+
* await message.send('Pong!');
|
|
965
|
+
* await message.send({ embeds: [embed] }); // EmbedBuilder auto-converted
|
|
966
|
+
* await message.send({ content: 'File', files: [{ name: 'data.txt', data }] });
|
|
967
|
+
*/
|
|
968
|
+
send(options: MessageSendOptions): Promise<Message>;
|
|
768
969
|
/**
|
|
769
|
-
*
|
|
770
|
-
*
|
|
970
|
+
* Send a message to a specific channel. Use for logging, forwarding, or sending to another channel in the guild.
|
|
971
|
+
* @param channelId - Snowflake of the target channel (e.g. log channel ID)
|
|
972
|
+
* @param options - Text content or object with content and/or embeds
|
|
973
|
+
* @example
|
|
974
|
+
* await message.sendTo(logChannelId, 'User ' + message.author.username + ' said: ' + message.content);
|
|
975
|
+
* await message.sendTo(announceChannelId, { embeds: [embed] });
|
|
771
976
|
*/
|
|
772
|
-
|
|
773
|
-
size?: number;
|
|
774
|
-
extension?: string;
|
|
775
|
-
}): string | null;
|
|
977
|
+
sendTo(channelId: string, options: MessageSendOptions): Promise<Message>;
|
|
776
978
|
/**
|
|
777
|
-
*
|
|
778
|
-
*
|
|
979
|
+
* Reply to this message (shows as a reply in the client).
|
|
980
|
+
* @param options - Text content or object with content, embeds, and/or files
|
|
981
|
+
* @example
|
|
982
|
+
* await message.reply('Pong!');
|
|
983
|
+
* await message.reply({ embeds: [embed] });
|
|
779
984
|
*/
|
|
780
|
-
|
|
781
|
-
size?: number;
|
|
782
|
-
extension?: string;
|
|
783
|
-
}): string;
|
|
985
|
+
reply(options: MessageSendOptions): Promise<Message>;
|
|
784
986
|
/**
|
|
785
|
-
*
|
|
786
|
-
*
|
|
987
|
+
* Edit this message. Only the author (or admins) can edit.
|
|
988
|
+
* @param options - New content and/or embeds
|
|
787
989
|
*/
|
|
788
|
-
|
|
789
|
-
size?: number;
|
|
790
|
-
extension?: string;
|
|
791
|
-
}): string | null;
|
|
990
|
+
edit(options: MessageEditOptions): Promise<Message>;
|
|
792
991
|
/**
|
|
793
|
-
*
|
|
794
|
-
*
|
|
795
|
-
*
|
|
992
|
+
* Create a reaction collector for this message.
|
|
993
|
+
* Collects reactions matching the filter until time expires or max is reached.
|
|
994
|
+
* @param options - Filter, time (ms), and max count
|
|
995
|
+
* @example
|
|
996
|
+
* const collector = message.createReactionCollector({ filter: (r, u) => u.id === userId, time: 10000 });
|
|
997
|
+
* collector.on('collect', (reaction, user) => console.log(user.username, 'reacted with', reaction.emoji.name));
|
|
998
|
+
* collector.on('end', (collected, reason) => { ... });
|
|
796
999
|
*/
|
|
797
|
-
|
|
1000
|
+
createReactionCollector(options?: ReactionCollectorOptions): ReactionCollector;
|
|
798
1001
|
/**
|
|
799
|
-
*
|
|
800
|
-
*
|
|
801
|
-
*
|
|
1002
|
+
* Re-fetch this message from the API to get the latest content, embeds, reactions, etc.
|
|
1003
|
+
* Use when you have a stale Message (e.g. from an old event or cache) and need fresh data.
|
|
1004
|
+
* @returns The updated message
|
|
1005
|
+
* @throws FluxerError with MESSAGE_NOT_FOUND if the message was deleted or does not exist
|
|
1006
|
+
* @example
|
|
1007
|
+
* const updated = await message.fetch();
|
|
1008
|
+
* console.log('Latest content:', updated.content);
|
|
802
1009
|
*/
|
|
803
|
-
|
|
1010
|
+
fetch(): Promise<Message>;
|
|
1011
|
+
/** Delete this message. */
|
|
1012
|
+
delete(): Promise<void>;
|
|
804
1013
|
/**
|
|
805
|
-
*
|
|
806
|
-
*
|
|
807
|
-
* communication_disabled_until, timeout_reason, channel_id, connection_id.
|
|
808
|
-
* For other members: same plus roles (array of role IDs).
|
|
1014
|
+
* Delete a specific attachment from this message.
|
|
1015
|
+
* DELETE /channels/{id}/messages/{id}/attachments/{attachmentId}.
|
|
809
1016
|
*/
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
bio?: string | null;
|
|
816
|
-
pronouns?: string | null;
|
|
817
|
-
accent_color?: number | null;
|
|
818
|
-
profile_flags?: number | null;
|
|
819
|
-
mute?: boolean;
|
|
820
|
-
deaf?: boolean;
|
|
821
|
-
communication_disabled_until?: string | null;
|
|
822
|
-
timeout_reason?: string | null;
|
|
823
|
-
channel_id?: string | null;
|
|
824
|
-
connection_id?: string | null;
|
|
825
|
-
}): Promise<this>;
|
|
1017
|
+
deleteAttachment(attachmentId: string): Promise<void>;
|
|
1018
|
+
/** Pin this message to the channel. Requires Manage Messages permission. */
|
|
1019
|
+
pin(): Promise<void>;
|
|
1020
|
+
/** Unpin this message from the channel. Requires Manage Messages permission. */
|
|
1021
|
+
unpin(): Promise<void>;
|
|
826
1022
|
/**
|
|
827
|
-
*
|
|
828
|
-
*
|
|
829
|
-
* @returns Object with has(permission) to check specific permissions
|
|
830
|
-
* @example
|
|
831
|
-
* const perms = member.permissions;
|
|
832
|
-
* if (perms.has(PermissionFlags.BanMembers)) { ... }
|
|
1023
|
+
* Format emoji for reaction API: unicode string or "name:id" for custom.
|
|
1024
|
+
* For string resolution (e.g. :name:), use client.resolveEmoji; Message methods resolve automatically when guildId is available.
|
|
833
1025
|
*/
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
};
|
|
1026
|
+
private static formatEmoji;
|
|
1027
|
+
private resolveEmojiForReaction;
|
|
837
1028
|
/**
|
|
838
|
-
*
|
|
839
|
-
*
|
|
840
|
-
* @param channel - The guild channel to check permissions for
|
|
841
|
-
* @returns Object with has(permission) to check specific permissions
|
|
842
|
-
* @example
|
|
843
|
-
* const perms = member.permissionsIn(channel);
|
|
844
|
-
* if (perms.has(PermissionFlags.SendMessages)) { ... }
|
|
1029
|
+
* Add a reaction to this message (as the bot).
|
|
1030
|
+
* @param emoji - Unicode emoji, custom `{ name, id }`, `:name:`, `name:id`, or `<:name:id>`
|
|
845
1031
|
*/
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
}
|
|
851
|
-
|
|
852
|
-
/**
|
|
853
|
-
* Manages guild members with a Collection-like API.
|
|
854
|
-
* Extends Collection so you can use .get(), .set(), .filter(), etc.
|
|
855
|
-
* Provides guild.members.me for Discord.js parity.
|
|
856
|
-
*/
|
|
857
|
-
declare class GuildMemberManager extends Collection<string, GuildMember> {
|
|
858
|
-
private readonly guild;
|
|
859
|
-
constructor(guild: Guild);
|
|
1032
|
+
react(emoji: string | {
|
|
1033
|
+
name: string;
|
|
1034
|
+
id?: string;
|
|
1035
|
+
animated?: boolean;
|
|
1036
|
+
}): Promise<void>;
|
|
860
1037
|
/**
|
|
861
|
-
*
|
|
862
|
-
*
|
|
863
|
-
*
|
|
864
|
-
*
|
|
865
|
-
* @example
|
|
866
|
-
* const perms = guild.members.me?.permissions;
|
|
867
|
-
* if (perms?.has(PermissionFlags.BanMembers)) { ... }
|
|
1038
|
+
* Remove the bot's reaction, or a specific user's reaction if userId is provided.
|
|
1039
|
+
* @param emoji - Unicode emoji, custom `{ name, id }`, `:name:`, `name:id`, or `<:name:id>`
|
|
1040
|
+
* @param userId - If provided, removes that user's reaction (requires moderator permissions)
|
|
868
1041
|
*/
|
|
869
|
-
|
|
1042
|
+
removeReaction(emoji: string | {
|
|
1043
|
+
name: string;
|
|
1044
|
+
id?: string;
|
|
1045
|
+
animated?: boolean;
|
|
1046
|
+
}, userId?: string): Promise<void>;
|
|
870
1047
|
/**
|
|
871
|
-
*
|
|
872
|
-
*
|
|
873
|
-
*
|
|
874
|
-
* @throws Error if client.user is null (client not ready)
|
|
875
|
-
* @example
|
|
876
|
-
* const me = await guild.members.fetchMe();
|
|
877
|
-
* console.log(me.displayName);
|
|
1048
|
+
* Remove all reactions from this message.
|
|
1049
|
+
* Requires moderator permissions.
|
|
878
1050
|
*/
|
|
879
|
-
|
|
1051
|
+
removeAllReactions(): Promise<void>;
|
|
880
1052
|
/**
|
|
881
|
-
*
|
|
882
|
-
* @param
|
|
883
|
-
* @returns Array of GuildMember objects (cached in guild.members)
|
|
1053
|
+
* Remove all reactions of a specific emoji from this message.
|
|
1054
|
+
* @param emoji - Unicode emoji, custom `{ name, id }`, `:name:`, `name:id`, or `<:name:id>`. Requires moderator permissions.
|
|
884
1055
|
*/
|
|
885
|
-
|
|
1056
|
+
removeReactionEmoji(emoji: string | {
|
|
1057
|
+
name: string;
|
|
1058
|
+
id?: string;
|
|
1059
|
+
animated?: boolean;
|
|
1060
|
+
}): Promise<void>;
|
|
1061
|
+
/**
|
|
1062
|
+
* Fetch users who reacted with the given emoji.
|
|
1063
|
+
* @param emoji - Unicode emoji or custom `{ name, id }`
|
|
1064
|
+
* @param options - limit (1–100), after (user ID for pagination)
|
|
1065
|
+
* @returns Array of User objects
|
|
1066
|
+
*/
|
|
1067
|
+
fetchReactionUsers(emoji: string | {
|
|
1068
|
+
name: string;
|
|
1069
|
+
id?: string;
|
|
1070
|
+
animated?: boolean;
|
|
1071
|
+
}, options?: {
|
|
886
1072
|
limit?: number;
|
|
887
1073
|
after?: string;
|
|
888
|
-
}): Promise<
|
|
1074
|
+
}): Promise<User[]>;
|
|
889
1075
|
}
|
|
890
1076
|
|
|
891
|
-
/**
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
mentionable: boolean;
|
|
902
|
-
unicodeEmoji: string | null;
|
|
903
|
-
/** Separately sorted position for hoisted roles. Null if not set. */
|
|
904
|
-
hoistPosition: number | null;
|
|
905
|
-
/** @param client - The client instance */
|
|
906
|
-
/** @param data - API role from GET /guilds/{id}/roles or gateway role events */
|
|
907
|
-
/** @param guildId - The guild this role belongs to */
|
|
908
|
-
constructor(client: Client, data: APIRole, guildId: string);
|
|
909
|
-
/** Update mutable fields from fresh API data. Used by edit and gateway events. */
|
|
910
|
-
_patch(data: Partial<APIRole>): void;
|
|
911
|
-
/** Returns a mention string (e.g. `<@&123456>`). */
|
|
912
|
-
toString(): string;
|
|
913
|
-
/**
|
|
914
|
-
* Check if this role has a permission. Administrator grants all permissions.
|
|
915
|
-
* @param permission - Permission flag, name, or resolvable
|
|
916
|
-
* @returns true if the role has the permission
|
|
917
|
-
* @example
|
|
918
|
-
* if (role.has(PermissionFlags.BanMembers)) { ... }
|
|
919
|
-
* if (role.has('ManageChannels')) { ... }
|
|
920
|
-
*/
|
|
921
|
-
has(permission: PermissionResolvable): boolean;
|
|
922
|
-
/**
|
|
923
|
-
* Edit this role.
|
|
924
|
-
* Requires Manage Roles permission.
|
|
925
|
-
* @param options - Role updates (permissions accepts PermissionResolvable for convenience)
|
|
926
|
-
* @returns This role (updated in place)
|
|
927
|
-
* @example
|
|
928
|
-
* await role.edit({ name: 'Moderator', permissions: ['BanMembers', 'KickMembers'] });
|
|
929
|
-
*/
|
|
930
|
-
edit(options: RESTUpdateRoleBody & {
|
|
931
|
-
permissions?: string | PermissionResolvable;
|
|
932
|
-
}): Promise<Role>;
|
|
1077
|
+
/**
|
|
1078
|
+
* Manages messages for a channel. Access via channel.messages.
|
|
1079
|
+
* @example
|
|
1080
|
+
* const message = await channel.messages.fetch(messageId);
|
|
1081
|
+
* if (message) await message.edit({ content: 'Updated!' });
|
|
1082
|
+
*/
|
|
1083
|
+
declare class MessageManager {
|
|
1084
|
+
private readonly client;
|
|
1085
|
+
private readonly channelId;
|
|
1086
|
+
constructor(client: Client, channelId: string);
|
|
933
1087
|
/**
|
|
934
|
-
*
|
|
935
|
-
*
|
|
1088
|
+
* Fetch a message by ID from this channel.
|
|
1089
|
+
* @param messageId - Snowflake of the message
|
|
1090
|
+
* @returns The message
|
|
1091
|
+
* @throws FluxerError with MESSAGE_NOT_FOUND if the message does not exist
|
|
936
1092
|
*/
|
|
937
|
-
|
|
1093
|
+
fetch(messageId: string): Promise<Message>;
|
|
1094
|
+
}
|
|
1095
|
+
|
|
1096
|
+
interface MessageCollectorOptions {
|
|
1097
|
+
/** Filter function. Return true to collect the message. */
|
|
1098
|
+
filter?: (message: Message) => boolean;
|
|
1099
|
+
/** Max duration in ms. Collector stops when time expires. */
|
|
1100
|
+
time?: number;
|
|
1101
|
+
/** Max messages to collect. Collector stops when limit reached. */
|
|
1102
|
+
max?: number;
|
|
1103
|
+
}
|
|
1104
|
+
type MessageCollectorEndReason = 'time' | 'limit' | 'user';
|
|
1105
|
+
interface MessageCollectorEvents {
|
|
1106
|
+
collect: [message: Message];
|
|
1107
|
+
end: [collected: Collection<string, Message>, reason: MessageCollectorEndReason];
|
|
1108
|
+
}
|
|
1109
|
+
/**
|
|
1110
|
+
* Collects messages in a channel. Use channel.createMessageCollector().
|
|
1111
|
+
* @example
|
|
1112
|
+
* const collector = channel.createMessageCollector({ filter: m => m.author.id === userId, time: 10000 });
|
|
1113
|
+
* collector.on('collect', m => console.log(m.content));
|
|
1114
|
+
* collector.on('end', (collected, reason) => console.log(`Stopped: ${reason}`));
|
|
1115
|
+
*/
|
|
1116
|
+
declare class MessageCollector extends EventEmitter {
|
|
1117
|
+
readonly client: Client;
|
|
1118
|
+
readonly channelId: string;
|
|
1119
|
+
readonly options: Required<MessageCollectorOptions>;
|
|
1120
|
+
readonly collected: Collection<string, Message>;
|
|
1121
|
+
private _timeout;
|
|
1122
|
+
private _ended;
|
|
1123
|
+
private _listener;
|
|
1124
|
+
constructor(client: Client, channelId: string, options?: MessageCollectorOptions);
|
|
1125
|
+
stop(reason?: MessageCollectorEndReason): void;
|
|
1126
|
+
on<K extends keyof MessageCollectorEvents>(event: K, listener: (...args: MessageCollectorEvents[K]) => void): this;
|
|
1127
|
+
emit<K extends keyof MessageCollectorEvents>(event: K, ...args: MessageCollectorEvents[K]): boolean;
|
|
938
1128
|
}
|
|
939
1129
|
|
|
940
|
-
/** Represents
|
|
941
|
-
declare class
|
|
1130
|
+
/** Represents an invite to a guild or channel. */
|
|
1131
|
+
declare class Invite extends Base {
|
|
942
1132
|
readonly client: Client;
|
|
943
|
-
readonly
|
|
944
|
-
readonly
|
|
945
|
-
readonly
|
|
946
|
-
|
|
1133
|
+
readonly code: string;
|
|
1134
|
+
readonly type: number;
|
|
1135
|
+
readonly guild: APIGuildPartial;
|
|
1136
|
+
readonly channel: APIChannelPartial;
|
|
1137
|
+
readonly inviter: User | null;
|
|
1138
|
+
readonly memberCount: number | null;
|
|
1139
|
+
readonly presenceCount: number | null;
|
|
947
1140
|
readonly expiresAt: string | null;
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
1141
|
+
readonly temporary: boolean | null;
|
|
1142
|
+
readonly createdAt: string | null;
|
|
1143
|
+
readonly uses: number | null;
|
|
1144
|
+
readonly maxUses: number | null;
|
|
1145
|
+
readonly maxAge: number | null;
|
|
1146
|
+
/** @param data - API invite from GET /invites/{code}, channel/guild invite list, or gateway INVITE_CREATE */
|
|
1147
|
+
constructor(client: Client, data: APIInvite);
|
|
1148
|
+
/** Full invite URL (https://fluxer.gg/{code} or instance-specific). */
|
|
1149
|
+
get url(): string;
|
|
952
1150
|
/**
|
|
953
|
-
*
|
|
954
|
-
*
|
|
1151
|
+
* Resolve the guild from cache if available.
|
|
1152
|
+
* @returns The guild, or null if not cached
|
|
955
1153
|
*/
|
|
956
|
-
|
|
1154
|
+
getGuild(): Guild | null;
|
|
1155
|
+
/**
|
|
1156
|
+
* Delete this invite.
|
|
1157
|
+
* Requires Manage Guild or Create Instant Invite permission.
|
|
1158
|
+
*/
|
|
1159
|
+
delete(): Promise<void>;
|
|
957
1160
|
}
|
|
958
1161
|
|
|
959
|
-
/**
|
|
960
|
-
declare class
|
|
1162
|
+
/** Base class for all channel types. */
|
|
1163
|
+
declare abstract class Channel extends Base {
|
|
1164
|
+
/** Whether this channel has a send method (TextChannel, DMChannel). */
|
|
1165
|
+
isSendable(): this is TextChannel | DMChannel;
|
|
1166
|
+
/** Whether this channel is a DM or Group DM. */
|
|
1167
|
+
isDM(): boolean;
|
|
1168
|
+
/** Whether this channel is voice-based (VoiceChannel). */
|
|
1169
|
+
isVoice(): boolean;
|
|
1170
|
+
/** Create a DM channel from API data (type DM or GroupDM). */
|
|
1171
|
+
static createDM(client: Client, data: APIChannelPartial): DMChannel;
|
|
961
1172
|
readonly client: Client;
|
|
962
1173
|
readonly id: string;
|
|
963
|
-
|
|
1174
|
+
type: ChannelType;
|
|
1175
|
+
/** Channel name. Guild channels and Group DMs have names; 1:1 DMs are typically null. */
|
|
1176
|
+
name: string | null;
|
|
1177
|
+
/** Channel icon hash (Group DMs). Null if none. */
|
|
964
1178
|
icon: string | null;
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
/**
|
|
968
|
-
|
|
969
|
-
/** Custom vanity URL code (e.g. fluxer.gg/code). Null if none. */
|
|
970
|
-
vanityURLCode: string | null;
|
|
971
|
-
/** Enabled guild features. */
|
|
972
|
-
features: GuildFeature[];
|
|
973
|
-
verificationLevel: GuildVerificationLevel;
|
|
974
|
-
defaultMessageNotifications: DefaultMessageNotifications;
|
|
975
|
-
explicitContentFilter: GuildExplicitContentFilter;
|
|
976
|
-
/** AFK voice channel ID. Null if none. */
|
|
977
|
-
afkChannelId: string | null;
|
|
978
|
-
/** AFK timeout in seconds. */
|
|
979
|
-
afkTimeout: number;
|
|
980
|
-
/** System messages channel ID. Null if none. */
|
|
981
|
-
systemChannelId: string | null;
|
|
982
|
-
/** Rules/guidelines channel ID. Null if none. */
|
|
983
|
-
rulesChannelId: string | null;
|
|
984
|
-
nsfwLevel: number;
|
|
985
|
-
mfaLevel: GuildMFALevel;
|
|
986
|
-
/** Banner image width. Optional. */
|
|
987
|
-
bannerWidth?: number | null;
|
|
988
|
-
/** Banner image height. Optional. */
|
|
989
|
-
bannerHeight?: number | null;
|
|
990
|
-
/** Splash image width. Optional. */
|
|
991
|
-
splashWidth?: number | null;
|
|
992
|
-
/** Splash image height. Optional. */
|
|
993
|
-
splashHeight?: number | null;
|
|
994
|
-
members: GuildMemberManager;
|
|
995
|
-
channels: Collection<string, GuildChannel>;
|
|
996
|
-
roles: Collection<string, Role>;
|
|
997
|
-
/** @param data - API guild from GET /guilds/{id} or gateway GUILD_CREATE */
|
|
998
|
-
constructor(client: Client, data: APIGuild & {
|
|
999
|
-
roles?: APIRole[];
|
|
1000
|
-
ownerId?: string;
|
|
1001
|
-
});
|
|
1002
|
-
/** Get the guild icon URL, or null if no icon. */
|
|
1003
|
-
iconURL(options?: {
|
|
1004
|
-
size?: number;
|
|
1005
|
-
}): string | null;
|
|
1006
|
-
/** Get the guild banner URL, or null if no banner. */
|
|
1007
|
-
bannerURL(options?: {
|
|
1008
|
-
size?: number;
|
|
1009
|
-
}): string | null;
|
|
1010
|
-
/** Get the guild splash (invite background) URL, or null if no splash. */
|
|
1011
|
-
splashURL(options?: {
|
|
1012
|
-
size?: number;
|
|
1013
|
-
}): string | null;
|
|
1014
|
-
/**
|
|
1015
|
-
* Add a role to a member by user ID. Does not require fetching the member first.
|
|
1016
|
-
* @param userId - The user ID of the member
|
|
1017
|
-
* @param roleId - The role ID to add (or use guild.resolveRoleId for mention/name resolution)
|
|
1018
|
-
* Requires Manage Roles permission.
|
|
1019
|
-
*/
|
|
1020
|
-
addRoleToMember(userId: string, roleId: string): Promise<void>;
|
|
1021
|
-
/**
|
|
1022
|
-
* Remove a role from a member by user ID. Does not require fetching the member first.
|
|
1023
|
-
* @param userId - The user ID of the member
|
|
1024
|
-
* @param roleId - The role ID to remove
|
|
1025
|
-
* Requires Manage Roles permission.
|
|
1026
|
-
*/
|
|
1027
|
-
removeRoleFromMember(userId: string, roleId: string): Promise<void>;
|
|
1179
|
+
/** ISO timestamp when the last message was pinned. Null if never pinned. */
|
|
1180
|
+
lastPinTimestamp: string | null;
|
|
1181
|
+
/** @param data - API channel from GET /channels/{id} or GET /guilds/{id}/channels */
|
|
1182
|
+
constructor(client: Client, data: APIChannelPartial);
|
|
1028
1183
|
/**
|
|
1029
|
-
* Create
|
|
1030
|
-
*
|
|
1031
|
-
* @param
|
|
1032
|
-
* @returns The created role
|
|
1033
|
-
* @example
|
|
1034
|
-
* const role = await guild.createRole({ name: 'Mod', permissions: ['KickMembers', 'BanMembers'] });
|
|
1184
|
+
* Create the appropriate channel subclass from API data.
|
|
1185
|
+
* @param client - The client instance
|
|
1186
|
+
* @param data - Channel data from the API
|
|
1035
1187
|
*/
|
|
1036
|
-
|
|
1037
|
-
permissions?: string | PermissionResolvable;
|
|
1038
|
-
}): Promise<Role>;
|
|
1188
|
+
static from(client: Client, data: APIChannel | APIChannelPartial): GuildChannel | TextChannel | null;
|
|
1039
1189
|
/**
|
|
1040
|
-
*
|
|
1041
|
-
*
|
|
1190
|
+
* Create a channel from API data, including DM and GroupDM.
|
|
1191
|
+
* Used by ChannelManager.fetch() for GET /channels/{id}.
|
|
1042
1192
|
*/
|
|
1043
|
-
|
|
1193
|
+
static fromOrCreate(client: Client, data: APIChannel | APIChannelPartial): TextChannel | DMChannel | GuildChannel | null;
|
|
1044
1194
|
/**
|
|
1045
|
-
*
|
|
1046
|
-
* @param
|
|
1047
|
-
* @returns The role
|
|
1048
|
-
* @throws FluxerError with ROLE_NOT_FOUND if role does not exist (404)
|
|
1195
|
+
* Bulk delete messages. Requires Manage Messages permission.
|
|
1196
|
+
* @param messageIds - Array of message IDs to delete (2–100)
|
|
1049
1197
|
*/
|
|
1050
|
-
|
|
1198
|
+
bulkDeleteMessages(messageIds: string[]): Promise<void>;
|
|
1051
1199
|
/**
|
|
1052
|
-
*
|
|
1053
|
-
* Fetches guild roles if name is provided.
|
|
1054
|
-
* @param arg - Role mention (@role), role ID, or role name
|
|
1055
|
-
* @returns The role ID, or null if not found
|
|
1200
|
+
* Send a typing indicator to the channel. Lasts ~10 seconds.
|
|
1056
1201
|
*/
|
|
1057
|
-
|
|
1202
|
+
sendTyping(): Promise<void>;
|
|
1203
|
+
}
|
|
1204
|
+
declare class GuildChannel extends Channel {
|
|
1205
|
+
readonly guildId: string;
|
|
1206
|
+
name: string | null;
|
|
1207
|
+
position?: number;
|
|
1208
|
+
parentId: string | null;
|
|
1209
|
+
/** Permission overwrites for roles and members. */
|
|
1210
|
+
permissionOverwrites: APIChannelOverwrite[];
|
|
1211
|
+
constructor(client: Client, data: APIChannel);
|
|
1058
1212
|
/**
|
|
1059
|
-
*
|
|
1060
|
-
* @param
|
|
1061
|
-
* @
|
|
1062
|
-
* ban_duration_seconds: 0 = permanent, or use 3600, 43200, 86400, 259200, 432000, 604800, 1209600, 2592000.
|
|
1063
|
-
* Requires Ban Members permission.
|
|
1213
|
+
* Create a webhook in this channel.
|
|
1214
|
+
* @param options - Webhook name and optional avatar URL
|
|
1215
|
+
* @returns The webhook with token (required for send()). Requires Manage Webhooks permission.
|
|
1064
1216
|
*/
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
}): Promise<void>;
|
|
1217
|
+
createWebhook(options: {
|
|
1218
|
+
name: string;
|
|
1219
|
+
avatar?: string | null;
|
|
1220
|
+
}): Promise<Webhook>;
|
|
1070
1221
|
/**
|
|
1071
|
-
* Fetch
|
|
1072
|
-
* @returns
|
|
1222
|
+
* Fetch all webhooks in this channel.
|
|
1223
|
+
* @returns Webhooks (includes token when listing from channel; can send via send())
|
|
1073
1224
|
*/
|
|
1074
|
-
|
|
1225
|
+
fetchWebhooks(): Promise<Webhook[]>;
|
|
1075
1226
|
/**
|
|
1076
|
-
*
|
|
1077
|
-
* @param
|
|
1078
|
-
* Requires
|
|
1227
|
+
* Create an invite for this channel.
|
|
1228
|
+
* @param options - max_uses (0–100), max_age (0–604800 seconds), unique, temporary
|
|
1229
|
+
* Requires Create Instant Invite permission.
|
|
1079
1230
|
*/
|
|
1080
|
-
|
|
1231
|
+
createInvite(options?: {
|
|
1232
|
+
max_uses?: number;
|
|
1233
|
+
max_age?: number;
|
|
1234
|
+
unique?: boolean;
|
|
1235
|
+
temporary?: boolean;
|
|
1236
|
+
}): Promise<Invite>;
|
|
1081
1237
|
/**
|
|
1082
|
-
*
|
|
1083
|
-
*
|
|
1084
|
-
* Requires Kick Members permission.
|
|
1238
|
+
* Fetch invites for this channel.
|
|
1239
|
+
* Requires Manage Channel permission.
|
|
1085
1240
|
*/
|
|
1086
|
-
|
|
1241
|
+
fetchInvites(): Promise<Invite[]>;
|
|
1087
1242
|
/**
|
|
1088
|
-
*
|
|
1089
|
-
* @param
|
|
1090
|
-
* @
|
|
1091
|
-
* @throws FluxerError with MEMBER_NOT_FOUND if user is not in the guild (404)
|
|
1092
|
-
* @throws FluxerError with cause for permission denied (403) or other REST errors
|
|
1243
|
+
* Set or update a permission overwrite. PUT /channels/{id}/permissions/{overwriteId}.
|
|
1244
|
+
* @param overwriteId - Role or member ID
|
|
1245
|
+
* @param options - type (0=role, 1=member), allow, deny (permission bitfields)
|
|
1093
1246
|
*/
|
|
1094
|
-
|
|
1247
|
+
editPermission(overwriteId: string, options: {
|
|
1248
|
+
type: 0 | 1;
|
|
1249
|
+
allow?: string;
|
|
1250
|
+
deny?: string;
|
|
1251
|
+
}): Promise<void>;
|
|
1095
1252
|
/**
|
|
1096
|
-
*
|
|
1097
|
-
* @param options - Optional limit, before, after, user_id, action_type for filtering
|
|
1253
|
+
* Remove a permission overwrite. DELETE /channels/{id}/permissions/{overwriteId}.
|
|
1098
1254
|
*/
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
userId?: string;
|
|
1104
|
-
actionType?: number;
|
|
1105
|
-
}): Promise<APIGuildAuditLog>;
|
|
1106
|
-
/** Fetch all webhooks in this guild. Returned webhooks do not include the token (cannot send). */
|
|
1107
|
-
fetchWebhooks(): Promise<Webhook[]>;
|
|
1108
|
-
/**
|
|
1109
|
-
* Create a channel in this guild.
|
|
1110
|
-
* @param data - Channel data: type (0=text, 2=voice, 4=category, 5=link), name, and optional parent_id, topic, bitrate, user_limit, nsfw, permission_overwrites
|
|
1111
|
-
* Requires Manage Channels permission.
|
|
1255
|
+
deletePermission(overwriteId: string): Promise<void>;
|
|
1256
|
+
/**
|
|
1257
|
+
* Edit this channel. PATCH /channels/{id}.
|
|
1258
|
+
* Requires Manage Channel permission.
|
|
1112
1259
|
*/
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
name: string;
|
|
1116
|
-
parent_id?: string | null;
|
|
1260
|
+
edit(options: {
|
|
1261
|
+
name?: string | null;
|
|
1117
1262
|
topic?: string | null;
|
|
1263
|
+
parent_id?: string | null;
|
|
1118
1264
|
bitrate?: number | null;
|
|
1119
1265
|
user_limit?: number | null;
|
|
1120
1266
|
nsfw?: boolean;
|
|
1267
|
+
rate_limit_per_user?: number;
|
|
1268
|
+
rtc_region?: string | null;
|
|
1121
1269
|
permission_overwrites?: Array<{
|
|
1122
1270
|
id: string;
|
|
1123
1271
|
type: number;
|
|
1124
|
-
allow
|
|
1125
|
-
deny
|
|
1272
|
+
allow?: string;
|
|
1273
|
+
deny?: string;
|
|
1126
1274
|
}>;
|
|
1127
|
-
}): Promise<GuildChannel>;
|
|
1128
|
-
/**
|
|
1129
|
-
* Fetch all channels in this guild.
|
|
1130
|
-
* @returns Array of GuildChannel objects (cached in guild.channels and client.channels)
|
|
1131
|
-
*/
|
|
1132
|
-
fetchChannels(): Promise<GuildChannel[]>;
|
|
1133
|
-
/**
|
|
1134
|
-
* Edit this guild. PATCH /guilds/{id}.
|
|
1135
|
-
* Requires guild owner or Administrator.
|
|
1136
|
-
*/
|
|
1137
|
-
edit(options: {
|
|
1138
|
-
name?: string;
|
|
1139
|
-
icon?: string | null;
|
|
1140
|
-
system_channel_id?: string | null;
|
|
1141
|
-
system_channel_flags?: number;
|
|
1142
|
-
afk_channel_id?: string | null;
|
|
1143
|
-
afk_timeout?: number;
|
|
1144
|
-
default_message_notifications?: DefaultMessageNotifications;
|
|
1145
|
-
verification_level?: GuildVerificationLevel;
|
|
1146
|
-
mfa_level?: GuildMFALevel;
|
|
1147
|
-
explicit_content_filter?: GuildExplicitContentFilter;
|
|
1148
|
-
banner?: string | null;
|
|
1149
|
-
splash?: string | null;
|
|
1150
|
-
embed_splash?: string | null;
|
|
1151
|
-
splash_card_alignment?: string;
|
|
1152
|
-
features?: GuildFeature[];
|
|
1153
1275
|
}): Promise<this>;
|
|
1154
1276
|
/**
|
|
1155
|
-
* Delete this
|
|
1156
|
-
*
|
|
1157
|
-
*/
|
|
1158
|
-
delete(): Promise<void>;
|
|
1159
|
-
/**
|
|
1160
|
-
* Fetch vanity URL for this guild. GET /guilds/{id}/vanity-url.
|
|
1161
|
-
* Requires Manage Guild permission.
|
|
1162
|
-
*/
|
|
1163
|
-
fetchVanityURL(): Promise<APIVanityURL>;
|
|
1164
|
-
/**
|
|
1165
|
-
* Transfer guild ownership to another user. POST /guilds/{id}/transfer-ownership.
|
|
1166
|
-
* Must be the guild owner.
|
|
1167
|
-
*/
|
|
1168
|
-
transferOwnership(newOwnerId: string, password?: string): Promise<void>;
|
|
1169
|
-
/**
|
|
1170
|
-
* Set text channel flexible names feature. PATCH /guilds/{id}/text-channel-flexible-names.
|
|
1277
|
+
* Delete this channel. Requires Manage Channel permission.
|
|
1278
|
+
* @param options - silent: if true, does not send a system message (default false)
|
|
1171
1279
|
*/
|
|
1172
|
-
|
|
1280
|
+
delete(options?: {
|
|
1281
|
+
silent?: boolean;
|
|
1282
|
+
}): Promise<void>;
|
|
1283
|
+
}
|
|
1284
|
+
declare class TextChannel extends GuildChannel {
|
|
1285
|
+
topic?: string | null;
|
|
1286
|
+
nsfw?: boolean;
|
|
1287
|
+
rateLimitPerUser?: number;
|
|
1288
|
+
lastMessageId?: string | null;
|
|
1289
|
+
constructor(client: Client, data: APIChannel);
|
|
1173
1290
|
/**
|
|
1174
|
-
*
|
|
1291
|
+
* Send a message to this channel.
|
|
1292
|
+
* @param options - Text content or object with content, embeds, and/or files
|
|
1175
1293
|
*/
|
|
1176
|
-
|
|
1294
|
+
send(options: MessageSendOptions): Promise<Message>;
|
|
1295
|
+
/** Message manager for this channel. Use channel.messages.fetch(messageId). */
|
|
1296
|
+
get messages(): MessageManager;
|
|
1177
1297
|
/**
|
|
1178
|
-
*
|
|
1298
|
+
* Create a message collector for this channel.
|
|
1299
|
+
* Collects messages matching the filter until time expires or max is reached.
|
|
1300
|
+
* @param options - Filter, time (ms), and max count
|
|
1301
|
+
* @example
|
|
1302
|
+
* const collector = channel.createMessageCollector({ filter: m => m.author.id === userId, time: 10000 });
|
|
1303
|
+
* collector.on('collect', m => console.log(m.content));
|
|
1304
|
+
* collector.on('end', (collected, reason) => { ... });
|
|
1179
1305
|
*/
|
|
1180
|
-
|
|
1306
|
+
createMessageCollector(options?: MessageCollectorOptions): MessageCollector;
|
|
1181
1307
|
/**
|
|
1182
|
-
*
|
|
1183
|
-
* @
|
|
1308
|
+
* Fetch pinned messages in this channel.
|
|
1309
|
+
* @returns Pinned messages
|
|
1184
1310
|
*/
|
|
1185
|
-
|
|
1186
|
-
id: string;
|
|
1187
|
-
position?: number;
|
|
1188
|
-
}>): Promise<APIRole[]>;
|
|
1311
|
+
fetchPinnedMessages(): Promise<Message[]>;
|
|
1189
1312
|
/**
|
|
1190
|
-
*
|
|
1313
|
+
* Fetch a message by ID from this channel.
|
|
1314
|
+
* @param messageId - Snowflake of the message
|
|
1315
|
+
* @returns The message, or null if not found
|
|
1316
|
+
* @deprecated Use channel.messages.fetch(messageId) instead.
|
|
1191
1317
|
*/
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1318
|
+
fetchMessage(messageId: string): Promise<Message>;
|
|
1319
|
+
}
|
|
1320
|
+
declare class CategoryChannel extends GuildChannel {
|
|
1321
|
+
}
|
|
1322
|
+
declare class VoiceChannel extends GuildChannel {
|
|
1323
|
+
bitrate?: number | null;
|
|
1324
|
+
userLimit?: number | null;
|
|
1325
|
+
rtcRegion?: string | null;
|
|
1326
|
+
constructor(client: Client, data: APIChannel);
|
|
1327
|
+
}
|
|
1328
|
+
declare class LinkChannel extends GuildChannel {
|
|
1329
|
+
url?: string | null;
|
|
1330
|
+
constructor(client: Client, data: APIChannel);
|
|
1331
|
+
}
|
|
1332
|
+
/** DM channel (direct message between bot and a user). */
|
|
1333
|
+
declare class DMChannel extends Channel {
|
|
1334
|
+
lastMessageId?: string | null;
|
|
1335
|
+
/** Group DM creator ID. Null for 1:1 DMs. */
|
|
1336
|
+
ownerId: string | null;
|
|
1337
|
+
/** Group DM recipients as User objects. Empty for 1:1 DMs. */
|
|
1338
|
+
recipients: User[];
|
|
1339
|
+
/** Group DM member display names (userId -> nickname). */
|
|
1340
|
+
nicks: Record<string, string>;
|
|
1341
|
+
constructor(client: Client, data: APIChannelPartial & Partial<APIChannel>);
|
|
1196
1342
|
/**
|
|
1197
|
-
*
|
|
1343
|
+
* Send a message to this DM channel.
|
|
1344
|
+
* @param options - Text content or object with content, embeds, and/or files
|
|
1198
1345
|
*/
|
|
1199
|
-
|
|
1346
|
+
send(options: MessageSendOptions): Promise<Message>;
|
|
1347
|
+
/** Message manager for this channel. Use channel.messages.fetch(messageId). */
|
|
1348
|
+
get messages(): MessageManager;
|
|
1200
1349
|
/**
|
|
1201
|
-
*
|
|
1202
|
-
* @param
|
|
1203
|
-
* Requires Manage Channels permission.
|
|
1350
|
+
* Create a message collector for this DM channel.
|
|
1351
|
+
* @param options - Filter, time (ms), and max count
|
|
1204
1352
|
*/
|
|
1205
|
-
|
|
1206
|
-
id: string;
|
|
1207
|
-
position?: number;
|
|
1208
|
-
parent_id?: string | null;
|
|
1209
|
-
lock_permissions?: boolean;
|
|
1210
|
-
}>): Promise<void>;
|
|
1353
|
+
createMessageCollector(options?: MessageCollectorOptions): MessageCollector;
|
|
1211
1354
|
/**
|
|
1212
|
-
*
|
|
1213
|
-
* @
|
|
1214
|
-
* @returns Array of created GuildEmoji objects
|
|
1355
|
+
* Fetch pinned messages in this DM channel.
|
|
1356
|
+
* @returns Pinned messages
|
|
1215
1357
|
*/
|
|
1216
|
-
|
|
1217
|
-
name: string;
|
|
1218
|
-
image: string;
|
|
1219
|
-
}>): Promise<GuildEmoji[]>;
|
|
1358
|
+
fetchPinnedMessages(): Promise<Message[]>;
|
|
1220
1359
|
/**
|
|
1221
|
-
*
|
|
1222
|
-
* @param
|
|
1223
|
-
* @returns
|
|
1360
|
+
* Fetch a message by ID from this DM channel.
|
|
1361
|
+
* @param messageId - Snowflake of the message
|
|
1362
|
+
* @returns The message, or null if not found
|
|
1363
|
+
* @deprecated Use channel.messages.fetch(messageId) instead.
|
|
1224
1364
|
*/
|
|
1225
|
-
|
|
1226
|
-
name: string;
|
|
1227
|
-
image: string;
|
|
1228
|
-
description?: string;
|
|
1229
|
-
tags?: string[];
|
|
1230
|
-
}>): Promise<GuildSticker[]>;
|
|
1231
|
-
}
|
|
1232
|
-
|
|
1233
|
-
/** Represents an invite to a guild or channel. */
|
|
1234
|
-
declare class Invite extends Base {
|
|
1235
|
-
readonly client: Client;
|
|
1236
|
-
readonly code: string;
|
|
1237
|
-
readonly type: number;
|
|
1238
|
-
readonly guild: APIGuildPartial;
|
|
1239
|
-
readonly channel: APIChannelPartial;
|
|
1240
|
-
readonly inviter: User | null;
|
|
1241
|
-
readonly memberCount: number | null;
|
|
1242
|
-
readonly presenceCount: number | null;
|
|
1243
|
-
readonly expiresAt: string | null;
|
|
1244
|
-
readonly temporary: boolean | null;
|
|
1245
|
-
readonly createdAt: string | null;
|
|
1246
|
-
readonly uses: number | null;
|
|
1247
|
-
readonly maxUses: number | null;
|
|
1248
|
-
readonly maxAge: number | null;
|
|
1249
|
-
/** @param data - API invite from GET /invites/{code}, channel/guild invite list, or gateway INVITE_CREATE */
|
|
1250
|
-
constructor(client: Client, data: APIInvite);
|
|
1251
|
-
/** Full invite URL (https://fluxer.gg/{code} or instance-specific). */
|
|
1252
|
-
get url(): string;
|
|
1365
|
+
fetchMessage(messageId: string): Promise<Message>;
|
|
1253
1366
|
/**
|
|
1254
|
-
*
|
|
1255
|
-
*
|
|
1367
|
+
* Add a recipient to this Group DM. Requires Group DM (type GroupDM).
|
|
1368
|
+
* PUT /channels/{id}/recipients/{userId}.
|
|
1256
1369
|
*/
|
|
1257
|
-
|
|
1370
|
+
addRecipient(userId: string): Promise<void>;
|
|
1258
1371
|
/**
|
|
1259
|
-
*
|
|
1260
|
-
*
|
|
1372
|
+
* Remove a recipient from this Group DM. Requires Group DM (type GroupDM).
|
|
1373
|
+
* DELETE /channels/{id}/recipients/{userId}.
|
|
1374
|
+
* @param options - silent: if true, does not send a system message (default false)
|
|
1261
1375
|
*/
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
/** Minimal message data for MessageDelete when the full message is not available. */
|
|
1266
|
-
interface PartialMessage {
|
|
1267
|
-
id: string;
|
|
1268
|
-
channelId: string;
|
|
1269
|
-
channel?: Channel | null;
|
|
1270
|
-
/** Message content, when provided by the gateway (e.g. Fluxer). */
|
|
1271
|
-
content?: string | null;
|
|
1272
|
-
/** Author user ID, when provided by the gateway (e.g. Fluxer). */
|
|
1273
|
-
authorId?: string | null;
|
|
1376
|
+
removeRecipient(userId: string, options?: {
|
|
1377
|
+
silent?: boolean;
|
|
1378
|
+
}): Promise<void>;
|
|
1274
1379
|
}
|
|
1275
1380
|
|
|
1276
1381
|
/**
|
|
1277
1382
|
* Manages channels with fetch and send.
|
|
1278
1383
|
* Extends Collection so you can use .get(), .set(), .filter(), etc.
|
|
1279
1384
|
*/
|
|
1280
|
-
declare class ChannelManager extends Collection<string, Channel> {
|
|
1385
|
+
declare class ChannelManager extends Collection<string, Channel | GuildChannel> {
|
|
1281
1386
|
private readonly client;
|
|
1387
|
+
private readonly maxSize;
|
|
1282
1388
|
constructor(client: Client);
|
|
1389
|
+
set(key: string, value: Channel): this;
|
|
1390
|
+
/**
|
|
1391
|
+
* Get a channel from cache or fetch from the API if not present.
|
|
1392
|
+
* Convenience helper to avoid repeating `client.channels.get(id) ?? (await client.channels.fetch(id))`.
|
|
1393
|
+
* @param channelId - Snowflake of the channel
|
|
1394
|
+
* @returns The channel
|
|
1395
|
+
* @throws FluxerError with CHANNEL_NOT_FOUND if the channel does not exist
|
|
1396
|
+
* @example
|
|
1397
|
+
* const channel = await client.channels.resolve(message.channelId);
|
|
1398
|
+
* if (channel?.isSendable()) await channel.send('Hello!');
|
|
1399
|
+
*/
|
|
1400
|
+
resolve(channelId: string): Promise<Channel>;
|
|
1283
1401
|
/**
|
|
1284
1402
|
* Fetch a channel by ID from the API (or return from cache if present).
|
|
1285
1403
|
* @param channelId - Snowflake of the channel
|
|
@@ -1296,9 +1414,9 @@ declare class ChannelManager extends Collection<string, Channel> {
|
|
|
1296
1414
|
* @param messageId - Snowflake of the message
|
|
1297
1415
|
* @returns The message
|
|
1298
1416
|
* @throws FluxerError with MESSAGE_NOT_FOUND if the message does not exist
|
|
1299
|
-
* @deprecated Use channel.messages.fetch(messageId). Prefer (await client.channels.
|
|
1417
|
+
* @deprecated Use channel.messages.fetch(messageId). Prefer (await client.channels.resolve(channelId))?.messages?.fetch(messageId).
|
|
1300
1418
|
* @example
|
|
1301
|
-
* const channel = await client.channels.
|
|
1419
|
+
* const channel = await client.channels.resolve(channelId);
|
|
1302
1420
|
* const message = await channel?.messages?.fetch(messageId);
|
|
1303
1421
|
*/
|
|
1304
1422
|
fetchMessage(channelId: string, messageId: string): Promise<Message>;
|
|
@@ -1310,7 +1428,7 @@ declare class ChannelManager extends Collection<string, Channel> {
|
|
|
1310
1428
|
* @returns The created message
|
|
1311
1429
|
* @example
|
|
1312
1430
|
* await client.channels.send(logChannelId, 'User joined!');
|
|
1313
|
-
* await client.channels.send(channelId, { embeds: [embed
|
|
1431
|
+
* await client.channels.send(channelId, { embeds: [embed] });
|
|
1314
1432
|
* await client.channels.send(channelId, { content: 'Report', files: [{ name: 'log.txt', data }] });
|
|
1315
1433
|
*/
|
|
1316
1434
|
send(channelId: string, payload: MessageSendOptions): Promise<Message>;
|
|
@@ -1322,7 +1440,19 @@ declare class ChannelManager extends Collection<string, Channel> {
|
|
|
1322
1440
|
*/
|
|
1323
1441
|
declare class GuildManager extends Collection<string, Guild> {
|
|
1324
1442
|
private readonly client;
|
|
1443
|
+
private readonly maxSize;
|
|
1325
1444
|
constructor(client: Client);
|
|
1445
|
+
set(key: string, value: Guild): this;
|
|
1446
|
+
/**
|
|
1447
|
+
* Get a guild from cache or fetch from the API if not present.
|
|
1448
|
+
* Convenience helper to avoid repeating `client.guilds.get(id) ?? (await client.guilds.fetch(id))`.
|
|
1449
|
+
* @param guildId - Snowflake of the guild
|
|
1450
|
+
* @returns The guild, or null if not found
|
|
1451
|
+
* @example
|
|
1452
|
+
* const guild = await client.guilds.resolve(message.guildId);
|
|
1453
|
+
* if (guild) console.log(guild.name);
|
|
1454
|
+
*/
|
|
1455
|
+
resolve(guildId: string): Promise<Guild | null>;
|
|
1326
1456
|
/**
|
|
1327
1457
|
* Create a guild. POST /guilds.
|
|
1328
1458
|
* @param options - name (required), icon (base64), empty_features
|
|
@@ -1344,9 +1474,20 @@ declare class GuildManager extends Collection<string, Guild> {
|
|
|
1344
1474
|
fetch(guildId: string): Promise<Guild | null>;
|
|
1345
1475
|
}
|
|
1346
1476
|
|
|
1477
|
+
/** Optional cache size limits. When exceeded, oldest entries are evicted (FIFO). Omit or use 0 for unbounded. */
|
|
1478
|
+
interface CacheSizeLimits {
|
|
1479
|
+
channels?: number;
|
|
1480
|
+
guilds?: number;
|
|
1481
|
+
users?: number;
|
|
1482
|
+
}
|
|
1347
1483
|
interface ClientOptions {
|
|
1348
1484
|
rest?: Partial<ConstructorParameters<typeof REST>[0]>;
|
|
1485
|
+
/** Gateway intents. Not yet supported by Fluxer—value is always sent as 0. Set suppressIntentWarning to silence the warning. */
|
|
1349
1486
|
intents?: number;
|
|
1487
|
+
/** Suppress the warning when intents are set (Fluxer does not support intents yet). */
|
|
1488
|
+
suppressIntentWarning?: boolean;
|
|
1489
|
+
/** Cache size limits (channels, guilds, users). When exceeded, oldest entries are evicted. Omit or 0 = unbounded. */
|
|
1490
|
+
cache?: CacheSizeLimits;
|
|
1350
1491
|
/** Initial presence (status, custom_status, etc.) sent on identify. Can also update via PresenceUpdate after connect. */
|
|
1351
1492
|
presence?: GatewayPresenceUpdateData;
|
|
1352
1493
|
/** Optional WebSocket constructor (e.g. `require('ws')` in Node for compatibility) */
|
|
@@ -1446,7 +1587,9 @@ interface FetchedUserWithProfile {
|
|
|
1446
1587
|
*/
|
|
1447
1588
|
declare class UsersManager extends Collection<string, User> {
|
|
1448
1589
|
private readonly client;
|
|
1590
|
+
private readonly maxSize;
|
|
1449
1591
|
constructor(client: Client);
|
|
1592
|
+
set(key: string, value: User): this;
|
|
1450
1593
|
/**
|
|
1451
1594
|
* Fetch a user by ID from the API.
|
|
1452
1595
|
* Updates cache if user already exists.
|
|
@@ -1477,6 +1620,17 @@ declare class UsersManager extends Collection<string, User> {
|
|
|
1477
1620
|
}): Promise<FetchedUserWithProfile>;
|
|
1478
1621
|
}
|
|
1479
1622
|
|
|
1623
|
+
/** Minimal message data for MessageDelete when the full message is not available. */
|
|
1624
|
+
interface PartialMessage {
|
|
1625
|
+
id: string;
|
|
1626
|
+
channelId: string;
|
|
1627
|
+
channel?: Channel | null;
|
|
1628
|
+
/** Message content, when provided by the gateway (e.g. Fluxer). */
|
|
1629
|
+
content?: string | null;
|
|
1630
|
+
/** Author user ID, when provided by the gateway (e.g. Fluxer). */
|
|
1631
|
+
authorId?: string | null;
|
|
1632
|
+
}
|
|
1633
|
+
|
|
1480
1634
|
/**
|
|
1481
1635
|
* Callback parameter types for client events. Use with client.on(Events.X, handler).
|
|
1482
1636
|
* @see Events
|
|
@@ -1484,10 +1638,7 @@ declare class UsersManager extends Collection<string, User> {
|
|
|
1484
1638
|
interface ClientEvents {
|
|
1485
1639
|
[Events.Ready]: [];
|
|
1486
1640
|
[Events.MessageCreate]: [message: Message];
|
|
1487
|
-
[Events.MessageUpdate]: [
|
|
1488
|
-
oldMessage: Message | null,
|
|
1489
|
-
newMessage: Message
|
|
1490
|
-
];
|
|
1641
|
+
[Events.MessageUpdate]: [oldMessage: Message | null, newMessage: Message];
|
|
1491
1642
|
[Events.MessageDelete]: [message: PartialMessage];
|
|
1492
1643
|
[Events.MessageReactionAdd]: [
|
|
1493
1644
|
reaction: MessageReaction,
|
|
@@ -1507,9 +1658,7 @@ interface ClientEvents {
|
|
|
1507
1658
|
];
|
|
1508
1659
|
[Events.MessageReactionRemoveAll]: [data: GatewayMessageReactionRemoveAllDispatchData];
|
|
1509
1660
|
[Events.MessageReactionRemoveEmoji]: [data: GatewayMessageReactionRemoveEmojiDispatchData];
|
|
1510
|
-
[Events.InteractionCreate]: [
|
|
1511
|
-
interaction: _fluxerjs_types.APIApplicationCommandInteraction
|
|
1512
|
-
];
|
|
1661
|
+
[Events.InteractionCreate]: [interaction: APIApplicationCommandInteraction];
|
|
1513
1662
|
[Events.GuildCreate]: [guild: Guild];
|
|
1514
1663
|
[Events.GuildUpdate]: [oldGuild: Guild, newGuild: Guild];
|
|
1515
1664
|
[Events.GuildDelete]: [guild: Guild];
|
|
@@ -1517,10 +1666,7 @@ interface ClientEvents {
|
|
|
1517
1666
|
[Events.ChannelUpdate]: [oldChannel: Channel, newChannel: Channel];
|
|
1518
1667
|
[Events.ChannelDelete]: [channel: Channel];
|
|
1519
1668
|
[Events.GuildMemberAdd]: [member: GuildMember];
|
|
1520
|
-
[Events.GuildMemberUpdate]: [
|
|
1521
|
-
oldMember: GuildMember,
|
|
1522
|
-
newMember: GuildMember
|
|
1523
|
-
];
|
|
1669
|
+
[Events.GuildMemberUpdate]: [oldMember: GuildMember, newMember: GuildMember];
|
|
1524
1670
|
[Events.GuildMemberRemove]: [member: GuildMember];
|
|
1525
1671
|
[Events.VoiceStateUpdate]: [data: GatewayVoiceStateUpdateDispatchData];
|
|
1526
1672
|
[Events.VoiceServerUpdate]: [data: GatewayVoiceServerUpdateDispatchData];
|
|
@@ -1533,25 +1679,23 @@ interface ClientEvents {
|
|
|
1533
1679
|
}>;
|
|
1534
1680
|
}
|
|
1535
1681
|
];
|
|
1536
|
-
[Events.MessageDeleteBulk]: [
|
|
1537
|
-
data: _fluxerjs_types.GatewayMessageDeleteBulkDispatchData
|
|
1538
|
-
];
|
|
1682
|
+
[Events.MessageDeleteBulk]: [data: GatewayMessageDeleteBulkDispatchData];
|
|
1539
1683
|
[Events.GuildBanAdd]: [ban: GuildBan];
|
|
1540
1684
|
[Events.GuildBanRemove]: [ban: GuildBan];
|
|
1541
1685
|
[Events.GuildEmojisUpdate]: [data: GatewayGuildEmojisUpdateDispatchData];
|
|
1542
1686
|
[Events.GuildStickersUpdate]: [data: GatewayGuildStickersUpdateDispatchData];
|
|
1543
1687
|
[Events.GuildIntegrationsUpdate]: [data: GatewayGuildIntegrationsUpdateDispatchData];
|
|
1544
|
-
[Events.GuildRoleCreate]: [data:
|
|
1545
|
-
[Events.GuildRoleUpdate]: [data:
|
|
1546
|
-
[Events.GuildRoleDelete]: [data:
|
|
1688
|
+
[Events.GuildRoleCreate]: [data: GatewayGuildRoleCreateDispatchData];
|
|
1689
|
+
[Events.GuildRoleUpdate]: [data: GatewayGuildRoleUpdateDispatchData];
|
|
1690
|
+
[Events.GuildRoleDelete]: [data: GatewayGuildRoleDeleteDispatchData];
|
|
1547
1691
|
[Events.GuildScheduledEventCreate]: [data: GatewayGuildScheduledEventCreateDispatchData];
|
|
1548
1692
|
[Events.GuildScheduledEventUpdate]: [data: GatewayGuildScheduledEventUpdateDispatchData];
|
|
1549
1693
|
[Events.GuildScheduledEventDelete]: [data: GatewayGuildScheduledEventDeleteDispatchData];
|
|
1550
1694
|
[Events.ChannelPinsUpdate]: [data: GatewayChannelPinsUpdateDispatchData];
|
|
1551
1695
|
[Events.InviteCreate]: [invite: Invite];
|
|
1552
|
-
[Events.InviteDelete]: [data:
|
|
1553
|
-
[Events.TypingStart]: [data:
|
|
1554
|
-
[Events.UserUpdate]: [data:
|
|
1696
|
+
[Events.InviteDelete]: [data: GatewayInviteDeleteDispatchData];
|
|
1697
|
+
[Events.TypingStart]: [data: GatewayTypingStartDispatchData];
|
|
1698
|
+
[Events.UserUpdate]: [data: GatewayUserUpdateDispatchData];
|
|
1555
1699
|
[Events.PresenceUpdate]: [data: GatewayPresenceUpdateDispatchData];
|
|
1556
1700
|
[Events.WebhooksUpdate]: [data: GatewayWebhooksUpdateDispatchData];
|
|
1557
1701
|
[Events.Resumed]: [];
|
|
@@ -1609,9 +1753,9 @@ declare class Client extends EventEmitter {
|
|
|
1609
1753
|
* @param messageId - Snowflake of the message
|
|
1610
1754
|
* @returns The message
|
|
1611
1755
|
* @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.
|
|
1756
|
+
* @deprecated Use channel.messages.fetch(messageId). For IDs-only: (await client.channels.resolve(channelId))?.messages?.fetch(messageId)
|
|
1613
1757
|
* @example
|
|
1614
|
-
* const channel = await client.channels.
|
|
1758
|
+
* const channel = await client.channels.resolve(channelId);
|
|
1615
1759
|
* const message = await channel?.messages?.fetch(messageId);
|
|
1616
1760
|
*/
|
|
1617
1761
|
fetchMessage(channelId: string, messageId: string): Promise<Message>;
|
|
@@ -1621,7 +1765,7 @@ declare class Client extends EventEmitter {
|
|
|
1621
1765
|
*/
|
|
1622
1766
|
sendToChannel(channelId: string, payload: string | {
|
|
1623
1767
|
content?: string;
|
|
1624
|
-
embeds?:
|
|
1768
|
+
embeds?: APIEmbed[];
|
|
1625
1769
|
}): Promise<Message>;
|
|
1626
1770
|
/**
|
|
1627
1771
|
* Get or create a User from API data. Caches in client.users.
|
|
@@ -1648,6 +1792,13 @@ declare class Client extends EventEmitter {
|
|
|
1648
1792
|
isReady(): this is Client & {
|
|
1649
1793
|
user: NonNullable<Client['user']>;
|
|
1650
1794
|
};
|
|
1795
|
+
/**
|
|
1796
|
+
* Throws if the client is not ready. Use before accessing client.user or other post-ready state.
|
|
1797
|
+
* @throws FluxerError with CLIENT_NOT_READY if client has not received Ready yet
|
|
1798
|
+
*/
|
|
1799
|
+
assertReady(): asserts this is Client & {
|
|
1800
|
+
user: NonNullable<Client['user']>;
|
|
1801
|
+
};
|
|
1651
1802
|
static get Routes(): typeof Routes;
|
|
1652
1803
|
}
|
|
1653
1804
|
|
|
@@ -1670,6 +1821,7 @@ declare const ErrorCodes: {
|
|
|
1670
1821
|
readonly MemberNotFound: "MEMBER_NOT_FOUND";
|
|
1671
1822
|
readonly RoleNotFound: "ROLE_NOT_FOUND";
|
|
1672
1823
|
readonly EmojiNotInGuild: "EMOJI_NOT_IN_GUILD";
|
|
1824
|
+
readonly EmojiNotFound: "EMOJI_NOT_FOUND";
|
|
1673
1825
|
};
|
|
1674
1826
|
|
|
1675
1827
|
/** User Content CDN (avatars, icons, banners, emojis, attachments). */
|
|
@@ -1739,4 +1891,4 @@ declare function cdnMemberBannerURL(guildId: string, userId: string, bannerHash:
|
|
|
1739
1891
|
*/
|
|
1740
1892
|
declare function cdnDefaultAvatarURL(userIdOrIndex: string | number): string;
|
|
1741
1893
|
|
|
1742
|
-
export { Base, CDN_URL, CategoryChannel, type CdnUrlOptions, Channel, ChannelManager, Client, type ClientEventMethods, type ClientEvents, ClientUser, type CollectedReaction, DMChannel, ErrorCodes, Events, type FetchedUserWithProfile, FluxerError, type FluxerErrorOptions, Guild, GuildBan, GuildChannel, GuildEmoji, GuildMember, GuildMemberManager, GuildSticker, Invite, LinkChannel, Message, MessageCollector, type MessageCollectorEndReason, type MessageCollectorOptions, type MessageEditOptions, MessageManager, MessageReaction, type MessageSendOptions, type PartialMessage, ReactionCollector, type ReactionCollectorEndReason, type ReactionCollectorOptions, Role, STATIC_CDN_URL, TextChannel, User, UsersManager, VoiceChannel, Webhook, type WebhookSendOptions, cdnAvatarURL, cdnBannerURL, cdnDefaultAvatarURL, cdnDisplayAvatarURL, cdnMemberAvatarURL, cdnMemberBannerURL };
|
|
1894
|
+
export { Base, CDN_URL, CategoryChannel, type CdnUrlOptions, Channel, ChannelManager, Client, type ClientEventMethods, type ClientEvents, ClientUser, type CollectedReaction, DMChannel, ErrorCodes, Events, type FetchedUserWithProfile, FluxerError, type FluxerErrorOptions, Guild, GuildBan, GuildChannel, GuildEmoji, GuildMember, GuildMemberManager, GuildMemberRoleManager, GuildSticker, Invite, LinkChannel, Message, MessageCollector, type MessageCollectorEndReason, type MessageCollectorOptions, type MessageEditOptions, MessageManager, MessageReaction, type MessageSendOptions, type PartialMessage, ReactionCollector, type ReactionCollectorEndReason, type ReactionCollectorOptions, Role, type RoleResolvable, STATIC_CDN_URL, TextChannel, User, UsersManager, VoiceChannel, Webhook, type WebhookSendOptions, cdnAvatarURL, cdnBannerURL, cdnDefaultAvatarURL, cdnDisplayAvatarURL, cdnMemberAvatarURL, cdnMemberBannerURL };
|