@fluxerjs/util 1.2.2 → 1.2.4
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 +157 -121
- package/dist/index.d.ts +157 -121
- package/dist/index.js +100 -109
- package/dist/index.mjs +100 -108
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -5,21 +5,21 @@
|
|
|
5
5
|
* Flags with values exceeding 2^30 may exhibit unexpected behavior. For permission-style
|
|
6
6
|
* bitfields with more than 30 bits, consider using BigInt-based implementations.
|
|
7
7
|
*/
|
|
8
|
-
type BitFieldResolvable<S extends string> = S | bigint | number | BitField<S> | (S | number | BitField<S>)[];
|
|
8
|
+
type BitFieldResolvable<S extends string> = S | bigint | number | BitField<S> | (S | number | bigint | BitField<S>)[];
|
|
9
9
|
declare class BitField<S extends string> {
|
|
10
|
-
static Flags: Record<string,
|
|
10
|
+
static Flags: Record<string, bigint>;
|
|
11
11
|
defaultBit: number;
|
|
12
|
-
bitfield:
|
|
12
|
+
bitfield: bigint;
|
|
13
13
|
constructor(bits?: BitFieldResolvable<S>);
|
|
14
14
|
get [Symbol.toStringTag](): string;
|
|
15
|
-
static resolve<S extends string>(
|
|
15
|
+
static resolve<S extends string>(bits: BitFieldResolvable<S>): bigint;
|
|
16
16
|
has(bit: BitFieldResolvable<S>): boolean;
|
|
17
17
|
add(...bits: BitFieldResolvable<S>[]): this;
|
|
18
18
|
remove(...bits: BitFieldResolvable<S>[]): this;
|
|
19
19
|
serialize(): Record<S, boolean>;
|
|
20
20
|
toArray(): S[];
|
|
21
|
-
toJSON():
|
|
22
|
-
valueOf():
|
|
21
|
+
toJSON(): string;
|
|
22
|
+
valueOf(): string;
|
|
23
23
|
equals(bitfield: BitField<S>): boolean;
|
|
24
24
|
freeze(): Readonly<BitField<S>>;
|
|
25
25
|
}
|
|
@@ -64,59 +64,95 @@ declare class SnowflakeUtil {
|
|
|
64
64
|
|
|
65
65
|
/**
|
|
66
66
|
* Permission flags aligned with Fluxer API (fluxer_api/src/constants/Channel.ts).
|
|
67
|
-
*
|
|
67
|
+
* Bit positions use BigInt shifts (1n << n).
|
|
68
68
|
* Administrator (bit 3) implies all permissions. Guild owner bypasses role computation.
|
|
69
69
|
*
|
|
70
70
|
* @example
|
|
71
71
|
* if (member.permissions.has(PermissionFlags.BanMembers)) { ... }
|
|
72
72
|
* if (perms.has(PermissionFlags.Administrator)) { ... }
|
|
73
73
|
*/
|
|
74
|
-
declare
|
|
75
|
-
CreateInstantInvite
|
|
76
|
-
KickMembers
|
|
77
|
-
BanMembers
|
|
78
|
-
Administrator
|
|
79
|
-
ManageChannels
|
|
80
|
-
ManageGuild
|
|
81
|
-
AddReactions
|
|
82
|
-
ViewAuditLog
|
|
83
|
-
PrioritySpeaker
|
|
84
|
-
Stream
|
|
85
|
-
ViewChannel
|
|
86
|
-
SendMessages
|
|
87
|
-
SendTtsMessages
|
|
88
|
-
ManageMessages
|
|
89
|
-
EmbedLinks
|
|
90
|
-
AttachFiles
|
|
91
|
-
ReadMessageHistory
|
|
92
|
-
MentionEveryone
|
|
93
|
-
UseExternalEmojis
|
|
94
|
-
Connect
|
|
95
|
-
Speak
|
|
96
|
-
MuteMembers
|
|
97
|
-
DeafenMembers
|
|
98
|
-
MoveMembers
|
|
99
|
-
UseVad
|
|
100
|
-
ChangeNickname
|
|
101
|
-
ManageNicknames
|
|
102
|
-
ManageRoles
|
|
103
|
-
ManageWebhooks
|
|
104
|
-
ManageEmojisAndStickers
|
|
105
|
-
ManageExpressions
|
|
106
|
-
UseExternalStickers
|
|
107
|
-
ModerateMembers
|
|
108
|
-
CreateExpressions
|
|
109
|
-
PinMessages
|
|
110
|
-
BypassSlowmode
|
|
111
|
-
UpdateRtcRegion
|
|
112
|
-
}
|
|
113
|
-
/** Forward mapping (name -> number) for lookups. Enum has reverse mappings we must avoid. */
|
|
114
|
-
declare const PermissionFlagsMap: Record<string, number>;
|
|
74
|
+
declare const PermissionFlags: {
|
|
75
|
+
readonly CreateInstantInvite: bigint;
|
|
76
|
+
readonly KickMembers: bigint;
|
|
77
|
+
readonly BanMembers: bigint;
|
|
78
|
+
readonly Administrator: bigint;
|
|
79
|
+
readonly ManageChannels: bigint;
|
|
80
|
+
readonly ManageGuild: bigint;
|
|
81
|
+
readonly AddReactions: bigint;
|
|
82
|
+
readonly ViewAuditLog: bigint;
|
|
83
|
+
readonly PrioritySpeaker: bigint;
|
|
84
|
+
readonly Stream: bigint;
|
|
85
|
+
readonly ViewChannel: bigint;
|
|
86
|
+
readonly SendMessages: bigint;
|
|
87
|
+
readonly SendTtsMessages: bigint;
|
|
88
|
+
readonly ManageMessages: bigint;
|
|
89
|
+
readonly EmbedLinks: bigint;
|
|
90
|
+
readonly AttachFiles: bigint;
|
|
91
|
+
readonly ReadMessageHistory: bigint;
|
|
92
|
+
readonly MentionEveryone: bigint;
|
|
93
|
+
readonly UseExternalEmojis: bigint;
|
|
94
|
+
readonly Connect: bigint;
|
|
95
|
+
readonly Speak: bigint;
|
|
96
|
+
readonly MuteMembers: bigint;
|
|
97
|
+
readonly DeafenMembers: bigint;
|
|
98
|
+
readonly MoveMembers: bigint;
|
|
99
|
+
readonly UseVad: bigint;
|
|
100
|
+
readonly ChangeNickname: bigint;
|
|
101
|
+
readonly ManageNicknames: bigint;
|
|
102
|
+
readonly ManageRoles: bigint;
|
|
103
|
+
readonly ManageWebhooks: bigint;
|
|
104
|
+
readonly ManageEmojisAndStickers: bigint;
|
|
105
|
+
readonly ManageExpressions: bigint;
|
|
106
|
+
readonly UseExternalStickers: bigint;
|
|
107
|
+
readonly ModerateMembers: bigint;
|
|
108
|
+
readonly CreateExpressions: bigint;
|
|
109
|
+
readonly PinMessages: bigint;
|
|
110
|
+
readonly BypassSlowmode: bigint;
|
|
111
|
+
readonly UpdateRtcRegion: bigint;
|
|
112
|
+
};
|
|
115
113
|
/** BigInt OR of all permission flags. Used for guild owner override (owner has all perms). */
|
|
116
114
|
declare const ALL_PERMISSIONS_BIGINT: bigint;
|
|
117
|
-
type PermissionString = keyof typeof
|
|
115
|
+
type PermissionString = keyof typeof PermissionFlags;
|
|
118
116
|
declare class PermissionsBitField extends BitField<PermissionString> {
|
|
119
|
-
static Flags:
|
|
117
|
+
static Flags: {
|
|
118
|
+
readonly CreateInstantInvite: bigint;
|
|
119
|
+
readonly KickMembers: bigint;
|
|
120
|
+
readonly BanMembers: bigint;
|
|
121
|
+
readonly Administrator: bigint;
|
|
122
|
+
readonly ManageChannels: bigint;
|
|
123
|
+
readonly ManageGuild: bigint;
|
|
124
|
+
readonly AddReactions: bigint;
|
|
125
|
+
readonly ViewAuditLog: bigint;
|
|
126
|
+
readonly PrioritySpeaker: bigint;
|
|
127
|
+
readonly Stream: bigint;
|
|
128
|
+
readonly ViewChannel: bigint;
|
|
129
|
+
readonly SendMessages: bigint;
|
|
130
|
+
readonly SendTtsMessages: bigint;
|
|
131
|
+
readonly ManageMessages: bigint;
|
|
132
|
+
readonly EmbedLinks: bigint;
|
|
133
|
+
readonly AttachFiles: bigint;
|
|
134
|
+
readonly ReadMessageHistory: bigint;
|
|
135
|
+
readonly MentionEveryone: bigint;
|
|
136
|
+
readonly UseExternalEmojis: bigint;
|
|
137
|
+
readonly Connect: bigint;
|
|
138
|
+
readonly Speak: bigint;
|
|
139
|
+
readonly MuteMembers: bigint;
|
|
140
|
+
readonly DeafenMembers: bigint;
|
|
141
|
+
readonly MoveMembers: bigint;
|
|
142
|
+
readonly UseVad: bigint;
|
|
143
|
+
readonly ChangeNickname: bigint;
|
|
144
|
+
readonly ManageNicknames: bigint;
|
|
145
|
+
readonly ManageRoles: bigint;
|
|
146
|
+
readonly ManageWebhooks: bigint;
|
|
147
|
+
readonly ManageEmojisAndStickers: bigint;
|
|
148
|
+
readonly ManageExpressions: bigint;
|
|
149
|
+
readonly UseExternalStickers: bigint;
|
|
150
|
+
readonly ModerateMembers: bigint;
|
|
151
|
+
readonly CreateExpressions: bigint;
|
|
152
|
+
readonly PinMessages: bigint;
|
|
153
|
+
readonly BypassSlowmode: bigint;
|
|
154
|
+
readonly UpdateRtcRegion: bigint;
|
|
155
|
+
};
|
|
120
156
|
}
|
|
121
157
|
type PermissionResolvable = BitFieldResolvable<PermissionString>;
|
|
122
158
|
/**
|
|
@@ -135,18 +171,18 @@ declare function resolvePermissionsToBitfield(perms: PermissionResolvable): stri
|
|
|
135
171
|
* Format: int32.
|
|
136
172
|
*/
|
|
137
173
|
declare const MessageFlagsBits: {
|
|
138
|
-
readonly SuppressEmbeds:
|
|
139
|
-
readonly SuppressNotifications:
|
|
140
|
-
readonly VoiceMessage:
|
|
141
|
-
readonly CompactAttachments:
|
|
174
|
+
readonly SuppressEmbeds: bigint;
|
|
175
|
+
readonly SuppressNotifications: bigint;
|
|
176
|
+
readonly VoiceMessage: bigint;
|
|
177
|
+
readonly CompactAttachments: bigint;
|
|
142
178
|
};
|
|
143
179
|
type MessageFlagsString = keyof typeof MessageFlagsBits;
|
|
144
180
|
declare class MessageFlagsBitField extends BitField<MessageFlagsString> {
|
|
145
181
|
static Flags: {
|
|
146
|
-
readonly SuppressEmbeds:
|
|
147
|
-
readonly SuppressNotifications:
|
|
148
|
-
readonly VoiceMessage:
|
|
149
|
-
readonly CompactAttachments:
|
|
182
|
+
readonly SuppressEmbeds: bigint;
|
|
183
|
+
readonly SuppressNotifications: bigint;
|
|
184
|
+
readonly VoiceMessage: bigint;
|
|
185
|
+
readonly CompactAttachments: bigint;
|
|
150
186
|
};
|
|
151
187
|
}
|
|
152
188
|
type MessageFlagsResolvable = BitFieldResolvable<MessageFlagsString>;
|
|
@@ -157,72 +193,72 @@ type MessageFlagsResolvable = BitFieldResolvable<MessageFlagsString>;
|
|
|
157
193
|
* Note: BitField's has/add/remove use JS bitwise ops (32-bit); full values are for API serialization.
|
|
158
194
|
*/
|
|
159
195
|
declare const UserFlagsBits: {
|
|
160
|
-
readonly Staff:
|
|
161
|
-
readonly CtpMember:
|
|
162
|
-
readonly Partner:
|
|
163
|
-
readonly BugHunter:
|
|
164
|
-
readonly FriendlyBot:
|
|
165
|
-
readonly FriendlyBotManualApproval:
|
|
166
|
-
readonly HighGlobalRateLimit:
|
|
167
|
-
readonly Deleted:
|
|
168
|
-
readonly DisabledSuspiciousActivity:
|
|
169
|
-
readonly SelfDeleted:
|
|
170
|
-
readonly PremiumDiscriminator:
|
|
171
|
-
readonly Disabled:
|
|
172
|
-
readonly HasSessionStarted:
|
|
173
|
-
readonly PremiumBadgeHidden:
|
|
174
|
-
readonly PremiumBadgeMasked:
|
|
175
|
-
readonly PremiumBadgeTimestampHidden:
|
|
176
|
-
readonly PremiumBadgeSequenceHidden:
|
|
177
|
-
readonly PremiumPerksSanitized:
|
|
178
|
-
readonly PremiumPurchaseDisabled:
|
|
179
|
-
readonly PremiumEnabledOverride:
|
|
180
|
-
readonly RateLimitBypass:
|
|
181
|
-
readonly ReportBanned:
|
|
182
|
-
readonly VerifiedNotUnderage:
|
|
183
|
-
readonly PendingManualVerification:
|
|
184
|
-
readonly HasDismissedPremiumOnboarding:
|
|
185
|
-
readonly UsedMobileClient:
|
|
186
|
-
readonly AppStoreReviewer:
|
|
187
|
-
readonly DmHistoryBackfilled:
|
|
188
|
-
readonly HasRelationshipsIndexed:
|
|
189
|
-
readonly MessagesByAuthorBackfilled:
|
|
190
|
-
readonly StaffHidden:
|
|
196
|
+
readonly Staff: bigint;
|
|
197
|
+
readonly CtpMember: bigint;
|
|
198
|
+
readonly Partner: bigint;
|
|
199
|
+
readonly BugHunter: bigint;
|
|
200
|
+
readonly FriendlyBot: bigint;
|
|
201
|
+
readonly FriendlyBotManualApproval: bigint;
|
|
202
|
+
readonly HighGlobalRateLimit: bigint;
|
|
203
|
+
readonly Deleted: bigint;
|
|
204
|
+
readonly DisabledSuspiciousActivity: bigint;
|
|
205
|
+
readonly SelfDeleted: bigint;
|
|
206
|
+
readonly PremiumDiscriminator: bigint;
|
|
207
|
+
readonly Disabled: bigint;
|
|
208
|
+
readonly HasSessionStarted: bigint;
|
|
209
|
+
readonly PremiumBadgeHidden: bigint;
|
|
210
|
+
readonly PremiumBadgeMasked: bigint;
|
|
211
|
+
readonly PremiumBadgeTimestampHidden: bigint;
|
|
212
|
+
readonly PremiumBadgeSequenceHidden: bigint;
|
|
213
|
+
readonly PremiumPerksSanitized: bigint;
|
|
214
|
+
readonly PremiumPurchaseDisabled: bigint;
|
|
215
|
+
readonly PremiumEnabledOverride: bigint;
|
|
216
|
+
readonly RateLimitBypass: bigint;
|
|
217
|
+
readonly ReportBanned: bigint;
|
|
218
|
+
readonly VerifiedNotUnderage: bigint;
|
|
219
|
+
readonly PendingManualVerification: bigint;
|
|
220
|
+
readonly HasDismissedPremiumOnboarding: bigint;
|
|
221
|
+
readonly UsedMobileClient: bigint;
|
|
222
|
+
readonly AppStoreReviewer: bigint;
|
|
223
|
+
readonly DmHistoryBackfilled: bigint;
|
|
224
|
+
readonly HasRelationshipsIndexed: bigint;
|
|
225
|
+
readonly MessagesByAuthorBackfilled: bigint;
|
|
226
|
+
readonly StaffHidden: bigint;
|
|
191
227
|
};
|
|
192
228
|
type UserFlagsString = keyof typeof UserFlagsBits;
|
|
193
229
|
declare class UserFlagsBitField extends BitField<UserFlagsString> {
|
|
194
230
|
static Flags: {
|
|
195
|
-
readonly Staff:
|
|
196
|
-
readonly CtpMember:
|
|
197
|
-
readonly Partner:
|
|
198
|
-
readonly BugHunter:
|
|
199
|
-
readonly FriendlyBot:
|
|
200
|
-
readonly FriendlyBotManualApproval:
|
|
201
|
-
readonly HighGlobalRateLimit:
|
|
202
|
-
readonly Deleted:
|
|
203
|
-
readonly DisabledSuspiciousActivity:
|
|
204
|
-
readonly SelfDeleted:
|
|
205
|
-
readonly PremiumDiscriminator:
|
|
206
|
-
readonly Disabled:
|
|
207
|
-
readonly HasSessionStarted:
|
|
208
|
-
readonly PremiumBadgeHidden:
|
|
209
|
-
readonly PremiumBadgeMasked:
|
|
210
|
-
readonly PremiumBadgeTimestampHidden:
|
|
211
|
-
readonly PremiumBadgeSequenceHidden:
|
|
212
|
-
readonly PremiumPerksSanitized:
|
|
213
|
-
readonly PremiumPurchaseDisabled:
|
|
214
|
-
readonly PremiumEnabledOverride:
|
|
215
|
-
readonly RateLimitBypass:
|
|
216
|
-
readonly ReportBanned:
|
|
217
|
-
readonly VerifiedNotUnderage:
|
|
218
|
-
readonly PendingManualVerification:
|
|
219
|
-
readonly HasDismissedPremiumOnboarding:
|
|
220
|
-
readonly UsedMobileClient:
|
|
221
|
-
readonly AppStoreReviewer:
|
|
222
|
-
readonly DmHistoryBackfilled:
|
|
223
|
-
readonly HasRelationshipsIndexed:
|
|
224
|
-
readonly MessagesByAuthorBackfilled:
|
|
225
|
-
readonly StaffHidden:
|
|
231
|
+
readonly Staff: bigint;
|
|
232
|
+
readonly CtpMember: bigint;
|
|
233
|
+
readonly Partner: bigint;
|
|
234
|
+
readonly BugHunter: bigint;
|
|
235
|
+
readonly FriendlyBot: bigint;
|
|
236
|
+
readonly FriendlyBotManualApproval: bigint;
|
|
237
|
+
readonly HighGlobalRateLimit: bigint;
|
|
238
|
+
readonly Deleted: bigint;
|
|
239
|
+
readonly DisabledSuspiciousActivity: bigint;
|
|
240
|
+
readonly SelfDeleted: bigint;
|
|
241
|
+
readonly PremiumDiscriminator: bigint;
|
|
242
|
+
readonly Disabled: bigint;
|
|
243
|
+
readonly HasSessionStarted: bigint;
|
|
244
|
+
readonly PremiumBadgeHidden: bigint;
|
|
245
|
+
readonly PremiumBadgeMasked: bigint;
|
|
246
|
+
readonly PremiumBadgeTimestampHidden: bigint;
|
|
247
|
+
readonly PremiumBadgeSequenceHidden: bigint;
|
|
248
|
+
readonly PremiumPerksSanitized: bigint;
|
|
249
|
+
readonly PremiumPurchaseDisabled: bigint;
|
|
250
|
+
readonly PremiumEnabledOverride: bigint;
|
|
251
|
+
readonly RateLimitBypass: bigint;
|
|
252
|
+
readonly ReportBanned: bigint;
|
|
253
|
+
readonly VerifiedNotUnderage: bigint;
|
|
254
|
+
readonly PendingManualVerification: bigint;
|
|
255
|
+
readonly HasDismissedPremiumOnboarding: bigint;
|
|
256
|
+
readonly UsedMobileClient: bigint;
|
|
257
|
+
readonly AppStoreReviewer: bigint;
|
|
258
|
+
readonly DmHistoryBackfilled: bigint;
|
|
259
|
+
readonly HasRelationshipsIndexed: bigint;
|
|
260
|
+
readonly MessagesByAuthorBackfilled: bigint;
|
|
261
|
+
readonly StaffHidden: bigint;
|
|
226
262
|
};
|
|
227
263
|
}
|
|
228
264
|
type UserFlagsResolvable = BitFieldResolvable<UserFlagsString>;
|
|
@@ -326,4 +362,4 @@ declare function resolveTenorToImageUrl(tenorViewUrl: string): Promise<TenorMedi
|
|
|
326
362
|
|
|
327
363
|
declare function emitDeprecationWarning(symbol: string, message: string): void;
|
|
328
364
|
|
|
329
|
-
export { ALL_PERMISSIONS_BIGINT, BitField, type BitFieldResolvable, FLUXER_EPOCH, MessageFlagsBitField, MessageFlagsBits, type MessageFlagsResolvable, type MessageFlagsString, PermissionFlags,
|
|
365
|
+
export { ALL_PERMISSIONS_BIGINT, BitField, type BitFieldResolvable, FLUXER_EPOCH, MessageFlagsBitField, MessageFlagsBits, type MessageFlagsResolvable, type MessageFlagsString, PermissionFlags, type PermissionResolvable, type PermissionString, PermissionsBitField, SnowflakeUtil, type TenorMediaResult, UserFlagsBitField, UserFlagsBits, type UserFlagsResolvable, type UserFlagsString, emitDeprecationWarning, escapeMarkdown, formatColor, formatEmoji, formatTimestamp, getUnicodeFromShortcode, parseEmoji, parsePrefixCommand, parseRoleMention, parseUserMention, resolveColor, resolvePermissionsToBitfield, resolveTenorToImageUrl, truncate };
|
package/dist/index.d.ts
CHANGED
|
@@ -5,21 +5,21 @@
|
|
|
5
5
|
* Flags with values exceeding 2^30 may exhibit unexpected behavior. For permission-style
|
|
6
6
|
* bitfields with more than 30 bits, consider using BigInt-based implementations.
|
|
7
7
|
*/
|
|
8
|
-
type BitFieldResolvable<S extends string> = S | bigint | number | BitField<S> | (S | number | BitField<S>)[];
|
|
8
|
+
type BitFieldResolvable<S extends string> = S | bigint | number | BitField<S> | (S | number | bigint | BitField<S>)[];
|
|
9
9
|
declare class BitField<S extends string> {
|
|
10
|
-
static Flags: Record<string,
|
|
10
|
+
static Flags: Record<string, bigint>;
|
|
11
11
|
defaultBit: number;
|
|
12
|
-
bitfield:
|
|
12
|
+
bitfield: bigint;
|
|
13
13
|
constructor(bits?: BitFieldResolvable<S>);
|
|
14
14
|
get [Symbol.toStringTag](): string;
|
|
15
|
-
static resolve<S extends string>(
|
|
15
|
+
static resolve<S extends string>(bits: BitFieldResolvable<S>): bigint;
|
|
16
16
|
has(bit: BitFieldResolvable<S>): boolean;
|
|
17
17
|
add(...bits: BitFieldResolvable<S>[]): this;
|
|
18
18
|
remove(...bits: BitFieldResolvable<S>[]): this;
|
|
19
19
|
serialize(): Record<S, boolean>;
|
|
20
20
|
toArray(): S[];
|
|
21
|
-
toJSON():
|
|
22
|
-
valueOf():
|
|
21
|
+
toJSON(): string;
|
|
22
|
+
valueOf(): string;
|
|
23
23
|
equals(bitfield: BitField<S>): boolean;
|
|
24
24
|
freeze(): Readonly<BitField<S>>;
|
|
25
25
|
}
|
|
@@ -64,59 +64,95 @@ declare class SnowflakeUtil {
|
|
|
64
64
|
|
|
65
65
|
/**
|
|
66
66
|
* Permission flags aligned with Fluxer API (fluxer_api/src/constants/Channel.ts).
|
|
67
|
-
*
|
|
67
|
+
* Bit positions use BigInt shifts (1n << n).
|
|
68
68
|
* Administrator (bit 3) implies all permissions. Guild owner bypasses role computation.
|
|
69
69
|
*
|
|
70
70
|
* @example
|
|
71
71
|
* if (member.permissions.has(PermissionFlags.BanMembers)) { ... }
|
|
72
72
|
* if (perms.has(PermissionFlags.Administrator)) { ... }
|
|
73
73
|
*/
|
|
74
|
-
declare
|
|
75
|
-
CreateInstantInvite
|
|
76
|
-
KickMembers
|
|
77
|
-
BanMembers
|
|
78
|
-
Administrator
|
|
79
|
-
ManageChannels
|
|
80
|
-
ManageGuild
|
|
81
|
-
AddReactions
|
|
82
|
-
ViewAuditLog
|
|
83
|
-
PrioritySpeaker
|
|
84
|
-
Stream
|
|
85
|
-
ViewChannel
|
|
86
|
-
SendMessages
|
|
87
|
-
SendTtsMessages
|
|
88
|
-
ManageMessages
|
|
89
|
-
EmbedLinks
|
|
90
|
-
AttachFiles
|
|
91
|
-
ReadMessageHistory
|
|
92
|
-
MentionEveryone
|
|
93
|
-
UseExternalEmojis
|
|
94
|
-
Connect
|
|
95
|
-
Speak
|
|
96
|
-
MuteMembers
|
|
97
|
-
DeafenMembers
|
|
98
|
-
MoveMembers
|
|
99
|
-
UseVad
|
|
100
|
-
ChangeNickname
|
|
101
|
-
ManageNicknames
|
|
102
|
-
ManageRoles
|
|
103
|
-
ManageWebhooks
|
|
104
|
-
ManageEmojisAndStickers
|
|
105
|
-
ManageExpressions
|
|
106
|
-
UseExternalStickers
|
|
107
|
-
ModerateMembers
|
|
108
|
-
CreateExpressions
|
|
109
|
-
PinMessages
|
|
110
|
-
BypassSlowmode
|
|
111
|
-
UpdateRtcRegion
|
|
112
|
-
}
|
|
113
|
-
/** Forward mapping (name -> number) for lookups. Enum has reverse mappings we must avoid. */
|
|
114
|
-
declare const PermissionFlagsMap: Record<string, number>;
|
|
74
|
+
declare const PermissionFlags: {
|
|
75
|
+
readonly CreateInstantInvite: bigint;
|
|
76
|
+
readonly KickMembers: bigint;
|
|
77
|
+
readonly BanMembers: bigint;
|
|
78
|
+
readonly Administrator: bigint;
|
|
79
|
+
readonly ManageChannels: bigint;
|
|
80
|
+
readonly ManageGuild: bigint;
|
|
81
|
+
readonly AddReactions: bigint;
|
|
82
|
+
readonly ViewAuditLog: bigint;
|
|
83
|
+
readonly PrioritySpeaker: bigint;
|
|
84
|
+
readonly Stream: bigint;
|
|
85
|
+
readonly ViewChannel: bigint;
|
|
86
|
+
readonly SendMessages: bigint;
|
|
87
|
+
readonly SendTtsMessages: bigint;
|
|
88
|
+
readonly ManageMessages: bigint;
|
|
89
|
+
readonly EmbedLinks: bigint;
|
|
90
|
+
readonly AttachFiles: bigint;
|
|
91
|
+
readonly ReadMessageHistory: bigint;
|
|
92
|
+
readonly MentionEveryone: bigint;
|
|
93
|
+
readonly UseExternalEmojis: bigint;
|
|
94
|
+
readonly Connect: bigint;
|
|
95
|
+
readonly Speak: bigint;
|
|
96
|
+
readonly MuteMembers: bigint;
|
|
97
|
+
readonly DeafenMembers: bigint;
|
|
98
|
+
readonly MoveMembers: bigint;
|
|
99
|
+
readonly UseVad: bigint;
|
|
100
|
+
readonly ChangeNickname: bigint;
|
|
101
|
+
readonly ManageNicknames: bigint;
|
|
102
|
+
readonly ManageRoles: bigint;
|
|
103
|
+
readonly ManageWebhooks: bigint;
|
|
104
|
+
readonly ManageEmojisAndStickers: bigint;
|
|
105
|
+
readonly ManageExpressions: bigint;
|
|
106
|
+
readonly UseExternalStickers: bigint;
|
|
107
|
+
readonly ModerateMembers: bigint;
|
|
108
|
+
readonly CreateExpressions: bigint;
|
|
109
|
+
readonly PinMessages: bigint;
|
|
110
|
+
readonly BypassSlowmode: bigint;
|
|
111
|
+
readonly UpdateRtcRegion: bigint;
|
|
112
|
+
};
|
|
115
113
|
/** BigInt OR of all permission flags. Used for guild owner override (owner has all perms). */
|
|
116
114
|
declare const ALL_PERMISSIONS_BIGINT: bigint;
|
|
117
|
-
type PermissionString = keyof typeof
|
|
115
|
+
type PermissionString = keyof typeof PermissionFlags;
|
|
118
116
|
declare class PermissionsBitField extends BitField<PermissionString> {
|
|
119
|
-
static Flags:
|
|
117
|
+
static Flags: {
|
|
118
|
+
readonly CreateInstantInvite: bigint;
|
|
119
|
+
readonly KickMembers: bigint;
|
|
120
|
+
readonly BanMembers: bigint;
|
|
121
|
+
readonly Administrator: bigint;
|
|
122
|
+
readonly ManageChannels: bigint;
|
|
123
|
+
readonly ManageGuild: bigint;
|
|
124
|
+
readonly AddReactions: bigint;
|
|
125
|
+
readonly ViewAuditLog: bigint;
|
|
126
|
+
readonly PrioritySpeaker: bigint;
|
|
127
|
+
readonly Stream: bigint;
|
|
128
|
+
readonly ViewChannel: bigint;
|
|
129
|
+
readonly SendMessages: bigint;
|
|
130
|
+
readonly SendTtsMessages: bigint;
|
|
131
|
+
readonly ManageMessages: bigint;
|
|
132
|
+
readonly EmbedLinks: bigint;
|
|
133
|
+
readonly AttachFiles: bigint;
|
|
134
|
+
readonly ReadMessageHistory: bigint;
|
|
135
|
+
readonly MentionEveryone: bigint;
|
|
136
|
+
readonly UseExternalEmojis: bigint;
|
|
137
|
+
readonly Connect: bigint;
|
|
138
|
+
readonly Speak: bigint;
|
|
139
|
+
readonly MuteMembers: bigint;
|
|
140
|
+
readonly DeafenMembers: bigint;
|
|
141
|
+
readonly MoveMembers: bigint;
|
|
142
|
+
readonly UseVad: bigint;
|
|
143
|
+
readonly ChangeNickname: bigint;
|
|
144
|
+
readonly ManageNicknames: bigint;
|
|
145
|
+
readonly ManageRoles: bigint;
|
|
146
|
+
readonly ManageWebhooks: bigint;
|
|
147
|
+
readonly ManageEmojisAndStickers: bigint;
|
|
148
|
+
readonly ManageExpressions: bigint;
|
|
149
|
+
readonly UseExternalStickers: bigint;
|
|
150
|
+
readonly ModerateMembers: bigint;
|
|
151
|
+
readonly CreateExpressions: bigint;
|
|
152
|
+
readonly PinMessages: bigint;
|
|
153
|
+
readonly BypassSlowmode: bigint;
|
|
154
|
+
readonly UpdateRtcRegion: bigint;
|
|
155
|
+
};
|
|
120
156
|
}
|
|
121
157
|
type PermissionResolvable = BitFieldResolvable<PermissionString>;
|
|
122
158
|
/**
|
|
@@ -135,18 +171,18 @@ declare function resolvePermissionsToBitfield(perms: PermissionResolvable): stri
|
|
|
135
171
|
* Format: int32.
|
|
136
172
|
*/
|
|
137
173
|
declare const MessageFlagsBits: {
|
|
138
|
-
readonly SuppressEmbeds:
|
|
139
|
-
readonly SuppressNotifications:
|
|
140
|
-
readonly VoiceMessage:
|
|
141
|
-
readonly CompactAttachments:
|
|
174
|
+
readonly SuppressEmbeds: bigint;
|
|
175
|
+
readonly SuppressNotifications: bigint;
|
|
176
|
+
readonly VoiceMessage: bigint;
|
|
177
|
+
readonly CompactAttachments: bigint;
|
|
142
178
|
};
|
|
143
179
|
type MessageFlagsString = keyof typeof MessageFlagsBits;
|
|
144
180
|
declare class MessageFlagsBitField extends BitField<MessageFlagsString> {
|
|
145
181
|
static Flags: {
|
|
146
|
-
readonly SuppressEmbeds:
|
|
147
|
-
readonly SuppressNotifications:
|
|
148
|
-
readonly VoiceMessage:
|
|
149
|
-
readonly CompactAttachments:
|
|
182
|
+
readonly SuppressEmbeds: bigint;
|
|
183
|
+
readonly SuppressNotifications: bigint;
|
|
184
|
+
readonly VoiceMessage: bigint;
|
|
185
|
+
readonly CompactAttachments: bigint;
|
|
150
186
|
};
|
|
151
187
|
}
|
|
152
188
|
type MessageFlagsResolvable = BitFieldResolvable<MessageFlagsString>;
|
|
@@ -157,72 +193,72 @@ type MessageFlagsResolvable = BitFieldResolvable<MessageFlagsString>;
|
|
|
157
193
|
* Note: BitField's has/add/remove use JS bitwise ops (32-bit); full values are for API serialization.
|
|
158
194
|
*/
|
|
159
195
|
declare const UserFlagsBits: {
|
|
160
|
-
readonly Staff:
|
|
161
|
-
readonly CtpMember:
|
|
162
|
-
readonly Partner:
|
|
163
|
-
readonly BugHunter:
|
|
164
|
-
readonly FriendlyBot:
|
|
165
|
-
readonly FriendlyBotManualApproval:
|
|
166
|
-
readonly HighGlobalRateLimit:
|
|
167
|
-
readonly Deleted:
|
|
168
|
-
readonly DisabledSuspiciousActivity:
|
|
169
|
-
readonly SelfDeleted:
|
|
170
|
-
readonly PremiumDiscriminator:
|
|
171
|
-
readonly Disabled:
|
|
172
|
-
readonly HasSessionStarted:
|
|
173
|
-
readonly PremiumBadgeHidden:
|
|
174
|
-
readonly PremiumBadgeMasked:
|
|
175
|
-
readonly PremiumBadgeTimestampHidden:
|
|
176
|
-
readonly PremiumBadgeSequenceHidden:
|
|
177
|
-
readonly PremiumPerksSanitized:
|
|
178
|
-
readonly PremiumPurchaseDisabled:
|
|
179
|
-
readonly PremiumEnabledOverride:
|
|
180
|
-
readonly RateLimitBypass:
|
|
181
|
-
readonly ReportBanned:
|
|
182
|
-
readonly VerifiedNotUnderage:
|
|
183
|
-
readonly PendingManualVerification:
|
|
184
|
-
readonly HasDismissedPremiumOnboarding:
|
|
185
|
-
readonly UsedMobileClient:
|
|
186
|
-
readonly AppStoreReviewer:
|
|
187
|
-
readonly DmHistoryBackfilled:
|
|
188
|
-
readonly HasRelationshipsIndexed:
|
|
189
|
-
readonly MessagesByAuthorBackfilled:
|
|
190
|
-
readonly StaffHidden:
|
|
196
|
+
readonly Staff: bigint;
|
|
197
|
+
readonly CtpMember: bigint;
|
|
198
|
+
readonly Partner: bigint;
|
|
199
|
+
readonly BugHunter: bigint;
|
|
200
|
+
readonly FriendlyBot: bigint;
|
|
201
|
+
readonly FriendlyBotManualApproval: bigint;
|
|
202
|
+
readonly HighGlobalRateLimit: bigint;
|
|
203
|
+
readonly Deleted: bigint;
|
|
204
|
+
readonly DisabledSuspiciousActivity: bigint;
|
|
205
|
+
readonly SelfDeleted: bigint;
|
|
206
|
+
readonly PremiumDiscriminator: bigint;
|
|
207
|
+
readonly Disabled: bigint;
|
|
208
|
+
readonly HasSessionStarted: bigint;
|
|
209
|
+
readonly PremiumBadgeHidden: bigint;
|
|
210
|
+
readonly PremiumBadgeMasked: bigint;
|
|
211
|
+
readonly PremiumBadgeTimestampHidden: bigint;
|
|
212
|
+
readonly PremiumBadgeSequenceHidden: bigint;
|
|
213
|
+
readonly PremiumPerksSanitized: bigint;
|
|
214
|
+
readonly PremiumPurchaseDisabled: bigint;
|
|
215
|
+
readonly PremiumEnabledOverride: bigint;
|
|
216
|
+
readonly RateLimitBypass: bigint;
|
|
217
|
+
readonly ReportBanned: bigint;
|
|
218
|
+
readonly VerifiedNotUnderage: bigint;
|
|
219
|
+
readonly PendingManualVerification: bigint;
|
|
220
|
+
readonly HasDismissedPremiumOnboarding: bigint;
|
|
221
|
+
readonly UsedMobileClient: bigint;
|
|
222
|
+
readonly AppStoreReviewer: bigint;
|
|
223
|
+
readonly DmHistoryBackfilled: bigint;
|
|
224
|
+
readonly HasRelationshipsIndexed: bigint;
|
|
225
|
+
readonly MessagesByAuthorBackfilled: bigint;
|
|
226
|
+
readonly StaffHidden: bigint;
|
|
191
227
|
};
|
|
192
228
|
type UserFlagsString = keyof typeof UserFlagsBits;
|
|
193
229
|
declare class UserFlagsBitField extends BitField<UserFlagsString> {
|
|
194
230
|
static Flags: {
|
|
195
|
-
readonly Staff:
|
|
196
|
-
readonly CtpMember:
|
|
197
|
-
readonly Partner:
|
|
198
|
-
readonly BugHunter:
|
|
199
|
-
readonly FriendlyBot:
|
|
200
|
-
readonly FriendlyBotManualApproval:
|
|
201
|
-
readonly HighGlobalRateLimit:
|
|
202
|
-
readonly Deleted:
|
|
203
|
-
readonly DisabledSuspiciousActivity:
|
|
204
|
-
readonly SelfDeleted:
|
|
205
|
-
readonly PremiumDiscriminator:
|
|
206
|
-
readonly Disabled:
|
|
207
|
-
readonly HasSessionStarted:
|
|
208
|
-
readonly PremiumBadgeHidden:
|
|
209
|
-
readonly PremiumBadgeMasked:
|
|
210
|
-
readonly PremiumBadgeTimestampHidden:
|
|
211
|
-
readonly PremiumBadgeSequenceHidden:
|
|
212
|
-
readonly PremiumPerksSanitized:
|
|
213
|
-
readonly PremiumPurchaseDisabled:
|
|
214
|
-
readonly PremiumEnabledOverride:
|
|
215
|
-
readonly RateLimitBypass:
|
|
216
|
-
readonly ReportBanned:
|
|
217
|
-
readonly VerifiedNotUnderage:
|
|
218
|
-
readonly PendingManualVerification:
|
|
219
|
-
readonly HasDismissedPremiumOnboarding:
|
|
220
|
-
readonly UsedMobileClient:
|
|
221
|
-
readonly AppStoreReviewer:
|
|
222
|
-
readonly DmHistoryBackfilled:
|
|
223
|
-
readonly HasRelationshipsIndexed:
|
|
224
|
-
readonly MessagesByAuthorBackfilled:
|
|
225
|
-
readonly StaffHidden:
|
|
231
|
+
readonly Staff: bigint;
|
|
232
|
+
readonly CtpMember: bigint;
|
|
233
|
+
readonly Partner: bigint;
|
|
234
|
+
readonly BugHunter: bigint;
|
|
235
|
+
readonly FriendlyBot: bigint;
|
|
236
|
+
readonly FriendlyBotManualApproval: bigint;
|
|
237
|
+
readonly HighGlobalRateLimit: bigint;
|
|
238
|
+
readonly Deleted: bigint;
|
|
239
|
+
readonly DisabledSuspiciousActivity: bigint;
|
|
240
|
+
readonly SelfDeleted: bigint;
|
|
241
|
+
readonly PremiumDiscriminator: bigint;
|
|
242
|
+
readonly Disabled: bigint;
|
|
243
|
+
readonly HasSessionStarted: bigint;
|
|
244
|
+
readonly PremiumBadgeHidden: bigint;
|
|
245
|
+
readonly PremiumBadgeMasked: bigint;
|
|
246
|
+
readonly PremiumBadgeTimestampHidden: bigint;
|
|
247
|
+
readonly PremiumBadgeSequenceHidden: bigint;
|
|
248
|
+
readonly PremiumPerksSanitized: bigint;
|
|
249
|
+
readonly PremiumPurchaseDisabled: bigint;
|
|
250
|
+
readonly PremiumEnabledOverride: bigint;
|
|
251
|
+
readonly RateLimitBypass: bigint;
|
|
252
|
+
readonly ReportBanned: bigint;
|
|
253
|
+
readonly VerifiedNotUnderage: bigint;
|
|
254
|
+
readonly PendingManualVerification: bigint;
|
|
255
|
+
readonly HasDismissedPremiumOnboarding: bigint;
|
|
256
|
+
readonly UsedMobileClient: bigint;
|
|
257
|
+
readonly AppStoreReviewer: bigint;
|
|
258
|
+
readonly DmHistoryBackfilled: bigint;
|
|
259
|
+
readonly HasRelationshipsIndexed: bigint;
|
|
260
|
+
readonly MessagesByAuthorBackfilled: bigint;
|
|
261
|
+
readonly StaffHidden: bigint;
|
|
226
262
|
};
|
|
227
263
|
}
|
|
228
264
|
type UserFlagsResolvable = BitFieldResolvable<UserFlagsString>;
|
|
@@ -326,4 +362,4 @@ declare function resolveTenorToImageUrl(tenorViewUrl: string): Promise<TenorMedi
|
|
|
326
362
|
|
|
327
363
|
declare function emitDeprecationWarning(symbol: string, message: string): void;
|
|
328
364
|
|
|
329
|
-
export { ALL_PERMISSIONS_BIGINT, BitField, type BitFieldResolvable, FLUXER_EPOCH, MessageFlagsBitField, MessageFlagsBits, type MessageFlagsResolvable, type MessageFlagsString, PermissionFlags,
|
|
365
|
+
export { ALL_PERMISSIONS_BIGINT, BitField, type BitFieldResolvable, FLUXER_EPOCH, MessageFlagsBitField, MessageFlagsBits, type MessageFlagsResolvable, type MessageFlagsString, PermissionFlags, type PermissionResolvable, type PermissionString, PermissionsBitField, SnowflakeUtil, type TenorMediaResult, UserFlagsBitField, UserFlagsBits, type UserFlagsResolvable, type UserFlagsString, emitDeprecationWarning, escapeMarkdown, formatColor, formatEmoji, formatTimestamp, getUnicodeFromShortcode, parseEmoji, parsePrefixCommand, parseRoleMention, parseUserMention, resolveColor, resolvePermissionsToBitfield, resolveTenorToImageUrl, truncate };
|
package/dist/index.js
CHANGED
|
@@ -26,7 +26,6 @@ __export(index_exports, {
|
|
|
26
26
|
MessageFlagsBitField: () => MessageFlagsBitField,
|
|
27
27
|
MessageFlagsBits: () => MessageFlagsBits,
|
|
28
28
|
PermissionFlags: () => PermissionFlags,
|
|
29
|
-
PermissionFlagsMap: () => PermissionFlagsMap,
|
|
30
29
|
PermissionsBitField: () => PermissionsBitField,
|
|
31
30
|
SnowflakeUtil: () => SnowflakeUtil,
|
|
32
31
|
UserFlagsBitField: () => UserFlagsBitField,
|
|
@@ -54,26 +53,35 @@ var BitField = class _BitField {
|
|
|
54
53
|
defaultBit = 0;
|
|
55
54
|
bitfield;
|
|
56
55
|
constructor(bits = 0) {
|
|
57
|
-
|
|
58
|
-
this.bitfield = Ctor.resolve(bits);
|
|
56
|
+
this.bitfield = this.constructor.resolve(bits);
|
|
59
57
|
}
|
|
60
58
|
get [Symbol.toStringTag]() {
|
|
61
59
|
return `BitField${this.bitfield}`;
|
|
62
60
|
}
|
|
63
|
-
static resolve(
|
|
64
|
-
|
|
65
|
-
if (typeof
|
|
66
|
-
if (
|
|
67
|
-
if (Array.isArray(
|
|
68
|
-
|
|
69
|
-
|
|
61
|
+
static resolve(bits) {
|
|
62
|
+
if (typeof bits === "number" && bits >= 0) return BigInt(bits);
|
|
63
|
+
if (typeof bits === "bigint" && bits >= 0n) return bits;
|
|
64
|
+
if (bits instanceof _BitField) return bits.bitfield;
|
|
65
|
+
if (Array.isArray(bits))
|
|
66
|
+
return bits.map((b) => this.resolve(b)).reduce((a, b) => BigInt(a) | BigInt(b), 0n);
|
|
67
|
+
if (typeof bits === "string") {
|
|
68
|
+
if (bits in this.Flags) {
|
|
69
|
+
return this.Flags[bits];
|
|
70
|
+
}
|
|
71
|
+
try {
|
|
72
|
+
const value = BigInt(bits);
|
|
73
|
+
if (value >= 0n) return value;
|
|
74
|
+
} catch {
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
throw new RangeError(`Invalid bitfield flag or number: ${bits}`);
|
|
70
78
|
}
|
|
71
79
|
has(bit) {
|
|
72
80
|
bit = this.constructor.resolve(bit);
|
|
73
81
|
return (this.bitfield & bit) === bit;
|
|
74
82
|
}
|
|
75
83
|
add(...bits) {
|
|
76
|
-
let total =
|
|
84
|
+
let total = 0n;
|
|
77
85
|
for (const bit of bits) {
|
|
78
86
|
total |= this.constructor.resolve(bit);
|
|
79
87
|
}
|
|
@@ -81,7 +89,7 @@ var BitField = class _BitField {
|
|
|
81
89
|
return this;
|
|
82
90
|
}
|
|
83
91
|
remove(...bits) {
|
|
84
|
-
let total =
|
|
92
|
+
let total = 0n;
|
|
85
93
|
for (const bit of bits) {
|
|
86
94
|
total |= this.constructor.resolve(bit);
|
|
87
95
|
}
|
|
@@ -101,10 +109,10 @@ var BitField = class _BitField {
|
|
|
101
109
|
return Object.entries(Flags).filter(([, value]) => (this.bitfield & value) === value).map(([key]) => key);
|
|
102
110
|
}
|
|
103
111
|
toJSON() {
|
|
104
|
-
return this.bitfield;
|
|
112
|
+
return this.bitfield.toString();
|
|
105
113
|
}
|
|
106
114
|
valueOf() {
|
|
107
|
-
return this.bitfield;
|
|
115
|
+
return this.bitfield.toString();
|
|
108
116
|
}
|
|
109
117
|
equals(bitfield) {
|
|
110
118
|
return this.bitfield === bitfield.bitfield;
|
|
@@ -165,69 +173,54 @@ var SnowflakeUtil = class {
|
|
|
165
173
|
};
|
|
166
174
|
|
|
167
175
|
// src/PermissionsBitField.ts
|
|
168
|
-
var PermissionFlags =
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
var PermissionFlagsMap = {};
|
|
209
|
-
for (const [k, v] of Object.entries(PermissionFlags)) {
|
|
210
|
-
if (typeof v === "number") PermissionFlagsMap[k] = v;
|
|
211
|
-
}
|
|
212
|
-
var ALL_PERMISSIONS_BIGINT = (() => {
|
|
213
|
-
let acc = 0n;
|
|
214
|
-
const seen = /* @__PURE__ */ new Set();
|
|
215
|
-
for (const v of Object.values(PermissionFlagsMap)) {
|
|
216
|
-
if (!seen.has(v)) {
|
|
217
|
-
seen.add(v);
|
|
218
|
-
acc |= BigInt(v);
|
|
219
|
-
}
|
|
220
|
-
}
|
|
221
|
-
return acc;
|
|
222
|
-
})();
|
|
176
|
+
var PermissionFlags = {
|
|
177
|
+
CreateInstantInvite: 1n << 0n,
|
|
178
|
+
KickMembers: 1n << 1n,
|
|
179
|
+
BanMembers: 1n << 2n,
|
|
180
|
+
Administrator: 1n << 3n,
|
|
181
|
+
ManageChannels: 1n << 4n,
|
|
182
|
+
ManageGuild: 1n << 5n,
|
|
183
|
+
AddReactions: 1n << 6n,
|
|
184
|
+
ViewAuditLog: 1n << 7n,
|
|
185
|
+
PrioritySpeaker: 1n << 8n,
|
|
186
|
+
Stream: 1n << 9n,
|
|
187
|
+
ViewChannel: 1n << 10n,
|
|
188
|
+
SendMessages: 1n << 11n,
|
|
189
|
+
SendTtsMessages: 1n << 12n,
|
|
190
|
+
ManageMessages: 1n << 13n,
|
|
191
|
+
EmbedLinks: 1n << 14n,
|
|
192
|
+
AttachFiles: 1n << 15n,
|
|
193
|
+
ReadMessageHistory: 1n << 16n,
|
|
194
|
+
MentionEveryone: 1n << 17n,
|
|
195
|
+
UseExternalEmojis: 1n << 18n,
|
|
196
|
+
Connect: 1n << 20n,
|
|
197
|
+
Speak: 1n << 21n,
|
|
198
|
+
MuteMembers: 1n << 22n,
|
|
199
|
+
DeafenMembers: 1n << 23n,
|
|
200
|
+
MoveMembers: 1n << 24n,
|
|
201
|
+
UseVad: 1n << 25n,
|
|
202
|
+
ChangeNickname: 1n << 26n,
|
|
203
|
+
ManageNicknames: 1n << 27n,
|
|
204
|
+
ManageRoles: 1n << 28n,
|
|
205
|
+
ManageWebhooks: 1n << 29n,
|
|
206
|
+
ManageEmojisAndStickers: 1n << 30n,
|
|
207
|
+
ManageExpressions: 1n << 30n,
|
|
208
|
+
UseExternalStickers: 1n << 37n,
|
|
209
|
+
ModerateMembers: 1n << 40n,
|
|
210
|
+
CreateExpressions: 1n << 43n,
|
|
211
|
+
PinMessages: 1n << 51n,
|
|
212
|
+
BypassSlowmode: 1n << 52n,
|
|
213
|
+
UpdateRtcRegion: 1n << 53n
|
|
214
|
+
};
|
|
215
|
+
var ALL_PERMISSIONS_BIGINT = Object.values(PermissionFlags).reduce((a, b) => a | b, 0n);
|
|
223
216
|
var PermissionsBitField = class extends BitField {
|
|
224
|
-
static Flags =
|
|
217
|
+
static Flags = PermissionFlags;
|
|
225
218
|
};
|
|
226
219
|
function resolvePermissionsToBitfield(perms) {
|
|
227
220
|
if (typeof perms === "string") {
|
|
228
221
|
const num = Number(perms);
|
|
229
222
|
if (!Number.isNaN(num) && perms.trim() !== "") return perms;
|
|
230
|
-
const mapped =
|
|
223
|
+
const mapped = PermissionFlags[perms];
|
|
231
224
|
if (mapped !== void 0) return String(mapped);
|
|
232
225
|
throw new RangeError(`Invalid permission string: ${perms}`);
|
|
233
226
|
}
|
|
@@ -240,7 +233,7 @@ function resolvePermissionsToBitfield(perms) {
|
|
|
240
233
|
let v;
|
|
241
234
|
if (typeof p === "number") v = BigInt(p);
|
|
242
235
|
else if (typeof p === "string") {
|
|
243
|
-
const mapped =
|
|
236
|
+
const mapped = PermissionFlags[p];
|
|
244
237
|
v = mapped !== void 0 ? BigInt(mapped) : BigInt(Number(p) || 0);
|
|
245
238
|
} else v = BigInt(p.bitfield);
|
|
246
239
|
acc |= v;
|
|
@@ -252,13 +245,13 @@ function resolvePermissionsToBitfield(perms) {
|
|
|
252
245
|
|
|
253
246
|
// src/MessageFlagsBitField.ts
|
|
254
247
|
var MessageFlagsBits = {
|
|
255
|
-
SuppressEmbeds:
|
|
248
|
+
SuppressEmbeds: 1n << 2n,
|
|
256
249
|
// 4
|
|
257
|
-
SuppressNotifications:
|
|
250
|
+
SuppressNotifications: 1n << 12n,
|
|
258
251
|
// 4096
|
|
259
|
-
VoiceMessage:
|
|
252
|
+
VoiceMessage: 1n << 13n,
|
|
260
253
|
// 8192
|
|
261
|
-
CompactAttachments:
|
|
254
|
+
CompactAttachments: 1n << 17n
|
|
262
255
|
// 131072
|
|
263
256
|
};
|
|
264
257
|
var MessageFlagsBitField = class extends BitField {
|
|
@@ -267,38 +260,37 @@ var MessageFlagsBitField = class extends BitField {
|
|
|
267
260
|
|
|
268
261
|
// src/UserFlagsBitField.ts
|
|
269
262
|
var UserFlagsBits = {
|
|
270
|
-
Staff:
|
|
271
|
-
CtpMember:
|
|
272
|
-
Partner:
|
|
273
|
-
BugHunter:
|
|
274
|
-
FriendlyBot:
|
|
275
|
-
FriendlyBotManualApproval:
|
|
276
|
-
HighGlobalRateLimit:
|
|
277
|
-
Deleted:
|
|
278
|
-
DisabledSuspiciousActivity:
|
|
279
|
-
SelfDeleted:
|
|
280
|
-
PremiumDiscriminator:
|
|
281
|
-
Disabled:
|
|
282
|
-
HasSessionStarted:
|
|
283
|
-
PremiumBadgeHidden:
|
|
284
|
-
PremiumBadgeMasked:
|
|
285
|
-
PremiumBadgeTimestampHidden:
|
|
286
|
-
PremiumBadgeSequenceHidden:
|
|
287
|
-
PremiumPerksSanitized:
|
|
288
|
-
PremiumPurchaseDisabled:
|
|
289
|
-
PremiumEnabledOverride:
|
|
290
|
-
RateLimitBypass:
|
|
291
|
-
ReportBanned:
|
|
292
|
-
VerifiedNotUnderage:
|
|
293
|
-
PendingManualVerification:
|
|
294
|
-
HasDismissedPremiumOnboarding:
|
|
295
|
-
UsedMobileClient:
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
StaffHidden: 2 ** 57
|
|
263
|
+
Staff: 1n << 0n,
|
|
264
|
+
CtpMember: 1n << 1n,
|
|
265
|
+
Partner: 1n << 2n,
|
|
266
|
+
BugHunter: 1n << 3n,
|
|
267
|
+
FriendlyBot: 1n << 4n,
|
|
268
|
+
FriendlyBotManualApproval: 1n << 5n,
|
|
269
|
+
HighGlobalRateLimit: 1n << 33n,
|
|
270
|
+
Deleted: 1n << 34n,
|
|
271
|
+
DisabledSuspiciousActivity: 1n << 35n,
|
|
272
|
+
SelfDeleted: 1n << 36n,
|
|
273
|
+
PremiumDiscriminator: 1n << 37n,
|
|
274
|
+
Disabled: 1n << 38n,
|
|
275
|
+
HasSessionStarted: 1n << 39n,
|
|
276
|
+
PremiumBadgeHidden: 1n << 40n,
|
|
277
|
+
PremiumBadgeMasked: 1n << 41n,
|
|
278
|
+
PremiumBadgeTimestampHidden: 1n << 42n,
|
|
279
|
+
PremiumBadgeSequenceHidden: 1n << 43n,
|
|
280
|
+
PremiumPerksSanitized: 1n << 44n,
|
|
281
|
+
PremiumPurchaseDisabled: 1n << 45n,
|
|
282
|
+
PremiumEnabledOverride: 1n << 46n,
|
|
283
|
+
RateLimitBypass: 1n << 47n,
|
|
284
|
+
ReportBanned: 1n << 48n,
|
|
285
|
+
VerifiedNotUnderage: 1n << 49n,
|
|
286
|
+
PendingManualVerification: 1n << 50n,
|
|
287
|
+
HasDismissedPremiumOnboarding: 1n << 51n,
|
|
288
|
+
UsedMobileClient: 1n << 52n,
|
|
289
|
+
AppStoreReviewer: 1n << 53n,
|
|
290
|
+
DmHistoryBackfilled: 1n << 54n,
|
|
291
|
+
HasRelationshipsIndexed: 1n << 55n,
|
|
292
|
+
MessagesByAuthorBackfilled: 1n << 56n,
|
|
293
|
+
StaffHidden: 1n << 57n
|
|
302
294
|
};
|
|
303
295
|
var UserFlagsBitField = class extends BitField {
|
|
304
296
|
static Flags = UserFlagsBits;
|
|
@@ -488,7 +480,6 @@ function emitDeprecationWarning(symbol, message) {
|
|
|
488
480
|
MessageFlagsBitField,
|
|
489
481
|
MessageFlagsBits,
|
|
490
482
|
PermissionFlags,
|
|
491
|
-
PermissionFlagsMap,
|
|
492
483
|
PermissionsBitField,
|
|
493
484
|
SnowflakeUtil,
|
|
494
485
|
UserFlagsBitField,
|
package/dist/index.mjs
CHANGED
|
@@ -4,26 +4,35 @@ var BitField = class _BitField {
|
|
|
4
4
|
defaultBit = 0;
|
|
5
5
|
bitfield;
|
|
6
6
|
constructor(bits = 0) {
|
|
7
|
-
|
|
8
|
-
this.bitfield = Ctor.resolve(bits);
|
|
7
|
+
this.bitfield = this.constructor.resolve(bits);
|
|
9
8
|
}
|
|
10
9
|
get [Symbol.toStringTag]() {
|
|
11
10
|
return `BitField${this.bitfield}`;
|
|
12
11
|
}
|
|
13
|
-
static resolve(
|
|
14
|
-
|
|
15
|
-
if (typeof
|
|
16
|
-
if (
|
|
17
|
-
if (Array.isArray(
|
|
18
|
-
|
|
19
|
-
|
|
12
|
+
static resolve(bits) {
|
|
13
|
+
if (typeof bits === "number" && bits >= 0) return BigInt(bits);
|
|
14
|
+
if (typeof bits === "bigint" && bits >= 0n) return bits;
|
|
15
|
+
if (bits instanceof _BitField) return bits.bitfield;
|
|
16
|
+
if (Array.isArray(bits))
|
|
17
|
+
return bits.map((b) => this.resolve(b)).reduce((a, b) => BigInt(a) | BigInt(b), 0n);
|
|
18
|
+
if (typeof bits === "string") {
|
|
19
|
+
if (bits in this.Flags) {
|
|
20
|
+
return this.Flags[bits];
|
|
21
|
+
}
|
|
22
|
+
try {
|
|
23
|
+
const value = BigInt(bits);
|
|
24
|
+
if (value >= 0n) return value;
|
|
25
|
+
} catch {
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
throw new RangeError(`Invalid bitfield flag or number: ${bits}`);
|
|
20
29
|
}
|
|
21
30
|
has(bit) {
|
|
22
31
|
bit = this.constructor.resolve(bit);
|
|
23
32
|
return (this.bitfield & bit) === bit;
|
|
24
33
|
}
|
|
25
34
|
add(...bits) {
|
|
26
|
-
let total =
|
|
35
|
+
let total = 0n;
|
|
27
36
|
for (const bit of bits) {
|
|
28
37
|
total |= this.constructor.resolve(bit);
|
|
29
38
|
}
|
|
@@ -31,7 +40,7 @@ var BitField = class _BitField {
|
|
|
31
40
|
return this;
|
|
32
41
|
}
|
|
33
42
|
remove(...bits) {
|
|
34
|
-
let total =
|
|
43
|
+
let total = 0n;
|
|
35
44
|
for (const bit of bits) {
|
|
36
45
|
total |= this.constructor.resolve(bit);
|
|
37
46
|
}
|
|
@@ -51,10 +60,10 @@ var BitField = class _BitField {
|
|
|
51
60
|
return Object.entries(Flags).filter(([, value]) => (this.bitfield & value) === value).map(([key]) => key);
|
|
52
61
|
}
|
|
53
62
|
toJSON() {
|
|
54
|
-
return this.bitfield;
|
|
63
|
+
return this.bitfield.toString();
|
|
55
64
|
}
|
|
56
65
|
valueOf() {
|
|
57
|
-
return this.bitfield;
|
|
66
|
+
return this.bitfield.toString();
|
|
58
67
|
}
|
|
59
68
|
equals(bitfield) {
|
|
60
69
|
return this.bitfield === bitfield.bitfield;
|
|
@@ -115,69 +124,54 @@ var SnowflakeUtil = class {
|
|
|
115
124
|
};
|
|
116
125
|
|
|
117
126
|
// src/PermissionsBitField.ts
|
|
118
|
-
var PermissionFlags =
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
var PermissionFlagsMap = {};
|
|
159
|
-
for (const [k, v] of Object.entries(PermissionFlags)) {
|
|
160
|
-
if (typeof v === "number") PermissionFlagsMap[k] = v;
|
|
161
|
-
}
|
|
162
|
-
var ALL_PERMISSIONS_BIGINT = (() => {
|
|
163
|
-
let acc = 0n;
|
|
164
|
-
const seen = /* @__PURE__ */ new Set();
|
|
165
|
-
for (const v of Object.values(PermissionFlagsMap)) {
|
|
166
|
-
if (!seen.has(v)) {
|
|
167
|
-
seen.add(v);
|
|
168
|
-
acc |= BigInt(v);
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
return acc;
|
|
172
|
-
})();
|
|
127
|
+
var PermissionFlags = {
|
|
128
|
+
CreateInstantInvite: 1n << 0n,
|
|
129
|
+
KickMembers: 1n << 1n,
|
|
130
|
+
BanMembers: 1n << 2n,
|
|
131
|
+
Administrator: 1n << 3n,
|
|
132
|
+
ManageChannels: 1n << 4n,
|
|
133
|
+
ManageGuild: 1n << 5n,
|
|
134
|
+
AddReactions: 1n << 6n,
|
|
135
|
+
ViewAuditLog: 1n << 7n,
|
|
136
|
+
PrioritySpeaker: 1n << 8n,
|
|
137
|
+
Stream: 1n << 9n,
|
|
138
|
+
ViewChannel: 1n << 10n,
|
|
139
|
+
SendMessages: 1n << 11n,
|
|
140
|
+
SendTtsMessages: 1n << 12n,
|
|
141
|
+
ManageMessages: 1n << 13n,
|
|
142
|
+
EmbedLinks: 1n << 14n,
|
|
143
|
+
AttachFiles: 1n << 15n,
|
|
144
|
+
ReadMessageHistory: 1n << 16n,
|
|
145
|
+
MentionEveryone: 1n << 17n,
|
|
146
|
+
UseExternalEmojis: 1n << 18n,
|
|
147
|
+
Connect: 1n << 20n,
|
|
148
|
+
Speak: 1n << 21n,
|
|
149
|
+
MuteMembers: 1n << 22n,
|
|
150
|
+
DeafenMembers: 1n << 23n,
|
|
151
|
+
MoveMembers: 1n << 24n,
|
|
152
|
+
UseVad: 1n << 25n,
|
|
153
|
+
ChangeNickname: 1n << 26n,
|
|
154
|
+
ManageNicknames: 1n << 27n,
|
|
155
|
+
ManageRoles: 1n << 28n,
|
|
156
|
+
ManageWebhooks: 1n << 29n,
|
|
157
|
+
ManageEmojisAndStickers: 1n << 30n,
|
|
158
|
+
ManageExpressions: 1n << 30n,
|
|
159
|
+
UseExternalStickers: 1n << 37n,
|
|
160
|
+
ModerateMembers: 1n << 40n,
|
|
161
|
+
CreateExpressions: 1n << 43n,
|
|
162
|
+
PinMessages: 1n << 51n,
|
|
163
|
+
BypassSlowmode: 1n << 52n,
|
|
164
|
+
UpdateRtcRegion: 1n << 53n
|
|
165
|
+
};
|
|
166
|
+
var ALL_PERMISSIONS_BIGINT = Object.values(PermissionFlags).reduce((a, b) => a | b, 0n);
|
|
173
167
|
var PermissionsBitField = class extends BitField {
|
|
174
|
-
static Flags =
|
|
168
|
+
static Flags = PermissionFlags;
|
|
175
169
|
};
|
|
176
170
|
function resolvePermissionsToBitfield(perms) {
|
|
177
171
|
if (typeof perms === "string") {
|
|
178
172
|
const num = Number(perms);
|
|
179
173
|
if (!Number.isNaN(num) && perms.trim() !== "") return perms;
|
|
180
|
-
const mapped =
|
|
174
|
+
const mapped = PermissionFlags[perms];
|
|
181
175
|
if (mapped !== void 0) return String(mapped);
|
|
182
176
|
throw new RangeError(`Invalid permission string: ${perms}`);
|
|
183
177
|
}
|
|
@@ -190,7 +184,7 @@ function resolvePermissionsToBitfield(perms) {
|
|
|
190
184
|
let v;
|
|
191
185
|
if (typeof p === "number") v = BigInt(p);
|
|
192
186
|
else if (typeof p === "string") {
|
|
193
|
-
const mapped =
|
|
187
|
+
const mapped = PermissionFlags[p];
|
|
194
188
|
v = mapped !== void 0 ? BigInt(mapped) : BigInt(Number(p) || 0);
|
|
195
189
|
} else v = BigInt(p.bitfield);
|
|
196
190
|
acc |= v;
|
|
@@ -202,13 +196,13 @@ function resolvePermissionsToBitfield(perms) {
|
|
|
202
196
|
|
|
203
197
|
// src/MessageFlagsBitField.ts
|
|
204
198
|
var MessageFlagsBits = {
|
|
205
|
-
SuppressEmbeds:
|
|
199
|
+
SuppressEmbeds: 1n << 2n,
|
|
206
200
|
// 4
|
|
207
|
-
SuppressNotifications:
|
|
201
|
+
SuppressNotifications: 1n << 12n,
|
|
208
202
|
// 4096
|
|
209
|
-
VoiceMessage:
|
|
203
|
+
VoiceMessage: 1n << 13n,
|
|
210
204
|
// 8192
|
|
211
|
-
CompactAttachments:
|
|
205
|
+
CompactAttachments: 1n << 17n
|
|
212
206
|
// 131072
|
|
213
207
|
};
|
|
214
208
|
var MessageFlagsBitField = class extends BitField {
|
|
@@ -217,38 +211,37 @@ var MessageFlagsBitField = class extends BitField {
|
|
|
217
211
|
|
|
218
212
|
// src/UserFlagsBitField.ts
|
|
219
213
|
var UserFlagsBits = {
|
|
220
|
-
Staff:
|
|
221
|
-
CtpMember:
|
|
222
|
-
Partner:
|
|
223
|
-
BugHunter:
|
|
224
|
-
FriendlyBot:
|
|
225
|
-
FriendlyBotManualApproval:
|
|
226
|
-
HighGlobalRateLimit:
|
|
227
|
-
Deleted:
|
|
228
|
-
DisabledSuspiciousActivity:
|
|
229
|
-
SelfDeleted:
|
|
230
|
-
PremiumDiscriminator:
|
|
231
|
-
Disabled:
|
|
232
|
-
HasSessionStarted:
|
|
233
|
-
PremiumBadgeHidden:
|
|
234
|
-
PremiumBadgeMasked:
|
|
235
|
-
PremiumBadgeTimestampHidden:
|
|
236
|
-
PremiumBadgeSequenceHidden:
|
|
237
|
-
PremiumPerksSanitized:
|
|
238
|
-
PremiumPurchaseDisabled:
|
|
239
|
-
PremiumEnabledOverride:
|
|
240
|
-
RateLimitBypass:
|
|
241
|
-
ReportBanned:
|
|
242
|
-
VerifiedNotUnderage:
|
|
243
|
-
PendingManualVerification:
|
|
244
|
-
HasDismissedPremiumOnboarding:
|
|
245
|
-
UsedMobileClient:
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
StaffHidden: 2 ** 57
|
|
214
|
+
Staff: 1n << 0n,
|
|
215
|
+
CtpMember: 1n << 1n,
|
|
216
|
+
Partner: 1n << 2n,
|
|
217
|
+
BugHunter: 1n << 3n,
|
|
218
|
+
FriendlyBot: 1n << 4n,
|
|
219
|
+
FriendlyBotManualApproval: 1n << 5n,
|
|
220
|
+
HighGlobalRateLimit: 1n << 33n,
|
|
221
|
+
Deleted: 1n << 34n,
|
|
222
|
+
DisabledSuspiciousActivity: 1n << 35n,
|
|
223
|
+
SelfDeleted: 1n << 36n,
|
|
224
|
+
PremiumDiscriminator: 1n << 37n,
|
|
225
|
+
Disabled: 1n << 38n,
|
|
226
|
+
HasSessionStarted: 1n << 39n,
|
|
227
|
+
PremiumBadgeHidden: 1n << 40n,
|
|
228
|
+
PremiumBadgeMasked: 1n << 41n,
|
|
229
|
+
PremiumBadgeTimestampHidden: 1n << 42n,
|
|
230
|
+
PremiumBadgeSequenceHidden: 1n << 43n,
|
|
231
|
+
PremiumPerksSanitized: 1n << 44n,
|
|
232
|
+
PremiumPurchaseDisabled: 1n << 45n,
|
|
233
|
+
PremiumEnabledOverride: 1n << 46n,
|
|
234
|
+
RateLimitBypass: 1n << 47n,
|
|
235
|
+
ReportBanned: 1n << 48n,
|
|
236
|
+
VerifiedNotUnderage: 1n << 49n,
|
|
237
|
+
PendingManualVerification: 1n << 50n,
|
|
238
|
+
HasDismissedPremiumOnboarding: 1n << 51n,
|
|
239
|
+
UsedMobileClient: 1n << 52n,
|
|
240
|
+
AppStoreReviewer: 1n << 53n,
|
|
241
|
+
DmHistoryBackfilled: 1n << 54n,
|
|
242
|
+
HasRelationshipsIndexed: 1n << 55n,
|
|
243
|
+
MessagesByAuthorBackfilled: 1n << 56n,
|
|
244
|
+
StaffHidden: 1n << 57n
|
|
252
245
|
};
|
|
253
246
|
var UserFlagsBitField = class extends BitField {
|
|
254
247
|
static Flags = UserFlagsBits;
|
|
@@ -437,7 +430,6 @@ export {
|
|
|
437
430
|
MessageFlagsBitField,
|
|
438
431
|
MessageFlagsBits,
|
|
439
432
|
PermissionFlags,
|
|
440
|
-
PermissionFlagsMap,
|
|
441
433
|
PermissionsBitField,
|
|
442
434
|
SnowflakeUtil,
|
|
443
435
|
UserFlagsBitField,
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "1.2.
|
|
6
|
+
"version": "1.2.4",
|
|
7
7
|
"description": "Shared utilities for @fluxerjs/core",
|
|
8
8
|
"repository": {
|
|
9
9
|
"type": "git",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
],
|
|
21
21
|
"license": "Apache-2.0",
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@fluxerjs/types": "1.2.
|
|
23
|
+
"@fluxerjs/types": "1.2.4"
|
|
24
24
|
},
|
|
25
25
|
"main": "./dist/index.js",
|
|
26
26
|
"module": "./dist/index.mjs",
|