@fluxerjs/core 1.0.7 → 1.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (117) hide show
  1. package/dist/{Channel-OSOB6ELO.mjs → Channel-ICWNKXBR.mjs} +1 -1
  2. package/dist/{ClientUser-RNDKHQ3Z.mjs → ClientUser-WWXUMO5O.mjs} +1 -2
  3. package/dist/{Guild-GOQZ7XP4.mjs → Guild-TM6YGJWB.mjs} +3 -1
  4. package/dist/GuildBan-M4PA3HAA.mjs +7 -0
  5. package/dist/{GuildMember-BJJNCL6W.mjs → GuildMember-RZWZ3OCG.mjs} +1 -2
  6. package/dist/{Webhook-AG6QFM2I.mjs → Invite-UM5BU5A6.mjs} +3 -3
  7. package/dist/{Message-QXPHQOVC.mjs → Message-6IYEYSV6.mjs} +1 -2
  8. package/dist/MessageReaction-XRPYZDSC.mjs +7 -0
  9. package/dist/{Webhook-NUQCJAWZ.mjs → Role-SVLWIAMN.mjs} +3 -3
  10. package/dist/{Webhook-2RHBXH7R.mjs → Webhook-32VJD4AL.mjs} +1 -1
  11. package/dist/{chunk-T2NSVWBH.mjs → chunk-53Y37KRG.mjs} +35 -1
  12. package/dist/chunk-DSPSRPHF.mjs +200 -0
  13. package/dist/{chunk-WYSHH4LR.mjs → chunk-FJS5FBXO.mjs} +98 -6
  14. package/dist/{chunk-J3EIGOXQ.mjs → chunk-GCIJYVRC.mjs} +20 -6
  15. package/dist/{chunk-NISGA2YZ.mjs → chunk-GFUJVQ7L.mjs} +13 -4
  16. package/dist/chunk-HBF5QEDH.mjs +42 -0
  17. package/dist/chunk-QEXIYXXU.mjs +62 -0
  18. package/dist/chunk-RCP27MRC.mjs +33 -0
  19. package/dist/chunk-SQVCCSNN.mjs +41 -0
  20. package/dist/chunk-X77DFNE3.mjs +136 -0
  21. package/dist/index.d.mts +520 -55
  22. package/dist/index.d.ts +520 -55
  23. package/dist/index.js +1333 -404
  24. package/dist/index.mjs +616 -189
  25. package/package.json +27 -8
  26. package/dist/Channel-2WNJ445K.mjs +0 -17
  27. package/dist/Channel-BEZOW4VC.mjs +0 -17
  28. package/dist/Channel-DPLLHL7Y.mjs +0 -19
  29. package/dist/Channel-HM2UY4DN.mjs +0 -17
  30. package/dist/Channel-IKL3SJXN.mjs +0 -17
  31. package/dist/Channel-KILNV5V3.mjs +0 -17
  32. package/dist/Channel-KOTARBSF.mjs +0 -17
  33. package/dist/Channel-ON7O3D3M.mjs +0 -17
  34. package/dist/Channel-TOAQGSRX.mjs +0 -17
  35. package/dist/Channel-VENHOL7S.mjs +0 -17
  36. package/dist/Channel-YVGPVOVB.mjs +0 -17
  37. package/dist/ClientUser-6HBAPU6H.mjs +0 -8
  38. package/dist/ClientUser-ALGC4FNY.mjs +0 -8
  39. package/dist/ClientUser-J6HQVSDJ.mjs +0 -9
  40. package/dist/ClientUser-LLL6WX35.mjs +0 -8
  41. package/dist/ClientUser-N7ZXYAQ3.mjs +0 -8
  42. package/dist/Guild-36EGAAEW.mjs +0 -8
  43. package/dist/Guild-5UBZNIGD.mjs +0 -9
  44. package/dist/Guild-CA3W6DOD.mjs +0 -8
  45. package/dist/Guild-GIXJJBFM.mjs +0 -9
  46. package/dist/Guild-NHNQ5TIA.mjs +0 -8
  47. package/dist/Guild-S436SLOP.mjs +0 -9
  48. package/dist/Guild-WAFXK2EX.mjs +0 -9
  49. package/dist/Guild-XPOMHZZG.mjs +0 -9
  50. package/dist/Guild-ZOFF5LFR.mjs +0 -8
  51. package/dist/GuildMember-FX2JAWES.mjs +0 -8
  52. package/dist/GuildMember-K5FLBNHV.mjs +0 -8
  53. package/dist/GuildMember-RGVPVUAG.mjs +0 -9
  54. package/dist/GuildMember-UBNHZBCO.mjs +0 -8
  55. package/dist/GuildMember-UU26WJGN.mjs +0 -8
  56. package/dist/GuildMember-XF7K2R45.mjs +0 -9
  57. package/dist/Message-23Z3RPCZ.mjs +0 -9
  58. package/dist/Message-33APPS76.mjs +0 -9
  59. package/dist/Message-6RSAGIRP.mjs +0 -8
  60. package/dist/Message-OXTQHFCF.mjs +0 -8
  61. package/dist/Message-PZUU7ZFR.mjs +0 -9
  62. package/dist/Message-R7GZYIQQ.mjs +0 -8
  63. package/dist/Message-W624MHJF.mjs +0 -8
  64. package/dist/Message-XB5WNMHL.mjs +0 -9
  65. package/dist/Message-ZCS7IGJX.mjs +0 -8
  66. package/dist/Webhook-TGAZZRQQ.mjs +0 -7
  67. package/dist/chunk-2FIZRRSO.mjs +0 -88
  68. package/dist/chunk-3CNUPFDI.mjs +0 -59
  69. package/dist/chunk-4DBGMFOQ.mjs +0 -14
  70. package/dist/chunk-5HQRX3KJ.mjs +0 -70
  71. package/dist/chunk-62S4AB2S.mjs +0 -54
  72. package/dist/chunk-6CEMF2LO.mjs +0 -14
  73. package/dist/chunk-6EBNOON4.mjs +0 -86
  74. package/dist/chunk-72OY7B3D.mjs +0 -72
  75. package/dist/chunk-7FYM4D2E.mjs +0 -50
  76. package/dist/chunk-7GZN6JXT.mjs +0 -50
  77. package/dist/chunk-7H3TKJUT.mjs +0 -53
  78. package/dist/chunk-7SIS5CUA.mjs +0 -14
  79. package/dist/chunk-BGJSL6JI.mjs +0 -14
  80. package/dist/chunk-BUEXP5SZ.mjs +0 -70
  81. package/dist/chunk-BYTAODAO.mjs +0 -70
  82. package/dist/chunk-CQ5ZVTLX.mjs +0 -71
  83. package/dist/chunk-DJBCSVZX.mjs +0 -102
  84. package/dist/chunk-DLROMCIJ.mjs +0 -50
  85. package/dist/chunk-DPZHAYCK.mjs +0 -71
  86. package/dist/chunk-E75ZVY3I.mjs +0 -14
  87. package/dist/chunk-EF32ILJL.mjs +0 -102
  88. package/dist/chunk-F2EEQP5O.mjs +0 -86
  89. package/dist/chunk-FK5X6HFL.mjs +0 -111
  90. package/dist/chunk-FNFID6QB.mjs +0 -45
  91. package/dist/chunk-G4L7WAJS.mjs +0 -64
  92. package/dist/chunk-GUNWHOQO.mjs +0 -42
  93. package/dist/chunk-IPHFDI2L.mjs +0 -68
  94. package/dist/chunk-JJHZBWZM.mjs +0 -118
  95. package/dist/chunk-L25ON7WB.mjs +0 -52
  96. package/dist/chunk-LBBIQOSH.mjs +0 -53
  97. package/dist/chunk-LVMFPATK.mjs +0 -54
  98. package/dist/chunk-NOLYW3V4.mjs +0 -140
  99. package/dist/chunk-OHIHIQAS.mjs +0 -102
  100. package/dist/chunk-P4IRDGB4.mjs +0 -43
  101. package/dist/chunk-PO5JZQVN.mjs +0 -111
  102. package/dist/chunk-PYYXC7US.mjs +0 -76
  103. package/dist/chunk-QDCFQF6J.mjs +0 -36
  104. package/dist/chunk-QDNFJVVE.mjs +0 -70
  105. package/dist/chunk-QXJNV5EJ.mjs +0 -110
  106. package/dist/chunk-RXHJYGSJ.mjs +0 -53
  107. package/dist/chunk-SW6KNICI.mjs +0 -52
  108. package/dist/chunk-TE5IC7IP.mjs +0 -36
  109. package/dist/chunk-TMDZALIN.mjs +0 -110
  110. package/dist/chunk-WFONGZGK.mjs +0 -42
  111. package/dist/chunk-WZVY7DA6.mjs +0 -44
  112. package/dist/chunk-XTDZQD4A.mjs +0 -110
  113. package/dist/chunk-XXCBJJZE.mjs +0 -88
  114. package/dist/chunk-YKP7JHV2.mjs +0 -102
  115. package/dist/chunk-YSKZR66G.mjs +0 -102
  116. package/dist/chunk-ZHRQQZ4X.mjs +0 -102
  117. package/dist/chunk-ZMIMAMO2.mjs +0 -14
package/package.json CHANGED
@@ -3,8 +3,23 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "1.0.7",
6
+ "version": "1.0.9",
7
7
  "description": "A fully-featured SDK for Fluxer bots",
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "https://github.com/fluxerjs/core.git",
11
+ "directory": "packages/fluxer-core"
12
+ },
13
+ "bugs": "https://github.com/fluxerjs/core/issues",
14
+ "homepage": "https://fluxerjs.blstmo.com",
15
+ "keywords": [
16
+ "fluxer",
17
+ "discord",
18
+ "sdk",
19
+ "bot",
20
+ "api"
21
+ ],
22
+ "license": "AGPL-3.0",
8
23
  "main": "./dist/index.js",
9
24
  "module": "./dist/index.mjs",
10
25
  "types": "./dist/index.d.ts",
@@ -19,12 +34,12 @@
19
34
  "dist"
20
35
  ],
21
36
  "dependencies": {
22
- "@fluxerjs/rest": "1.0.7",
23
- "@fluxerjs/builders": "1.0.7",
24
- "@fluxerjs/collection": "1.0.7",
25
- "@fluxerjs/util": "1.0.7",
26
- "@fluxerjs/ws": "1.0.7",
27
- "@fluxerjs/types": "1.0.7"
37
+ "@fluxerjs/rest": "1.0.9",
38
+ "@fluxerjs/builders": "1.0.9",
39
+ "@fluxerjs/ws": "1.0.9",
40
+ "@fluxerjs/collection": "1.0.9",
41
+ "@fluxerjs/types": "1.0.9",
42
+ "@fluxerjs/util": "1.0.9"
28
43
  },
29
44
  "devDependencies": {
30
45
  "@types/node": "^20.0.0",
@@ -36,6 +51,10 @@
36
51
  },
37
52
  "scripts": {
38
53
  "build": "tsup src/index.ts --format cjs,esm --dts",
39
- "clean": "rm -rf dist"
54
+ "clean": "rm -rf dist",
55
+ "lint": "eslint src --max-warnings 0 --config ../../eslint.config.js",
56
+ "lint:fix": "eslint src --fix --config ../../eslint.config.js",
57
+ "test": "vitest run --passWithNoTests",
58
+ "test:coverage": "vitest run --coverage --passWithNoTests"
40
59
  }
41
60
  }
@@ -1,17 +0,0 @@
1
- import {
2
- CategoryChannel,
3
- Channel,
4
- GuildChannel,
5
- LinkChannel,
6
- TextChannel,
7
- VoiceChannel
8
- } from "./chunk-ZHRQQZ4X.mjs";
9
- import "./chunk-XNS4O6QJ.mjs";
10
- export {
11
- CategoryChannel,
12
- Channel,
13
- GuildChannel,
14
- LinkChannel,
15
- TextChannel,
16
- VoiceChannel
17
- };
@@ -1,17 +0,0 @@
1
- import {
2
- CategoryChannel,
3
- Channel,
4
- GuildChannel,
5
- LinkChannel,
6
- TextChannel,
7
- VoiceChannel
8
- } from "./chunk-YKP7JHV2.mjs";
9
- import "./chunk-XNS4O6QJ.mjs";
10
- export {
11
- CategoryChannel,
12
- Channel,
13
- GuildChannel,
14
- LinkChannel,
15
- TextChannel,
16
- VoiceChannel
17
- };
@@ -1,19 +0,0 @@
1
- import {
2
- CategoryChannel,
3
- Channel,
4
- DMChannel,
5
- GuildChannel,
6
- LinkChannel,
7
- TextChannel,
8
- VoiceChannel
9
- } from "./chunk-NOLYW3V4.mjs";
10
- import "./chunk-XNS4O6QJ.mjs";
11
- export {
12
- CategoryChannel,
13
- Channel,
14
- DMChannel,
15
- GuildChannel,
16
- LinkChannel,
17
- TextChannel,
18
- VoiceChannel
19
- };
@@ -1,17 +0,0 @@
1
- import {
2
- CategoryChannel,
3
- Channel,
4
- GuildChannel,
5
- LinkChannel,
6
- TextChannel,
7
- VoiceChannel
8
- } from "./chunk-6EBNOON4.mjs";
9
- import "./chunk-XNS4O6QJ.mjs";
10
- export {
11
- CategoryChannel,
12
- Channel,
13
- GuildChannel,
14
- LinkChannel,
15
- TextChannel,
16
- VoiceChannel
17
- };
@@ -1,17 +0,0 @@
1
- import {
2
- CategoryChannel,
3
- Channel,
4
- GuildChannel,
5
- LinkChannel,
6
- TextChannel,
7
- VoiceChannel
8
- } from "./chunk-OHIHIQAS.mjs";
9
- import "./chunk-XNS4O6QJ.mjs";
10
- export {
11
- CategoryChannel,
12
- Channel,
13
- GuildChannel,
14
- LinkChannel,
15
- TextChannel,
16
- VoiceChannel
17
- };
@@ -1,17 +0,0 @@
1
- import {
2
- CategoryChannel,
3
- Channel,
4
- GuildChannel,
5
- LinkChannel,
6
- TextChannel,
7
- VoiceChannel
8
- } from "./chunk-XXCBJJZE.mjs";
9
- import "./chunk-XNS4O6QJ.mjs";
10
- export {
11
- CategoryChannel,
12
- Channel,
13
- GuildChannel,
14
- LinkChannel,
15
- TextChannel,
16
- VoiceChannel
17
- };
@@ -1,17 +0,0 @@
1
- import {
2
- CategoryChannel,
3
- Channel,
4
- GuildChannel,
5
- LinkChannel,
6
- TextChannel,
7
- VoiceChannel
8
- } from "./chunk-DJBCSVZX.mjs";
9
- import "./chunk-XNS4O6QJ.mjs";
10
- export {
11
- CategoryChannel,
12
- Channel,
13
- GuildChannel,
14
- LinkChannel,
15
- TextChannel,
16
- VoiceChannel
17
- };
@@ -1,17 +0,0 @@
1
- import {
2
- CategoryChannel,
3
- Channel,
4
- GuildChannel,
5
- LinkChannel,
6
- TextChannel,
7
- VoiceChannel
8
- } from "./chunk-JJHZBWZM.mjs";
9
- import "./chunk-XNS4O6QJ.mjs";
10
- export {
11
- CategoryChannel,
12
- Channel,
13
- GuildChannel,
14
- LinkChannel,
15
- TextChannel,
16
- VoiceChannel
17
- };
@@ -1,17 +0,0 @@
1
- import {
2
- CategoryChannel,
3
- Channel,
4
- GuildChannel,
5
- LinkChannel,
6
- TextChannel,
7
- VoiceChannel
8
- } from "./chunk-F2EEQP5O.mjs";
9
- import "./chunk-XNS4O6QJ.mjs";
10
- export {
11
- CategoryChannel,
12
- Channel,
13
- GuildChannel,
14
- LinkChannel,
15
- TextChannel,
16
- VoiceChannel
17
- };
@@ -1,17 +0,0 @@
1
- import {
2
- CategoryChannel,
3
- Channel,
4
- GuildChannel,
5
- LinkChannel,
6
- TextChannel,
7
- VoiceChannel
8
- } from "./chunk-EF32ILJL.mjs";
9
- import "./chunk-XNS4O6QJ.mjs";
10
- export {
11
- CategoryChannel,
12
- Channel,
13
- GuildChannel,
14
- LinkChannel,
15
- TextChannel,
16
- VoiceChannel
17
- };
@@ -1,17 +0,0 @@
1
- import {
2
- CategoryChannel,
3
- Channel,
4
- GuildChannel,
5
- LinkChannel,
6
- TextChannel,
7
- VoiceChannel
8
- } from "./chunk-YSKZR66G.mjs";
9
- import "./chunk-XNS4O6QJ.mjs";
10
- export {
11
- CategoryChannel,
12
- Channel,
13
- GuildChannel,
14
- LinkChannel,
15
- TextChannel,
16
- VoiceChannel
17
- };
@@ -1,8 +0,0 @@
1
- import {
2
- ClientUser
3
- } from "./chunk-BGJSL6JI.mjs";
4
- import "./chunk-J3EIGOXQ.mjs";
5
- import "./chunk-XNS4O6QJ.mjs";
6
- export {
7
- ClientUser
8
- };
@@ -1,8 +0,0 @@
1
- import {
2
- ClientUser
3
- } from "./chunk-E75ZVY3I.mjs";
4
- import "./chunk-CQ5ZVTLX.mjs";
5
- import "./chunk-XNS4O6QJ.mjs";
6
- export {
7
- ClientUser
8
- };
@@ -1,9 +0,0 @@
1
- import {
2
- ClientUser
3
- } from "./chunk-4DBGMFOQ.mjs";
4
- import "./chunk-SW6KNICI.mjs";
5
- import "./chunk-HQMYRYMY.mjs";
6
- import "./chunk-XNS4O6QJ.mjs";
7
- export {
8
- ClientUser
9
- };
@@ -1,8 +0,0 @@
1
- import {
2
- ClientUser
3
- } from "./chunk-ZMIMAMO2.mjs";
4
- import "./chunk-DLROMCIJ.mjs";
5
- import "./chunk-XNS4O6QJ.mjs";
6
- export {
7
- ClientUser
8
- };
@@ -1,8 +0,0 @@
1
- import {
2
- ClientUser
3
- } from "./chunk-7SIS5CUA.mjs";
4
- import "./chunk-WZVY7DA6.mjs";
5
- import "./chunk-XNS4O6QJ.mjs";
6
- export {
7
- ClientUser
8
- };
@@ -1,8 +0,0 @@
1
- import {
2
- Guild
3
- } from "./chunk-WFONGZGK.mjs";
4
- import "./chunk-HQMYRYMY.mjs";
5
- import "./chunk-XNS4O6QJ.mjs";
6
- export {
7
- Guild
8
- };
@@ -1,9 +0,0 @@
1
- import {
2
- Guild
3
- } from "./chunk-G4L7WAJS.mjs";
4
- import "./chunk-FNFID6QB.mjs";
5
- import "./chunk-WZVY7DA6.mjs";
6
- import "./chunk-XNS4O6QJ.mjs";
7
- export {
8
- Guild
9
- };
@@ -1,8 +0,0 @@
1
- import {
2
- Guild
3
- } from "./chunk-7FYM4D2E.mjs";
4
- import "./chunk-HQMYRYMY.mjs";
5
- import "./chunk-XNS4O6QJ.mjs";
6
- export {
7
- Guild
8
- };
@@ -1,9 +0,0 @@
1
- import {
2
- Guild
3
- } from "./chunk-DPZHAYCK.mjs";
4
- import "./chunk-NISGA2YZ.mjs";
5
- import "./chunk-J3EIGOXQ.mjs";
6
- import "./chunk-XNS4O6QJ.mjs";
7
- export {
8
- Guild
9
- };
@@ -1,8 +0,0 @@
1
- import {
2
- Guild
3
- } from "./chunk-7GZN6JXT.mjs";
4
- import "./chunk-HQMYRYMY.mjs";
5
- import "./chunk-XNS4O6QJ.mjs";
6
- export {
7
- Guild
8
- };
@@ -1,9 +0,0 @@
1
- import {
2
- Guild
3
- } from "./chunk-BYTAODAO.mjs";
4
- import "./chunk-LVMFPATK.mjs";
5
- import "./chunk-DLROMCIJ.mjs";
6
- import "./chunk-XNS4O6QJ.mjs";
7
- export {
8
- Guild
9
- };
@@ -1,9 +0,0 @@
1
- import {
2
- Guild
3
- } from "./chunk-IPHFDI2L.mjs";
4
- import "./chunk-RXHJYGSJ.mjs";
5
- import "./chunk-WZVY7DA6.mjs";
6
- import "./chunk-XNS4O6QJ.mjs";
7
- export {
8
- Guild
9
- };
@@ -1,9 +0,0 @@
1
- import {
2
- Guild
3
- } from "./chunk-5HQRX3KJ.mjs";
4
- import "./chunk-62S4AB2S.mjs";
5
- import "./chunk-CQ5ZVTLX.mjs";
6
- import "./chunk-XNS4O6QJ.mjs";
7
- export {
8
- Guild
9
- };
@@ -1,8 +0,0 @@
1
- import {
2
- Guild
3
- } from "./chunk-L25ON7WB.mjs";
4
- import "./chunk-HQMYRYMY.mjs";
5
- import "./chunk-XNS4O6QJ.mjs";
6
- export {
7
- Guild
8
- };
@@ -1,8 +0,0 @@
1
- import {
2
- GuildMember
3
- } from "./chunk-LVMFPATK.mjs";
4
- import "./chunk-DLROMCIJ.mjs";
5
- import "./chunk-XNS4O6QJ.mjs";
6
- export {
7
- GuildMember
8
- };
@@ -1,8 +0,0 @@
1
- import {
2
- GuildMember
3
- } from "./chunk-FNFID6QB.mjs";
4
- import "./chunk-WZVY7DA6.mjs";
5
- import "./chunk-XNS4O6QJ.mjs";
6
- export {
7
- GuildMember
8
- };
@@ -1,9 +0,0 @@
1
- import {
2
- GuildMember
3
- } from "./chunk-TE5IC7IP.mjs";
4
- import "./chunk-P4IRDGB4.mjs";
5
- import "./chunk-HQMYRYMY.mjs";
6
- import "./chunk-XNS4O6QJ.mjs";
7
- export {
8
- GuildMember
9
- };
@@ -1,8 +0,0 @@
1
- import {
2
- GuildMember
3
- } from "./chunk-RXHJYGSJ.mjs";
4
- import "./chunk-WZVY7DA6.mjs";
5
- import "./chunk-XNS4O6QJ.mjs";
6
- export {
7
- GuildMember
8
- };
@@ -1,8 +0,0 @@
1
- import {
2
- GuildMember
3
- } from "./chunk-NISGA2YZ.mjs";
4
- import "./chunk-J3EIGOXQ.mjs";
5
- import "./chunk-XNS4O6QJ.mjs";
6
- export {
7
- GuildMember
8
- };
@@ -1,9 +0,0 @@
1
- import {
2
- GuildMember
3
- } from "./chunk-QDCFQF6J.mjs";
4
- import "./chunk-SW6KNICI.mjs";
5
- import "./chunk-HQMYRYMY.mjs";
6
- import "./chunk-XNS4O6QJ.mjs";
7
- export {
8
- GuildMember
9
- };
@@ -1,9 +0,0 @@
1
- import {
2
- Message
3
- } from "./chunk-LBBIQOSH.mjs";
4
- import "./chunk-P4IRDGB4.mjs";
5
- import "./chunk-HQMYRYMY.mjs";
6
- import "./chunk-XNS4O6QJ.mjs";
7
- export {
8
- Message
9
- };
@@ -1,9 +0,0 @@
1
- import {
2
- Message
3
- } from "./chunk-3CNUPFDI.mjs";
4
- import "./chunk-P4IRDGB4.mjs";
5
- import "./chunk-HQMYRYMY.mjs";
6
- import "./chunk-XNS4O6QJ.mjs";
7
- export {
8
- Message
9
- };
@@ -1,8 +0,0 @@
1
- import {
2
- Message
3
- } from "./chunk-QXJNV5EJ.mjs";
4
- import "./chunk-WZVY7DA6.mjs";
5
- import "./chunk-XNS4O6QJ.mjs";
6
- export {
7
- Message
8
- };
@@ -1,8 +0,0 @@
1
- import {
2
- Message
3
- } from "./chunk-2FIZRRSO.mjs";
4
- import "./chunk-WZVY7DA6.mjs";
5
- import "./chunk-XNS4O6QJ.mjs";
6
- export {
7
- Message
8
- };
@@ -1,9 +0,0 @@
1
- import {
2
- Message
3
- } from "./chunk-72OY7B3D.mjs";
4
- import "./chunk-SW6KNICI.mjs";
5
- import "./chunk-HQMYRYMY.mjs";
6
- import "./chunk-XNS4O6QJ.mjs";
7
- export {
8
- Message
9
- };
@@ -1,8 +0,0 @@
1
- import {
2
- Message
3
- } from "./chunk-FK5X6HFL.mjs";
4
- import "./chunk-WZVY7DA6.mjs";
5
- import "./chunk-XNS4O6QJ.mjs";
6
- export {
7
- Message
8
- };
@@ -1,8 +0,0 @@
1
- import {
2
- Message
3
- } from "./chunk-PO5JZQVN.mjs";
4
- import "./chunk-J3EIGOXQ.mjs";
5
- import "./chunk-XNS4O6QJ.mjs";
6
- export {
7
- Message
8
- };
@@ -1,9 +0,0 @@
1
- import {
2
- Message
3
- } from "./chunk-7H3TKJUT.mjs";
4
- import "./chunk-P4IRDGB4.mjs";
5
- import "./chunk-HQMYRYMY.mjs";
6
- import "./chunk-XNS4O6QJ.mjs";
7
- export {
8
- Message
9
- };
@@ -1,8 +0,0 @@
1
- import {
2
- Message
3
- } from "./chunk-TMDZALIN.mjs";
4
- import "./chunk-CQ5ZVTLX.mjs";
5
- import "./chunk-XNS4O6QJ.mjs";
6
- export {
7
- Message
8
- };
@@ -1,7 +0,0 @@
1
- import {
2
- Webhook
3
- } from "./chunk-T2NSVWBH.mjs";
4
- import "./chunk-XNS4O6QJ.mjs";
5
- export {
6
- Webhook
7
- };
@@ -1,88 +0,0 @@
1
- import {
2
- User
3
- } from "./chunk-WZVY7DA6.mjs";
4
- import {
5
- Base
6
- } from "./chunk-XNS4O6QJ.mjs";
7
-
8
- // src/structures/Message.ts
9
- import { Collection } from "@fluxerjs/collection";
10
- import { Routes } from "@fluxerjs/types";
11
- import { EmbedBuilder } from "@fluxerjs/builders";
12
- var Message = class _Message extends Base {
13
- client;
14
- id;
15
- channelId;
16
- guildId;
17
- author;
18
- content;
19
- createdAt;
20
- editedAt;
21
- pinned;
22
- attachments;
23
- channel;
24
- constructor(client, data) {
25
- super();
26
- this.client = client;
27
- this.id = data.id;
28
- this.channelId = data.channel_id;
29
- this.guildId = data.guild_id ?? null;
30
- this.author = new User(client, data.author);
31
- this.content = data.content;
32
- this.createdAt = new Date(data.timestamp);
33
- this.editedAt = data.edited_timestamp ? new Date(data.edited_timestamp) : null;
34
- this.pinned = data.pinned;
35
- this.attachments = new Collection();
36
- for (const a of data.attachments ?? []) this.attachments.set(a.id, a);
37
- }
38
- async reply(options) {
39
- const body = typeof options === "string" ? { content: options, message_reference: { channel_id: this.channelId, message_id: this.id, guild_id: this.guildId ?? void 0 } } : { ...options, message_reference: { channel_id: this.channelId, message_id: this.id, guild_id: this.guildId ?? void 0 } };
40
- const data = await this.client.rest.post(Routes.channelMessages(this.channelId), { body });
41
- return new _Message(this.client, data);
42
- }
43
- async edit(options) {
44
- const body = {};
45
- if (options.content !== void 0) body.content = options.content;
46
- if (options.embeds?.length) {
47
- body.embeds = options.embeds.map((e) => e instanceof EmbedBuilder ? e.toJSON() : e);
48
- }
49
- const data = await this.client.rest.patch(Routes.channelMessage(this.channelId, this.id), { body });
50
- return new _Message(this.client, data);
51
- }
52
- async delete() {
53
- await this.client.rest.delete(Routes.channelMessage(this.channelId, this.id));
54
- }
55
- /**
56
- * Format emoji for reaction API: unicode string or "name:id" for custom.
57
- * @param emoji - Unicode emoji (e.g. "👍") or custom { name, id } or "name:id" string
58
- */
59
- static formatEmoji(emoji) {
60
- if (typeof emoji === "string") return emoji;
61
- return `${emoji.name}:${emoji.id}`;
62
- }
63
- /** Add a reaction to this message (as the bot). */
64
- async react(emoji) {
65
- const emojiStr = _Message.formatEmoji(emoji);
66
- const route = `${Routes.channelMessageReaction(this.channelId, this.id, emojiStr)}/@me`;
67
- await this.client.rest.put(route);
68
- }
69
- /** Remove the bot's reaction, or a specific user's reaction if userId is provided. */
70
- async removeReaction(emoji, userId) {
71
- const emojiStr = _Message.formatEmoji(emoji);
72
- const route = `${Routes.channelMessageReaction(this.channelId, this.id, emojiStr)}/${userId ?? "@me"}`;
73
- await this.client.rest.delete(route);
74
- }
75
- /** Remove all reactions from this message. Requires moderator permissions. */
76
- async removeAllReactions() {
77
- await this.client.rest.delete(Routes.channelMessageReactions(this.channelId, this.id));
78
- }
79
- /** Remove all reactions of a specific emoji from this message. Requires moderator permissions. */
80
- async removeReactionEmoji(emoji) {
81
- const emojiStr = _Message.formatEmoji(emoji);
82
- await this.client.rest.delete(Routes.channelMessageReaction(this.channelId, this.id, emojiStr));
83
- }
84
- };
85
-
86
- export {
87
- Message
88
- };