@wolfstar/plugin-gateway 0.2.0-next-20260926222321 → 0.2.0-next-20260927082257
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/README.md +7 -17
- package/dist/esm/index.d.ts +26 -296
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +26 -297
- package/dist/esm/index.js.map +1 -1
- package/package.json +5 -16
- package/dist/esm/rest.d.ts +0 -1
- package/dist/esm/rest.js +0 -3
- package/dist/esm/ws.d.ts +0 -1
- package/dist/esm/ws.js +0 -3
package/README.md
CHANGED
|
@@ -371,13 +371,13 @@ Mixin(MyTextChannel, [MyMixin]);
|
|
|
371
371
|
```
|
|
372
372
|
|
|
373
373
|
> [!NOTE]
|
|
374
|
-
> `Structure
|
|
375
|
-
> [`@discordjs/structures`](https://github.com/discordjs/discord.js/tree/main/packages/structures)
|
|
376
|
-
>
|
|
377
|
-
>
|
|
378
|
-
>
|
|
379
|
-
>
|
|
380
|
-
>
|
|
374
|
+
> `Structure` extends
|
|
375
|
+
> [`@discordjs/structures`](https://github.com/discordjs/discord.js/tree/main/packages/structures)'
|
|
376
|
+
> own base class. That package does not export the symbols keying a structure's data and its
|
|
377
|
+
> patch/clone methods, but creates them with `Symbol.for`, so `kData`, `kPatch`, and `kClone` are the
|
|
378
|
+
> very same symbols, re-exported for subclasses and mixins. It is only published as `dev` snapshots
|
|
379
|
+
> requiring Node.js 24.17 (hence this package's `engines`), and has no `Guild` nor `GuildMember`
|
|
380
|
+
> yet: the structures here are this package's own, following its conventions.
|
|
381
381
|
|
|
382
382
|
### Guilds, emojis, stickers and invites
|
|
383
383
|
|
|
@@ -603,16 +603,6 @@ const { items } = await client.messages.fetchPins(channelId);
|
|
|
603
603
|
const users = await message.reactions.resolve("🐺")?.users.fetch();
|
|
604
604
|
```
|
|
605
605
|
|
|
606
|
-
## Subpath exports
|
|
607
|
-
|
|
608
|
-
Like `@discordjs/next`, the gateway and REST libraries are re-exported, so a bot does not need to
|
|
609
|
-
depend on them directly:
|
|
610
|
-
|
|
611
|
-
| Import | Re-exports |
|
|
612
|
-
| ------------------------------- | ----------------- |
|
|
613
|
-
| `@wolfstar/plugin-gateway/rest` | `@discordjs/rest` |
|
|
614
|
-
| `@wolfstar/plugin-gateway/ws` | `@discordjs/ws` |
|
|
615
|
-
|
|
616
606
|
## Limitations
|
|
617
607
|
|
|
618
608
|
- A `GatewayClient` connects its gateway shards from a single process (`@discordjs/ws`'s
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -3,16 +3,9 @@ import { OptionalWebSocketManagerOptions, ShardRange, WebSocketManager } from "@
|
|
|
3
3
|
import { Client as Client$1 } from "@discordjs/core";
|
|
4
4
|
import { Awaitable, Cache, CacheEntityName, CacheEntityTypes, EntityCache, GatewaySessionStore } from "@wolfstar/plugin-cache";
|
|
5
5
|
import { APIApplication, APIApplicationCommand, APIAttachment, APIAuditLogChange, APIAutoModerationAction, APIAutoModerationRule, APIAutoModerationRuleTriggerMetadata, APIAvatarDecorationData, APIChannel, APIChannelMention, APICollectibles, APIEmbed, APIEmbedAuthor, APIEmbedField, APIEmbedFooter, APIEmbedImage, APIEmbedProvider, APIEmbedThumbnail, APIEmbedVideo, APIEmoji, APIExtendedInvite, APIGuild, APIGuildForumDefaultReactionEmoji, APIGuildForumTag, APIGuildMember, APIGuildOnboarding, APIGuildOnboardingPrompt, APIGuildOnboardingPromptOption, APIGuildPreview, APIGuildScheduledEvent, APIGuildScheduledEventEntityMetadata, APIGuildScheduledEventRecurrenceRule, APIGuildWelcomeScreen, APIGuildWidget, APIGuildWidgetMember, APIIncidentsData, APIInviteChannel, APIInviteGuild, APIMessage, APIOverwrite, APIPartialEmoji, APIPoll, APIPollAnswer, APIReaction, APIRole, APIRoleTags, APISoundboardSound, APIStageInstance, APISticker, APIStickerPack, APITemplate, APIThreadChannel, APIThreadMember, APIUser, APIUserPrimaryGuild, APIVoiceRegion, APIWebhook, ActivityFlags, ActivityType, AttachmentFlags, AuditLogEvent, AutoModerationRuleEventType, AutoModerationRuleKeywordPresetType, AutoModerationRuleTriggerType, ChannelFlags, ChannelType, ForumLayoutType, GatewayActivity, GatewayActivityAssets, GatewayActivityUpdateData, GatewayAutoModerationActionExecutionDispatchData, GatewayChannelPinsUpdateDispatchData, GatewayDispatchEvents, GatewayDispatchPayload, GatewayGuildDeleteDispatchData, GatewayGuildIntegrationsUpdateDispatchData, GatewayGuildMemberRemoveDispatchData, GatewayGuildMembersChunkDispatchData, GatewayGuildRoleDeleteDispatchData, GatewayGuildScheduledEventUserAddDispatchData, GatewayGuildScheduledEventUserRemoveDispatchData, GatewayGuildSoundboardSoundDeleteDispatchData, GatewayIntegrationDeleteDispatchData, GatewayIntentBits, GatewayInviteCreateDispatchData, GatewayInviteDeleteDispatchData, GatewayMessageDeleteBulkDispatchData, GatewayMessageDeleteDispatchData, GatewayMessageReactionRemoveAllDispatchData, GatewayPresenceClientStatus, GatewayPresenceUpdateData, GatewayRateLimitedDispatchData, GatewayReadyDispatchData, GatewayThreadDeleteDispatchData, GatewayThreadListSync, GatewayThreadMembersUpdateDispatchData, GatewayTypingStartDispatchData, GatewayVoiceServerUpdateDispatchData, GatewayWebhooksUpdateDispatchData, GuildDefaultMessageNotifications, GuildExplicitContentFilter, GuildMemberFlags, GuildOnboardingMode, GuildOnboardingPromptType, GuildPremiumTier, GuildScheduledEventEntityType, GuildScheduledEventPrivacyLevel, GuildScheduledEventStatus, GuildSystemChannelFlags, GuildVerificationLevel, GuildWidgetStyle, InviteTargetType, InviteType, Locale, MessageFlags, MessageType, OverwriteType, PermissionFlagsBits, PresenceUpdateReceiveStatus, PresenceUpdateStatus, RESTGetAPIGuildVanityUrlResult, RESTPatchAPIChannelJSONBody, RESTPatchAPIChannelMessageJSONBody, RESTPatchAPIGuildJSONBody, RESTPatchAPIWebhookWithTokenMessageJSONBody, RESTPostAPIChannelMessageJSONBody, RESTPostAPIGuildsJSONBody, RESTPostAPIWebhookWithTokenJSONBody, ReactionType, RoleFlags, Snowflake, SortOrderType, StageInstancePrivacyLevel, StickerFormatType, ThreadAutoArchiveDuration, ThreadChannelType, UserFlags, VideoQualityMode, WebhookType } from "discord-api-types/v10";
|
|
6
|
+
import { ActivityFlagsBitField as ActivityFlagsBitField$1, AttachmentFlagsBitField as AttachmentFlagsBitField$1, BitField, BitField as BitField$1, BitFieldResolvable, BitFieldResolvable as BitFieldResolvable$1, ChannelFlagsBitField as ChannelFlagsBitField$1, MessageFlagsBitField as MessageFlagsBitField$1, Partialize, PermissionsBitField, Structure as Structure$1 } from "@discordjs/structures";
|
|
6
7
|
import { BaseImageURLOptions, EmojiURLOptions, ImageURLOptions, RawFile } from "@discordjs/rest";
|
|
7
8
|
//#region src/structures/Structure.d.ts
|
|
8
|
-
/*!
|
|
9
|
-
* The base of `Structure` (its data template, constructor, `kPatch`, `kClone`, `optimizeData`, and `toJSON`) is adapted
|
|
10
|
-
* from `@discordjs/structures`' `Structure` (https://github.com/discordjs/discord.js/tree/main/packages/structures),
|
|
11
|
-
* Copyright 2023 Noel Buechler and Chai Kohen, licensed under the Apache License, Version 2.0
|
|
12
|
-
* (https://www.apache.org/licenses/LICENSE-2.0). Changed from the original: merged into this package's `Structure`,
|
|
13
|
-
* which adds relations and parsed timestamps, with `kPatch` and `kClone` made public and the mixin constructor hook
|
|
14
|
-
* dropped.
|
|
15
|
-
*/
|
|
16
9
|
/**
|
|
17
10
|
* The symbol under which a {@link Structure} stores its raw API data, shared with `@discordjs/structures`.
|
|
18
11
|
*/
|
|
@@ -31,26 +24,18 @@ export declare const kClone: unique symbol;
|
|
|
31
24
|
*/
|
|
32
25
|
export declare const kRelations: unique symbol;
|
|
33
26
|
/**
|
|
34
|
-
* The base class every structure extends
|
|
35
|
-
*
|
|
27
|
+
* The base class every structure extends: `@discordjs/structures`' `Structure`, with its data and patch/clone methods
|
|
28
|
+
* made reachable from subclasses outside of discord.js.
|
|
36
29
|
*
|
|
37
30
|
* @remarks
|
|
38
31
|
* Structures never hold a reference to a client, so they can be built from any raw payload, be it a gateway dispatch,
|
|
39
32
|
* a cache hit, or a REST response.
|
|
40
33
|
*
|
|
41
34
|
* @typeParam Data The raw API data this structure wraps.
|
|
42
|
-
* @typeParam
|
|
43
|
-
* constructor with.
|
|
35
|
+
* @typeParam Omitted The keys the structure's `DataTemplate` strips from the stored data.
|
|
44
36
|
*/
|
|
45
|
-
export declare abstract class Structure<Data extends object,
|
|
37
|
+
export declare abstract class Structure<Data extends object, Omitted extends keyof Data | "" = ""> extends Structure$1<Data, Omitted> {
|
|
46
38
|
#private;
|
|
47
|
-
/**
|
|
48
|
-
* The template used for removing data from the raw data stored for each structure.
|
|
49
|
-
*
|
|
50
|
-
* @remarks This template should be overridden in all subclasses to provide more accurate type information.
|
|
51
|
-
* The template in the base {@link Structure} class will have no effect on most subclasses for this reason.
|
|
52
|
-
*/
|
|
53
|
-
protected static readonly DataTemplate: Record<string, unknown>;
|
|
54
39
|
/**
|
|
55
40
|
* The raw API data of this structure.
|
|
56
41
|
*/
|
|
@@ -67,21 +52,6 @@ export declare abstract class Structure<Data extends object, _Omitted extends ke
|
|
|
67
52
|
* @param relations The related structures, resolved from the cache by the structure's manager.
|
|
68
53
|
*/
|
|
69
54
|
constructor(data: Readonly<Partial<Data>>, relations?: object);
|
|
70
|
-
/**
|
|
71
|
-
* @returns A cloned version of the data template, ready to create a new data object.
|
|
72
|
-
*/
|
|
73
|
-
private getDataTemplate;
|
|
74
|
-
/**
|
|
75
|
-
* Stores raw data in optimized formats, used in tandem with a data template. Called by the constructor and by
|
|
76
|
-
* `kPatch`.
|
|
77
|
-
*
|
|
78
|
-
* @example `created_timestamp` is an ISO string, which can be stored in optimized form as a number.
|
|
79
|
-
* @param _data The raw data received from the API to optimize.
|
|
80
|
-
* @remarks Implemented in subclasses and mixins where needed; mixins must use the closest ancestor's access modifier.
|
|
81
|
-
* When implementing it, call `super.optimizeData` if any class in the super chain aside from {@link Structure}
|
|
82
|
-
* implements it. Mixins never need to, as `Mixin` walks the prototype chain.
|
|
83
|
-
*/
|
|
84
|
-
protected optimizeData(_data: Partial<Data>): void;
|
|
85
55
|
/** Parses a timestamp once when constructing or patching a structure. */
|
|
86
56
|
protected optimizeTimestamp(key: string, value: string | null | undefined): void;
|
|
87
57
|
/** Gets a timestamp previously parsed by `optimizeData`. */
|
|
@@ -100,14 +70,6 @@ export declare abstract class Structure<Data extends object, _Omitted extends ke
|
|
|
100
70
|
* @returns The copy.
|
|
101
71
|
*/
|
|
102
72
|
[kClone](patch?: Readonly<Partial<Data>>): this;
|
|
103
|
-
/**
|
|
104
|
-
* Transforms this structure to its JSON format, with raw API data (or close to it), automatically called by
|
|
105
|
-
* `JSON.stringify()` when this structure is stringified.
|
|
106
|
-
*
|
|
107
|
-
* @remarks
|
|
108
|
-
* The type of this data is determined by omissions at runtime and is only guaranteed for default omissions.
|
|
109
|
-
*/
|
|
110
|
-
toJSON(): Data;
|
|
111
73
|
/**
|
|
112
74
|
* Forgets resolved relations, e.g. when a patch carries fresher data for them.
|
|
113
75
|
*
|
|
@@ -186,118 +148,6 @@ export declare class AnonymousGuild<Data extends AnonymousGuildData = AnonymousG
|
|
|
186
148
|
toString(): string;
|
|
187
149
|
}
|
|
188
150
|
//#endregion
|
|
189
|
-
//#region src/util/BitField.d.ts
|
|
190
|
-
/*!
|
|
191
|
-
* Adapted from `@discordjs/structures`' `BitField` (https://github.com/discordjs/discord.js/tree/main/packages/structures),
|
|
192
|
-
* Copyright 2023 Noel Buechler and Chai Kohen, licensed under the Apache License, Version 2.0
|
|
193
|
-
* (https://www.apache.org/licenses/LICENSE-2.0). Changed from the original: restyled, and its type helpers inlined.
|
|
194
|
-
*/
|
|
195
|
-
interface RecursiveReadonlyArray<ItemType> extends ReadonlyArray<ItemType | RecursiveReadonlyArray<ItemType>> {}
|
|
196
|
-
type EnumLike<Enum, Value> = Record<keyof Enum, Value>;
|
|
197
|
-
type NonAbstract<Type extends abstract new (...args: any) => any> = Type extends (abstract new (...args: infer Args) => infer Instance) ? Pick<Type, keyof Type> & (new (...args: Args) => Instance) : never;
|
|
198
|
-
/**
|
|
199
|
-
* Data that can be resolved to give a bit field. This can be:
|
|
200
|
-
* A bit number (this can be a number literal or a value taken from {@link (BitField:class).Flags})
|
|
201
|
-
* A string bit number
|
|
202
|
-
* An instance of BitField
|
|
203
|
-
* An Array of BitFieldResolvable
|
|
204
|
-
*/
|
|
205
|
-
export type BitFieldResolvable<Flags extends string> = Flags | Readonly<BitField<Flags>> | RecursiveReadonlyArray<Flags | Readonly<BitField<Flags>> | bigint | number | `${bigint}`> | bigint | number | `${bigint}`;
|
|
206
|
-
/**
|
|
207
|
-
* Data structure that makes it easy to interact with a bit field.
|
|
208
|
-
*/
|
|
209
|
-
export declare abstract class BitField<Flags extends string> {
|
|
210
|
-
/**
|
|
211
|
-
* Numeric bit field flags.
|
|
212
|
-
*
|
|
213
|
-
* @remarks Defined in extension classes
|
|
214
|
-
*/
|
|
215
|
-
static readonly Flags: EnumLike<unknown, bigint | number>;
|
|
216
|
-
static readonly DefaultBit: bigint;
|
|
217
|
-
/**
|
|
218
|
-
* Bitfield of the packed bits
|
|
219
|
-
*/
|
|
220
|
-
bitField: bigint;
|
|
221
|
-
["constructor"]: NonAbstract<typeof BitField<Flags>>;
|
|
222
|
-
/**
|
|
223
|
-
* @param bits - Bit(s) to read from
|
|
224
|
-
*/
|
|
225
|
-
constructor(bits?: BitFieldResolvable<Flags>);
|
|
226
|
-
/**
|
|
227
|
-
* Checks whether the bit field has a bit, or any of multiple bits.
|
|
228
|
-
*
|
|
229
|
-
* @param bit - Bit(s) to check for
|
|
230
|
-
* @returns Whether the bit field has the bit(s)
|
|
231
|
-
*/
|
|
232
|
-
any(bit: BitFieldResolvable<Flags>): boolean;
|
|
233
|
-
/**
|
|
234
|
-
* Checks if this bit field equals another
|
|
235
|
-
*
|
|
236
|
-
* @param bit - Bit(s) to check for
|
|
237
|
-
* @returns Whether this bit field equals the other
|
|
238
|
-
*/
|
|
239
|
-
equals(bit: BitFieldResolvable<Flags>): boolean;
|
|
240
|
-
/**
|
|
241
|
-
* Checks whether the bit field has a bit, or multiple bits.
|
|
242
|
-
*
|
|
243
|
-
* @param bit - Bit(s) to check for
|
|
244
|
-
* @returns Whether the bit field has the bit(s)
|
|
245
|
-
*/
|
|
246
|
-
has(bit: BitFieldResolvable<Flags>, ..._hasParams: unknown[]): boolean;
|
|
247
|
-
/**
|
|
248
|
-
* Gets all given bits that are missing from the bit field.
|
|
249
|
-
*
|
|
250
|
-
* @param bits - Bit(s) to check for
|
|
251
|
-
* @param hasParams - Additional parameters for the has method, if any
|
|
252
|
-
* @returns A bit field containing the missing bits
|
|
253
|
-
*/
|
|
254
|
-
missing(bits: BitFieldResolvable<Flags>, ...hasParams: readonly unknown[]): Flags[];
|
|
255
|
-
/**
|
|
256
|
-
* Freezes these bits, making them immutable.
|
|
257
|
-
*
|
|
258
|
-
* @returns This bit field but frozen
|
|
259
|
-
*/
|
|
260
|
-
freeze(): Readonly<this>;
|
|
261
|
-
/**
|
|
262
|
-
* Adds bits to these ones.
|
|
263
|
-
*
|
|
264
|
-
* @param bits - Bits to add
|
|
265
|
-
* @returns These bits or new BitField if the instance is frozen.
|
|
266
|
-
*/
|
|
267
|
-
add(...bits: BitFieldResolvable<Flags>[]): BitField<Flags>;
|
|
268
|
-
/**
|
|
269
|
-
* Removes bits from these.
|
|
270
|
-
*
|
|
271
|
-
* @param bits - Bits to remove
|
|
272
|
-
* @returns These bits or new BitField if the instance is frozen.
|
|
273
|
-
*/
|
|
274
|
-
remove(...bits: BitFieldResolvable<Flags>[]): BitField<Flags>;
|
|
275
|
-
/**
|
|
276
|
-
* Gets an object mapping field names to a boolean indicating whether the bit is available.
|
|
277
|
-
*
|
|
278
|
-
* @param hasParams - Additional parameters for the has method, if any
|
|
279
|
-
* @returns An object mapping field names to a boolean indicating whether the bit is available
|
|
280
|
-
*/
|
|
281
|
-
serialize(...hasParams: readonly unknown[]): Partial<Record<keyof Flags, boolean>>;
|
|
282
|
-
/**
|
|
283
|
-
* Gets an Array of bit field names based on the bits available.
|
|
284
|
-
*
|
|
285
|
-
* @param hasParams - Additional parameters for the has method, if any
|
|
286
|
-
* @returns An Array of bit field names
|
|
287
|
-
*/
|
|
288
|
-
toArray(...hasParams: readonly unknown[]): Flags[];
|
|
289
|
-
toJSON(asNumber?: boolean): string | number;
|
|
290
|
-
valueOf(): bigint;
|
|
291
|
-
[Symbol.iterator](...hasParams: unknown[]): Generator<Flags, void, unknown>;
|
|
292
|
-
/**
|
|
293
|
-
* Resolves bit fields to their numeric form.
|
|
294
|
-
*
|
|
295
|
-
* @param bit - bit(s) to resolve
|
|
296
|
-
* @returns the numeric value of the bit fields
|
|
297
|
-
*/
|
|
298
|
-
static resolve<Flags extends string = string>(bit: BitFieldResolvable<Flags>): bigint;
|
|
299
|
-
}
|
|
300
|
-
//#endregion
|
|
301
151
|
//#region src/util/PermissionsBitField.d.ts
|
|
302
152
|
/**
|
|
303
153
|
* The name of any permission.
|
|
@@ -306,116 +156,7 @@ export type PermissionsString = keyof typeof PermissionFlagsBits;
|
|
|
306
156
|
/**
|
|
307
157
|
* Anything a `PermissionsBitField` can be built from.
|
|
308
158
|
*/
|
|
309
|
-
export type PermissionResolvable = BitFieldResolvable<PermissionsString>;
|
|
310
|
-
/**
|
|
311
|
-
* Data structure that makes it easy to interact with a permission bit field. All {@link GuildMember}s have a set of
|
|
312
|
-
* permissions in their guild, and each channel in the guild may also have {@link PermissionOverwrites} for the member
|
|
313
|
-
* that override their default permissions.
|
|
314
|
-
*/
|
|
315
|
-
export declare class PermissionsBitField extends BitField<PermissionsString> {
|
|
316
|
-
/**
|
|
317
|
-
* Numeric permission flags.
|
|
318
|
-
*
|
|
319
|
-
* @see {@link https://discord.com/developers/docs/topics/permissions#permissions-bitwise-permission-flags}
|
|
320
|
-
*/
|
|
321
|
-
static Flags: {
|
|
322
|
-
readonly CreateInstantInvite: bigint;
|
|
323
|
-
readonly KickMembers: bigint;
|
|
324
|
-
readonly BanMembers: bigint;
|
|
325
|
-
readonly Administrator: bigint;
|
|
326
|
-
readonly ManageChannels: bigint;
|
|
327
|
-
readonly ManageGuild: bigint;
|
|
328
|
-
readonly AddReactions: bigint;
|
|
329
|
-
readonly ViewAuditLog: bigint;
|
|
330
|
-
readonly PrioritySpeaker: bigint;
|
|
331
|
-
readonly Stream: bigint;
|
|
332
|
-
readonly ViewChannel: bigint;
|
|
333
|
-
readonly SendMessages: bigint;
|
|
334
|
-
readonly SendTTSMessages: bigint;
|
|
335
|
-
readonly ManageMessages: bigint;
|
|
336
|
-
readonly EmbedLinks: bigint;
|
|
337
|
-
readonly AttachFiles: bigint;
|
|
338
|
-
readonly ReadMessageHistory: bigint;
|
|
339
|
-
readonly MentionEveryone: bigint;
|
|
340
|
-
readonly UseExternalEmojis: bigint;
|
|
341
|
-
readonly ViewGuildInsights: bigint;
|
|
342
|
-
readonly Connect: bigint;
|
|
343
|
-
readonly Speak: bigint;
|
|
344
|
-
readonly MuteMembers: bigint;
|
|
345
|
-
readonly DeafenMembers: bigint;
|
|
346
|
-
readonly MoveMembers: bigint;
|
|
347
|
-
readonly UseVAD: bigint;
|
|
348
|
-
readonly ChangeNickname: bigint;
|
|
349
|
-
readonly ManageNicknames: bigint;
|
|
350
|
-
readonly ManageRoles: bigint;
|
|
351
|
-
readonly ManageWebhooks: bigint;
|
|
352
|
-
readonly ManageEmojisAndStickers: bigint;
|
|
353
|
-
readonly ManageGuildExpressions: bigint;
|
|
354
|
-
readonly UseApplicationCommands: bigint;
|
|
355
|
-
readonly RequestToSpeak: bigint;
|
|
356
|
-
readonly ManageEvents: bigint;
|
|
357
|
-
readonly ManageThreads: bigint;
|
|
358
|
-
readonly CreatePublicThreads: bigint;
|
|
359
|
-
readonly CreatePrivateThreads: bigint;
|
|
360
|
-
readonly UseExternalStickers: bigint;
|
|
361
|
-
readonly SendMessagesInThreads: bigint;
|
|
362
|
-
readonly UseEmbeddedActivities: bigint;
|
|
363
|
-
readonly ModerateMembers: bigint;
|
|
364
|
-
readonly ViewCreatorMonetizationAnalytics: bigint;
|
|
365
|
-
readonly UseSoundboard: bigint;
|
|
366
|
-
readonly CreateGuildExpressions: bigint;
|
|
367
|
-
readonly CreateEvents: bigint;
|
|
368
|
-
readonly UseExternalSounds: bigint;
|
|
369
|
-
readonly SendVoiceMessages: bigint;
|
|
370
|
-
readonly SetVoiceChannelStatus: bigint;
|
|
371
|
-
readonly SendPolls: bigint;
|
|
372
|
-
readonly UseExternalApps: bigint;
|
|
373
|
-
readonly PinMessages: bigint;
|
|
374
|
-
readonly BypassSlowmode: bigint;
|
|
375
|
-
};
|
|
376
|
-
/**
|
|
377
|
-
* Bit field representing every permission combined
|
|
378
|
-
*/
|
|
379
|
-
static readonly All: bigint;
|
|
380
|
-
/**
|
|
381
|
-
* Bit field representing the default permissions for users
|
|
382
|
-
*/
|
|
383
|
-
static readonly Default = 104324673n;
|
|
384
|
-
/**
|
|
385
|
-
* Bit field representing the permissions required for moderators of stage channels
|
|
386
|
-
*/
|
|
387
|
-
static readonly StageModerator: bigint;
|
|
388
|
-
/**
|
|
389
|
-
* Gets all given bits that are missing from the bit field.
|
|
390
|
-
*
|
|
391
|
-
* @param bits - Bit(s) to check for
|
|
392
|
-
* @param checkAdmin - Whether to allow the administrator permission to override
|
|
393
|
-
* @returns A bit field containing the missing permissions
|
|
394
|
-
*/
|
|
395
|
-
missing(bits: PermissionResolvable, checkAdmin?: boolean): PermissionsString[];
|
|
396
|
-
/**
|
|
397
|
-
* Checks whether the bit field has a permission, or any of multiple permissions.
|
|
398
|
-
*
|
|
399
|
-
* @param permission - Permission(s) to check for
|
|
400
|
-
* @param checkAdmin - Whether to allow the administrator permission to override
|
|
401
|
-
* @returns Whether the bit field has the permission(s)
|
|
402
|
-
*/
|
|
403
|
-
any(permission: PermissionResolvable, checkAdmin?: boolean): boolean;
|
|
404
|
-
/**
|
|
405
|
-
* Checks whether the bit field has a permission, or multiple permissions.
|
|
406
|
-
*
|
|
407
|
-
* @param permission - Permission(s) to check for
|
|
408
|
-
* @param checkAdmin - Whether to allow the administrator permission to override
|
|
409
|
-
* @returns Whether the bit field has the permission(s)
|
|
410
|
-
*/
|
|
411
|
-
has(permission: PermissionResolvable, checkAdmin?: boolean): boolean;
|
|
412
|
-
/**
|
|
413
|
-
* Gets an Array of bitfield names based on the permissions available.
|
|
414
|
-
*
|
|
415
|
-
* @returns An Array of permission names
|
|
416
|
-
*/
|
|
417
|
-
toArray(): PermissionsString[];
|
|
418
|
-
}
|
|
159
|
+
export type PermissionResolvable = BitFieldResolvable$1<PermissionsString>;
|
|
419
160
|
//#endregion
|
|
420
161
|
//#region src/util/channels.d.ts
|
|
421
162
|
/**
|
|
@@ -897,44 +638,44 @@ export declare class AutoModerationRuleManager extends CachedManager<"autoModera
|
|
|
897
638
|
/**
|
|
898
639
|
* A 32-bit flags bitfield, resolving flag names to `bigint`s and serializing to a `number`.
|
|
899
640
|
*/
|
|
900
|
-
export declare abstract class NumberFlagsBitField<Flags extends string> extends BitField<Flags> {
|
|
901
|
-
static resolve<Flags extends string = string>(bit: BitFieldResolvable<Flags>): bigint;
|
|
641
|
+
export declare abstract class NumberFlagsBitField<Flags extends string> extends BitField$1<Flags> {
|
|
642
|
+
static resolve<Flags extends string = string>(bit: BitFieldResolvable$1<Flags>): bigint;
|
|
902
643
|
toJSON(): number;
|
|
903
644
|
}
|
|
904
645
|
export type ActivityFlagsString = keyof typeof ActivityFlags;
|
|
905
|
-
export type ActivityFlagsResolvable = BitFieldResolvable<ActivityFlagsString>;
|
|
646
|
+
export type ActivityFlagsResolvable = BitFieldResolvable$1<ActivityFlagsString>;
|
|
906
647
|
/**
|
|
907
648
|
* The flags of a presence activity.
|
|
908
649
|
*/
|
|
909
|
-
export declare class ActivityFlagsBitField extends
|
|
910
|
-
static
|
|
650
|
+
export declare class ActivityFlagsBitField extends ActivityFlagsBitField$1 {
|
|
651
|
+
static resolve<Flags extends string = string>(bit: BitFieldResolvable$1<Flags>): bigint;
|
|
911
652
|
}
|
|
912
653
|
export type AttachmentFlagsString = keyof typeof AttachmentFlags;
|
|
913
|
-
export type AttachmentFlagsResolvable = BitFieldResolvable<AttachmentFlagsString>;
|
|
654
|
+
export type AttachmentFlagsResolvable = BitFieldResolvable$1<AttachmentFlagsString>;
|
|
914
655
|
/**
|
|
915
656
|
* The flags of a message attachment.
|
|
916
657
|
*/
|
|
917
|
-
export declare class AttachmentFlagsBitField extends
|
|
918
|
-
static
|
|
658
|
+
export declare class AttachmentFlagsBitField extends AttachmentFlagsBitField$1 {
|
|
659
|
+
static resolve<Flags extends string = string>(bit: BitFieldResolvable$1<Flags>): bigint;
|
|
919
660
|
}
|
|
920
661
|
export type ChannelFlagsString = keyof typeof ChannelFlags;
|
|
921
|
-
export type ChannelFlagsResolvable = BitFieldResolvable<ChannelFlagsString>;
|
|
662
|
+
export type ChannelFlagsResolvable = BitFieldResolvable$1<ChannelFlagsString>;
|
|
922
663
|
/**
|
|
923
664
|
* The flags of a channel.
|
|
924
665
|
*/
|
|
925
|
-
export declare class ChannelFlagsBitField extends
|
|
926
|
-
static
|
|
666
|
+
export declare class ChannelFlagsBitField extends ChannelFlagsBitField$1 {
|
|
667
|
+
static resolve<Flags extends string = string>(bit: BitFieldResolvable$1<Flags>): bigint;
|
|
927
668
|
}
|
|
928
669
|
export type MessageFlagsString = keyof typeof MessageFlags;
|
|
929
|
-
export type MessageFlagsResolvable = BitFieldResolvable<MessageFlagsString>;
|
|
670
|
+
export type MessageFlagsResolvable = BitFieldResolvable$1<MessageFlagsString>;
|
|
930
671
|
/**
|
|
931
672
|
* The flags of a message.
|
|
932
673
|
*/
|
|
933
|
-
export declare class MessageFlagsBitField extends
|
|
934
|
-
static
|
|
674
|
+
export declare class MessageFlagsBitField extends MessageFlagsBitField$1 {
|
|
675
|
+
static resolve<Flags extends string = string>(bit: BitFieldResolvable$1<Flags>): bigint;
|
|
935
676
|
}
|
|
936
677
|
export type GuildMemberFlagsString = keyof typeof GuildMemberFlags;
|
|
937
|
-
export type GuildMemberFlagsResolvable = BitFieldResolvable<GuildMemberFlagsString>;
|
|
678
|
+
export type GuildMemberFlagsResolvable = BitFieldResolvable$1<GuildMemberFlagsString>;
|
|
938
679
|
/**
|
|
939
680
|
* The flags of a guild member.
|
|
940
681
|
*/
|
|
@@ -942,7 +683,7 @@ export declare class GuildMemberFlagsBitField extends NumberFlagsBitField<GuildM
|
|
|
942
683
|
static readonly Flags: typeof GuildMemberFlags;
|
|
943
684
|
}
|
|
944
685
|
export type IntentsString = keyof typeof GatewayIntentBits;
|
|
945
|
-
export type IntentsResolvable = BitFieldResolvable<IntentsString>;
|
|
686
|
+
export type IntentsResolvable = BitFieldResolvable$1<IntentsString>;
|
|
946
687
|
/**
|
|
947
688
|
* The gateway intents to identify with.
|
|
948
689
|
*/
|
|
@@ -950,7 +691,7 @@ export declare class IntentsBitField extends NumberFlagsBitField<IntentsString>
|
|
|
950
691
|
static readonly Flags: typeof GatewayIntentBits;
|
|
951
692
|
}
|
|
952
693
|
export type RoleFlagsString = keyof typeof RoleFlags;
|
|
953
|
-
export type RoleFlagsResolvable = BitFieldResolvable<RoleFlagsString>;
|
|
694
|
+
export type RoleFlagsResolvable = BitFieldResolvable$1<RoleFlagsString>;
|
|
954
695
|
/**
|
|
955
696
|
* The flags of a role.
|
|
956
697
|
*/
|
|
@@ -958,7 +699,7 @@ export declare class RoleFlagsBitField extends NumberFlagsBitField<RoleFlagsStri
|
|
|
958
699
|
static readonly Flags: typeof RoleFlags;
|
|
959
700
|
}
|
|
960
701
|
export type SystemChannelFlagsString = keyof typeof GuildSystemChannelFlags;
|
|
961
|
-
export type SystemChannelFlagsResolvable = BitFieldResolvable<SystemChannelFlagsString>;
|
|
702
|
+
export type SystemChannelFlagsResolvable = BitFieldResolvable$1<SystemChannelFlagsString>;
|
|
962
703
|
/**
|
|
963
704
|
* The flags of a guild's system channel, deciding which system messages are suppressed.
|
|
964
705
|
*/
|
|
@@ -966,7 +707,7 @@ export declare class SystemChannelFlagsBitField extends NumberFlagsBitField<Syst
|
|
|
966
707
|
static readonly Flags: typeof GuildSystemChannelFlags;
|
|
967
708
|
}
|
|
968
709
|
export type UserFlagsString = keyof typeof UserFlags;
|
|
969
|
-
export type UserFlagsResolvable = BitFieldResolvable<UserFlagsString>;
|
|
710
|
+
export type UserFlagsResolvable = BitFieldResolvable$1<UserFlagsString>;
|
|
970
711
|
/**
|
|
971
712
|
* The flags (badges) of a user.
|
|
972
713
|
*/
|
|
@@ -1678,17 +1419,6 @@ export declare class RoleManager extends CachedManager<"roles", Role, [guildId:
|
|
|
1678
1419
|
private store;
|
|
1679
1420
|
}
|
|
1680
1421
|
//#endregion
|
|
1681
|
-
//#region src/util/types.d.ts
|
|
1682
|
-
/*!
|
|
1683
|
-
* `Partialize` is adapted from `@discordjs/structures` (https://github.com/discordjs/discord.js/tree/main/packages/structures),
|
|
1684
|
-
* Copyright 2023 Noel Buechler and Chai Kohen, licensed under the Apache License, Version 2.0
|
|
1685
|
-
* (https://www.apache.org/licenses/LICENSE-2.0).
|
|
1686
|
-
*/
|
|
1687
|
-
/**
|
|
1688
|
-
* `Type`, with the `Omitted` keys made optional: the data a structure omitting them from its `DataTemplate` accepts.
|
|
1689
|
-
*/
|
|
1690
|
-
type Partialize<Type, Omitted extends keyof Type | ""> = Omit<Type, Omitted> & Partial<Pick<Type, Exclude<Omitted, "">>>;
|
|
1691
|
-
//#endregion
|
|
1692
1422
|
//#region src/structures/Role.d.ts
|
|
1693
1423
|
/**
|
|
1694
1424
|
* The colors of a role: `primaryColor` alone for a solid color, with `secondaryColor` for a gradient, and with
|
|
@@ -7967,5 +7697,5 @@ export declare function computeTargetPermissions(guildId: Snowflake, overwrites:
|
|
|
7967
7697
|
*/
|
|
7968
7698
|
export declare function computePermissionsIn(channel: AnyChannel | Snowflake, target: GuildMember | Role | Snowflake): Promise<PermissionsBitField>;
|
|
7969
7699
|
//#endregion
|
|
7970
|
-
export type
|
|
7700
|
+
export { BitField, type BitFieldResolvable, type GatewayEventMap, type GatewayEventName, type MessageReactionEventDetails, PermissionsBitField, type RawAPIType, type StructureCreator, type isPromiseLike, type whenAll };
|
|
7971
7701
|
//# sourceMappingURL=index.d.ts.map
|