@wolfstar/plugin-gateway. The plugin extends the @wolfstar/http-framework client with Discord gateway events, structures, and API managers. For the weekly summary across all packages, see the changelog overview.
0.16.0 (2026-10-20)
New features
- Own
stars.configkey — The module setsmeta.configKey, so you can write its options under the top-levelgatewaykey ofstars.configinstead of the[specifier, options]tuple ofmodules. The tuple still works and is merged over the key. The key is typed indefineConfigonce the module is imported instars.config.ts.gatewaytakes no options yet and only reserves its name. (#259)
Updates
- New optional peer —
@wolfstar/schema(^0.9.0) is a new optional peer that carries theStarsConfigtype the keys extend. - Dependencies — Updated
@wolfstar/plugin-cacheto0.8.0.
Migration
@wolfstar/kitpeer raised — The@wolfstar/kitpeer range moves from^0.1.0to^0.2.0, the first version that readsconfigKey. If your project uses@wolfstar/kit0.1, update it.
0.15.0 (2026-10-17)
New features
- Application command managers —
client.application.commands(ApplicationCommandManager) andguild.commands(GuildApplicationCommandManager, a new instance on every access, alsoclient.guilds.commands(guildId)) are fetch-only, likeWebhookManager. They havefetch,create,set,edit,delete,commandPath, and the statictransformCommand, which accepts camel-cased data, raw payloads, and builders.set()is a bulk overwrite that replaces what@wolfstar/http-frameworkregistered, and nothing calls it for you. (#252) ApplicationCommand— Has the command’s fields,edit(), theset*()helpers,delete(),permissions,equals(command, enforceOptionOrder?)(falsefor a foreign argument), and the staticoptionsEqual()andtransformOption().- Command permissions —
ApplicationCommandPermissionsManagerhasfetchandhas, plusset,add, andremove, which take an explicit bearertoken(no OAuth handling). It reads through theapplicationCommandPermissionscache, kept up to date byAPPLICATION_COMMAND_PERMISSIONS_UPDATE.GatewayErrorgains theApplicationCommandPermissionsTokenMissingandGlobalCommandPermissionscodes. - Application emojis —
client.application.emojisis a fetch-onlyApplicationEmojiManagerfor emojis owned by the application rather than a guild.fetch()lists them in aCollectionandfetch(id)gets one, withcreate,edit,delete, andfetchAuthor. Nothing is cached, because Discord sends no event for these emojis.ApplicationEmojiextendsEmojiwithauthor,application,edit,setName,delete,fetchAuthor, andequals, which compares only the ID, name, andanimated. (#250) - Entitlements —
client.application.entitlementsis anEntitlementManager, cached fromENTITLEMENT_CREATE,ENTITLEMENT_UPDATE, andENTITLEMENT_DELETE, which emit the newentitlementCreate,entitlementUpdate, andentitlementDeleteevents. It hasfetch()for one entitlement or a filteredCollection,createTest(),deleteTest(), andconsume(). (#253) - SKUs and subscriptions —
client.application.fetchSKUs()returns the application’sSKUs.sku.subscriptions(orclient.application.subscriptions(sku)) is a fetch-onlySubscriptionManager. Adds theEntitlement,SKU, andSubscriptionstructures,SKUFlagsBitField, and theEntitlementCreateInvalidOwnererror. RegisterAsDispatchListener— ARegisterAsGatewayListenerwhose listener runs on one process only: the workers while the gateway client forwards dispatches, the gateway client otherwise. A bot loading the same pieces on both no longer handles each dispatch twice.GatewayClientgainsforwardsDispatchesandmarkDispatchesForwarded().DispatchEventName,GatewayOnlyEventName, andgatewayOnlyEventsseparate the events a worker receives from those only the gateway client emits, which the decorator rejects. (#245)Message#threadable— Tells whether the bot can start a thread from the message: a text or announcement channel, no thread yet, andViewChannelplusCreatePublicThreads. It reads the cache, so it returns a promise with an asynchronous cache and throwsChannelUncached,GuildUncachedMe, orGuildUncachedon a miss. Unlike discord.js, an administrator bot is threadable, as the API allows it. (#248)createMessageand crosspost by ID —client.channels.createMessage(channel, options)sends a message to a channel or its ID, andchannel.messages.crossposttakes a message or its ID. (#255)
Updates
- Resolved messages and attachments —
transformResolvednow resolvesmessages(IDs read from the cache of the newchannelIdoption) andattachments(built asAttachment).MessageMentions#parsedUsersnow includes mentioned users even when they are not cached. Nothing is written to the cache. (#249) - Resolvables accept structures —
EntitlementResolvable,SKUResolvable, andSubscriptionResolvablenow also accept the structures. - Thread option checks —
ThreadCreateOptionsis nowTextThreadCreateOptions | ForumThreadCreateOptions. Mixing thread options (type,invitable) with forum or media post options (message,appliedTags) is a compile error. At runtime it throws aGatewayTypeErrorbefore any request (ThreadOptionsPostOnly,ThreadOptionsThreadOnly, orThreadPostMessageRequiredin a forum or media channel withoutmessage) instead of being dropped silently. (#254) - Guild-only message methods — In a DM or group DM,
messages.crosspost,messages.bulkDelete, andmessages.startThreadnow throwChannelMessagesGuildOnlybefore any request.ChannelThreadManagerandChannelMessageManagertake the channel type as an optional last constructor argument (channelType).
Bug fixes
clientReadyno longer stalls — The guildsclientReadywaits for are tracked by shard. A shard’s newREADYreplaces the unavailable guilds its previous one listed, so a guild the bot left between twoREADYs no longer holdsclientReadyback untilwaitGuildTimeout. The client also stops collecting these guild IDs onceclientReadyfires. (#247)guildDeleteforwarded for dropped guilds — When aREADYno longer lists a cached guild,GatewayClientemitsdispatchfor theGUILD_DELETEit applies, beforeguildDelete.forwardGatewayDispatchespublishes it, soplugin-brokerworkers clean these guilds up too. The synthesized dispatch carriess: 0and is not emitted asraw.
0.14.0 (2026-10-09)
New features
client.application— AClientApplicationlike discord.js’s, with theApplication,Team, andTeamMemberstructures. Unlike discord.js, where it isnulluntilREADY, it exists from client construction as apartialwith only the client ID.READYpatches the same instance with the application’s flags, andfetch()(GET /applications/@me) fills in the rest. It also hasedit(),fetchRoleConnectionMetadataRecords(), andeditRoleConnectionMetadataRecords(), and exposes the install params, integration types config,owner(aTeamor aUser), event webhooks, and guild and user install counts. (#238)resolveGuildEmoji(client, emojiId)— Finds a custom emoji by ID across every cached guild, like discord.js’sresolveGuildEmoji. (#236)
Updates
fetch*checks no longer deprecated —GuildMemberRoleManager#fetchHighest,GuildMember#fetchPermissions, andGuildMember#fetchPermissionsInare no longer@deprecated. The getters they mirror (roles.highest,permissions,permissionsIn,manageable,kickable,bannable,moderatable) skip roles missing from the cache without an error. With a filtered cache or aplugin-brokerworker, use thefetch*call orroles.fetch()for accurate hierarchy and permission checks. (#235)MessagePayloadfile names — URL and path files are now named with a sharedbasenamehelper.
0.13.0 (2026-10-08)
New features
AttachmentBuilder— Build files to send, like in discord.js:new AttachmentBuilder(file, { name, description })with the chainablesetFile,setName,setDescription,setSpoiler,setTitle,setDuration, andsetWaveform, plus thespoilergetter andtoJSON().AttachmentBuilder.from(other)copies a builder, a payload, or a receivedAttachment. Pass builders in thefilesof a message. #230
Updates
Attachment#attachment— Now returns the URL of a received attachment, as in discord.js.
0.12.0 (2026-10-07)
New features
- Guild-scoped managers —
guild.members,guild.roles,guild.voiceStates, andguild.presenceshave a cache keyed by the entity’s ID alone, like discord.js. You can also reach them asclient.guilds.members(guildId),roles(guildId),voiceStates(guildId), andpresences(guildId). Useguild.members.cache.get(userId)instead ofclient.members.cache.get(client.members.resolveKey(guildId, userId)), which keeps working. Each manager has the client manager’s methods with the guild ID filled in (guild.members.kick(userId),guild.roles.create(options)), andguild.members.meis a getter.channel.messagesandthread.membersgain the samecache. The manager classes gain anInGuildtype parameter (falseby default) and aguildIdproperty, and are typedGuildMemberManager<true>,RoleManager<true>,VoiceStateManager<true>, andPresenceManager<true>when scoped to a guild. #219 category.children— ACategoryChannelChildManagerwhosecachelists the category’s cached channels,create()makes a channel inside it, andresolve()/resolveId()look one up.children.cacheis read from the channel store on each access, so a store that cannot enumerate its entries throwsCacheNotIterable.create()rejects a category as the channel type. #222answer.voters— APollAnswerVoterManagerwhosefetch()lists the users who voted for a poll answer.fetchVoters()now goes through it. It has nocache. #222GuildManager#fetchSoundboardSounds(guildIds, options?)— Requests the soundboard sounds of several guilds over the gateway, caches them, and resolves with aCollectionof each guild’s sounds. It rejects with the newGuildSoundboardSoundsTimeoutError, listing the missing guilds, when replies take longer thantime(10 seconds by default, restarted by each reply). Only the process that sent the request resolves it. #226- Voice channel status and start time —
VoiceChannelgetsstatus,voiceStartTimestamp, andvoiceStartAt(nulluntil Discord sends them) andsetStatus(). The newvoiceChannelStatusUpdateandvoiceChannelStartTimeUpdateevents carry the channel before and after.client.channels.requestInfo()(alsoguild.requestChannelInfo()) asks the guild’s shard for the info and resolves once thechannelInforeply is cached, or rejects with aGuildChannelInfoTimeoutError. Requests for one guild run one after the other. #223 - Manager helpers — Adds
DataManager#valueOf()(the manager’s cache),GuildEmojiManager#resolveIdentifier(),GuildManager#widgetImageURL(guild, style?), andGuildChannelManager#channelCountWithoutThreads. Unlike discord.js,resolveIdentifierthrows for a value it cannot resolve instead of returningnull, andchannelCountWithoutThreadsthrowsCacheNotIterablewhen the channel store cannot enumerate its entries. #221
Updates
client.members.me— On the client’s manager,meis now a property holding the function instead of a prototype method. You still call it the same way:client.members.me(guildId).- Dependencies — Updated
@wolfstar/plugin-cacheto0.7.0.
Bug fixes
- Ready after resume —
GatewayClientnow becomes ready when its shards resume a stored session (sessionStore). PreviouslyclientReadywas never emitted,isClientReady()stayedfalse, andclient.userstayednull. The client now restoresclient.userfrom the cache or fromGET /users/@me, and emitsclientReadyonce every shard is ready throughREADYorRESUMED. A failed restore is reported througherrorand does not holdclientReadyback. #225
0.11.0 (2026-10-06)
New features
Guild#searchMessages(options?)— Searches a guild’s messages, also available asclient.guilds.searchMessages(guildId, options?). The result holdsCollections ofmessages,threads, andthreadMemberswithtotalResults,doingDeepHistoricalIndex, anddocumentsIndexed, and results are cached unless you passcache: false. While Discord indexes the guild, the search waits and retries, or throwsSearchIndexNotYetAvailablewithretryOnMissingIndex: false. Asignalcancels the request and the wait. A query over the documented limits throws aGatewayRangeErrorbefore the request. #202Messageadditions — AddsMessage#fetch(force)(answers from the cache withfalse),Message#sharedClientTheme,Message#resolveComponent(), andMessage#fetchWebhook(), which rejects with theWebhookMessageandWebhookApplicationerrors.Message#forward()now accepts a channel as well as its ID. #206- Partial members — Adds the
PartialGuildMembertype andGuildMember#isPartial(), a type guard narrowing to it. #201 - New
equals()methods —GuildChannel#equals(on every guild channel and thread) andSoundboardSound#equalsaccept the structure or its raw payload. #218
Updates
bulkDelete— Matches discord.js’sTextBasedChannel#bulkDeleteonMessageManager#bulkDelete,ChannelMessageManager#bulkDelete, and the channels’bulkDelete. It accepts messages, message IDs, aCollectionof messages, or a count, and throws aTypeError(MessageBulkDeleteType) for anything else. It resolves to aCollection<string, Message | PartialMessage | undefined>of the deleted messages by ID. It moves to the newTextGuildChannelMixin, soDMChannelandGroupDMChannelno longer have it. #206Messagetypings —Message<InGuild>is generic:guildId,guild,channel, andmentionsnarrow with it, andinGuild()narrows toMessage<true>.PartialMessageis now aPartializeofMessagewithpartial: true, sopartialnarrows aMessage | PartialMessage. Adds theMessageSnapshot,OmitPartialGroupDMChannel,GuildTextBasedChannel,If, andPartializetypes.edit,delete,pin,unpin,crosspost,suppressEmbeds,removeAttachments,reply, andforwardresolve to messages that are never from a group DM. #206- Partial member payloads —
guildMemberUpdate(old member),guildMemberRemove(member), andtypingStart(Typing#member) are now typedGuildMember | PartialGuildMember | null.GuildMemberRoleManager#partialreadsmember.partial, like discord.js. #201 equals()aligned with discord.js —Message#equals,Embed#equals,Guild#equals,GuildMember#equals,Role#equals(now compares the threecolors),User#equals,Sticker#equals, andGuildEmoji#equalsnow compare the same fields as discord.js.Guild#equals,GuildMember#equals,Sticker#equals,GuildEmoji#equals,GuildChannel#equals, andSoundboardSound#equalsreturnfalsefor a foreign argument instead of throwing, andRole#equals,User#equals,Embed#equals, andMessage#equalsacceptnullandundefined. Update events other thanemojiUpdateandstickerUpdateare unaffected. #218PresenceResolvable—client.presences.resolveandresolveIdaccept aPresence,GuildMember,User,ThreadMember,Message, or user ID.resolveIdreturns the user ID, andresolve(value, guildId?)reads the user’s cached presence in the relevant guild, answeringnullon a miss. #197
Migration
bulkDeleteresult — It now resolves to aCollectionkeyed by message ID instead ofstring[]. Use[...deleted.keys()]for the IDs. Don’t callbulkDeleteon DM channels.PartialMessage— It is no longer assignable toMessage. Narrow withmessage.partialbefore using one as aMessage.- Partial members in events — If a
guildMemberUpdate,guildMemberRemove, ortypingStartlistener passes the member to code expecting a plainGuildMember, narrow it withisPartial()first. presences.resolve(string)— It now takes a user ID, not the cache key. To read by key, usepresences.cache.get(presences.resolveKey(guildId, userId)).
0.10.0 (2026-10-05)
New features
@wolfstar/plugin-gateway/module— List it inmodulesinstars.configto add the package to the auto imports. It needs framework 6.1 and the optional@wolfstar/kitpeer. The main entrypoint is unchanged. #191
Updates
- Dependencies — Updated
@wolfstar/plugin-cacheto0.6.0. (#191)
0.9.1 (2026-10-04)
Updates
@wolfstar/http-frameworkv6 — The peer range now accepts^6.0.0. #176
0.9.0 (2026-10-02)
New features
manager.cache— Managers expose the discord.js RFCCacheasmanager.cache, built by a client-levelcacheConstructor. Without a cache option, every entity is now cached in memory byCollectionCache, aCollectionof structure instances that updates patch in place.manager.cacheis always defined, withget,set,has,delete,add,clear,getSize,construct, andsynchronous.CollectionCache,EntityStoreCache,NullCache,CacheConstructorOptions, and theCache/CacheConstructortypes are exported. #163cacheOptions— Bound the default cache per entity, for examplecacheOptions: { messages: { maxSize: 1_000 } }. The oldest entry of the whole entity is evicted first, and0holds nothing.cacheOptions.<entity>.keepOverLimitmirrorsLimitedCollection#keepOverLimit. #163, #175- Sweepers — The
sweepersclient option andclient.sweepers(Sweepers, withsweepMessages,sweepUsers,sweepThreads,filterByLifetime,outdatedThreadSweepFilter, and more) evict cache entries on a timer or on demand, emittingcacheSweep.cacheWithLimitsandDefaultSweeperSettingsare ready-made presets. Sweepers cannot be combined withcacheormakeCache. #175 - Synchronous getters — Adds discord.js’s derived getters, read from the cache alone:
GuildMember#permissions,permissionsIn(channel),manageable,kickable,bannable,moderatable,displayColor,displayHexColor;Message#editable,deletable,bulkDeletable,pinnable,crosspostable;Role#editable,Role#permissionsIn(channel);permissionsFor(target)on guild channels;GuildEmoji#deletableandGuildInvite#deletable. A missing entity throwsGuildUncached,GuildUncachedMe,ChannelUncached, orGuildMemberUncached. With an asynchronous cache they return promises; declareinterface GatewayCacheConfig { asynchronous: true }in adeclare module "@wolfstar/plugin-gateway"block to type them asCacheRead<T>. #170 client.members.me(guildId)— The bot’s own member in a guild, read from the cache alone, like discord.js’sguild.members.me. It isnullwhen not cached.fetchMe(guildId)stays as the variant that falls back to the API. #167- Role manager additions —
member.rolesgainscache(aCollection<Snowflake, Role>of the member’s cached roles), thehighest,hoist,color,icon,premiumSubscriberRole, andbotRolegetters, andclone().emoji.rolesgainscacheandclone(). Theiradd/remove/setaccept aRole, an ID, an array, or aCollectionof roles, as domember.edit({ roles }),client.members.add(…, { roles }), and therolesofGuildEmojiCreateOptions/GuildEmojiEditOptions. #166 - DM channels — Adds
UserManager#dmChannel(user)andUser#dmChannel, the cached DM channel with a user ornull, plusUser#createDM(force?)andGuildMember#createDM(force?).UserManagermethods accept aUserResolvable: aUser,GuildMember,ThreadMember,Message(its author), or an ID. New error codesInvalidType,InvalidElement, andUserNoDMChannel, and theRoleResolvablesandCreateDMOptionstypes are exported. #166 - Dispatch replay across processes — A
GatewayClientthat never connects to Discord can receive another process’s events. Thedispatchevent gains a trailingstateargument,serializeDispatchState/reviveDispatchStatecarry it across processes (DispatchStateCodecs), andreplayDispatch/replayDispatchTypesemitrawand the matching event without touching the cache.replayDispatchawaits asynchronous listeners and rejects when one fails. #168 - Deprecate
fetch*twins — Deprecates the derivedfetch*twins of discord.js’s getters and removesMessage#fetchEditable. Every entity fetch andGuildMember#fetchPresenceare kept. When the cache may lack an entity, fetch it first, then read the getter. (#174) - Structure parity —
Message#react()now resolves to theMessageReactioninstead of the message.Message#attachments,Message#stickers,Message#messageSnapshots, andReactionManager#cacheare nowCollections instead of arrays.Message#partialistruewhen the message lacks its content.valueOf()of a structure is its ID when it has one. (#169)
Updates
- Relation getters —
message.guild,message.channel,member.guild,member.voice,channel.parent,reaction.message, and similar getters fall back to a synchronous cache read, so structures built by hand or before their relation was cached find it. They staynullwith an asynchronous cache and never throw. #170 - Deprecated
fetch*twins — Thefetch*variants of the new getters are deprecated and will be removed later, for exampleGuildMember#fetchPermissions,Message#fetchDeletable,Role#fetchEditable,fetchPermissionsFor, andGuildMemberRoleManager#fetchHighest. Each@deprecatednotice points at its getter. Entity fetches such asfetchGuild,fetchMember,client.members.fetchMe, andGuildMember#fetchPresencestay. #174 member.rolescolor —colorandfetchColor()pick the highest role with acolors.primaryColor, as discord.js does. #166- Manager hierarchy — Managers follow
BaseManager → DataManager → CachedManager.BaseManageris now the root class instead of an alias ofCachedManager, andDataManageraddsresolveId. #163 - Dependencies — Updated
@wolfstar/plugin-cacheto0.5.1.
Bug fixes
- Bot user from
USER_UPDATE— AUSER_UPDATEfor the bot’s own user now buildsclient.userwhen it is stillnull, instead of emitting a plainUser. #168
Migration
- Replace
client.users.get(id)withclient.users.cache.get(id). - Replace
client.members.get(guildId, userId)withclient.members.cache.get(client.members.resolveKey(guildId, userId)). - Replace
client.users.cached(id)withclient.users.cache.get(id). - Replace
client.users.cache?.get(id)(raw) withclient.cache?.users?.get(id). - Replace
client.users.construct(raw)withclient.users.cache.construct(raw). - Replace
new GatewayClient({ intents })(no cache) withnew GatewayClient({ intents, cache: null }). member.roles.add/removenow resolve to the updatedGuildMemberinstead ofvoid.UserManager#createDM(user, { cache, force })returns the cached channel; passforce: truefor the previous API-always behavior.UserManager#deleteDM(user)throws when there is no cached DM channel.- Use
message.partialto narrowMessage | PartialMessagebefore using a partial as aMessage. - A
MessageReaction’s cache and attachments are nowCollections; use.first(),.size,.get(id). - Default caching — Without a cache option, every entity is now cached in memory and nothing expires. Pass
cache: nullto keep the previous no-cache behaviour, or bound it withcacheOptions,policies.filter, or sweepers.cacheConstructorandcacheOptionsthrow when combined withcache/makeCache, andcache: nullwins over both. - Cached instances — Only
manager.cache.get(andfetch/resolve) returns the cached instance. Structures from events andlistCachedare fresh copies. Message#fetchEditable()— Removed. Use theMessage#editablegetter.Message#react()— Resolves to theMessageReactioninstead of the message.- Collections instead of arrays —
Message#attachments,Message#stickers,Message#messageSnapshots,ReactionManager#cache, and themessageReactionRemoveAllpayload areCollections. Use.first(),.size, or.get(id). Reactions are keyed by emoji ID, or name for Unicode emojis.Message#stickersholds partialStickerstructures (format_typebecomesformat). Message#partial— Nowtruewhen the message lacks its content, not only its author.valueOf()— Returns the structure’s ID when it has one, so structures compare and sort by ID.
0.8.0
New features
parseEmojiutilities — AddsparseEmojiandresolvePartialEmojiutilities.ReactionEmoji.resolveIdentifier,ReactionEmoji.resolvePartial, and poll answer emojis now share them, so a bare emoji ID given as a poll answer emoji is sent as an ID instead of a name. (#157)- Channel and role positioning — Moves channels and roles among their sorted siblings like discord.js.
GuildChannelManager.setPositionandfetchSortedmove a channel among the channels of its category and group.RoleManager.setPositionandRole#setPositionmove a role among the sorted roles of its guild. AddscomputePositionsand fixesmoveElementInArray. (#160) transformResolved— Resolves users, members, roles, and channels by ID from the cache or from raw data into structures.client.messagesbuilds a message’sMessageMentionswith it. (#160)- Resolvable types — Adds every
*Resolvabletype from discord.js mapped onto the package’s structures, channel groups (ThreadChannel,GuildBasedChannel,NonThreadGuildBasedChannel,TextBasedChannel,VoiceBasedChannel,GuildInvitableChannel),ColorsandresolveColor, andApplicationFlagsBitField. (#154) - Serializers — Adds
Transformers,DataResolver, andUtilhelpers from discord.js.toSnakeCaseandtransformAPI*/transform*pairs cover auto moderation, forum tags, scheduled events, incidents, role tags, audit logs, avatar decorations, collectibles, primary guilds, message references, activities, calls, role subscriptions, crossposted channels, interaction metadata, and embed assets. (#158)
Updates
- Camel-cased getters — Several getters now return camel-cased objects instead of raw API ones:
AutoModerationRule#triggerMetadata/#actions,ForumChannel/MediaChannel#availableTags/#defaultReactionEmoji,GuildScheduledEvent#recurrenceRule,Guild#incidentsData,User#avatarDecorationData/#collectibles/#primaryGuild,GuildMember#avatarDecorationData,Role#tags,Message#reference/#activity/#interactionMetadata/#call/#roleSubscriptionData,MessageMentions#crosspostedChannels,GuildAuditLogsEntry#changes, andEmbed#thumbnail/#image/#video/#author/#footer.Message#messageSnapshotsnow returnsMessagestructures.toJSON()still returns raw data. Options accept both camel-cased and raw shapes. (#158)
Migration
- Read camel-cased values from the getters listed above. Call
toJSON()for raw API data.
0.7.0
New features
- Component structures — Adds discord.js-style component structures:
ActionRow,InteractiveButtonComponent,LinkButtonComponent,PremiumButtonComponent, the five select menus,TextInputComponent,ContainerComponent,SectionComponent,TextDisplayComponent,ThumbnailComponent,MediaGalleryComponent(withMediaGalleryItemandUnfurledMediaItem),FileComponent,SeparatorComponent,LabelComponent,FileUploadComponent,RadioGroupComponent,CheckboxGroupComponent, andCheckboxComponent, all extendingComponent.createComponent()builds the matching class for raw component data, andfindComponentByCustomId()searches a component tree. (#151) - discord.js-style errors — Every error thrown or emitted is now a
GatewayError,GatewayTypeError, orGatewayRangeErrorcarrying acodefromGatewayErrorCodes, with its message inGatewayErrorMessages.DispatchTimeoutError,GuildMembersTimeoutError,GuildMembersRateLimitError, andGatewaySessionStoreErrorextendGatewayError. (#152)
Breaking changes
Message#components— Now returns the component structures instead of raw API data. CalltoJSON()on them to get the raw components back.
Updates
Message#components— Now returns the component structures instead of raw API data. CalltoJSON()on them to get the raw components back. (#151)
Migration
- Call
toJSON()onMessage#componentsentries to get raw API data.
0.6.0
Aligns the managers with the discord.js RFC #11426 (zero caching, complete flexibility), together with @wolfstar/plugin-cache 0.5.0.
New features
makeCache,policies, andcacheErrors— Aligns managers with the discord.js RFC (zero caching, complete flexibility).makeCache(entity)creates the store of each entity kind, or returnsnullnot to cache it.policiesdecide entry by entry what gets cached and for how long.cacheErrors("miss"by default, or"throw") decides what managers do when a store fails, and a newcacheErrorevent is always emitted. Every feature now works with any subset of entity caches, or none. (#149)- Manager construction — Managers build structures with
construct(createStructureis kept as a deprecated alias) and write through the store’supsert.CachedManageris also exported asBaseManager. (#149) - Works with any subset of caches — Every feature now works with any subset of entity caches, or none.
GUILD_EMOJIS_UPDATEandGUILD_STICKERS_UPDATEalways emit the newguildEmojisUpdateandguildStickersUpdateevents. The granular diff events still need a cache.
Updates
- Manager construction — Managers build structures with
construct(createStructureis kept as a deprecated alias) and write through the store’supsert.CachedManageris also exported asBaseManager.
Migration
thread.joinedis nowboolean | null.listCachedthrows aTypeErrorfor a store that cannot enumerate its entries.
0.5.0
New features
dispatchevent —GatewayEvents.Dispatchis emitted for every gateway dispatch once it is written to the cache, before the matching event. Unlikeraw, a listener reading the cache sees the dispatch applied.@wolfstar/plugin-broker’sforwardGatewayDispatchesrelies on it. (#147)
0.4.0
New features
GatewayEventsenum — Mirrors the keys ofGatewayEventMap, likeEventsin@wolfstar/http-framework.client.on(GatewayEvents.MessageCreate, ...)is interchangeable withclient.on("messageCreate", ...). (#145)clientReadyevent — Emitted once, after every shard the client manages has connected and every guild listed as initially unavailable became available, or the newwaitGuildTimeoutoption (15_000ms by default) elapses.GatewayClientgainsclientReadyTimestamp,clientReadyAt, andisClientReady(). (#145)
0.3.0
New features
clienton structures — Every structure exposes theGatewayClientwhose manager built it, like discord.js’sBase#client. (#142)MessagePayload— Normalizes message options like discord.js: camel case options, builders,replyandforwardshortcuts, stickers, polls, and files from paths, URLs, streams, or buffers. Everysend,edit, andreplyaccepts either the options or aMessagePayload. (#142)WebhookMixin— The token-based members thatWebhookposts through (send,editMessage,deleteMessage,fetchMessage,url). (#142)client.rest— Exposes theRESTmanager that the gateway and every manager’s API calls go through. (#142)- Relations from the cache — Related structures resolve from the cache as synchronous getters, like discord.js, alongside the existing
fetch*()methods. This covers channels, guilds, members, messages, reactions, polls, audit log entries, auto moderation executions, invites, and onboarding. (#142) - Partials — Adds
Partialsand thepartialsclient option. With a partial enabled, an event about an uncached message, user, member, thread member, scheduled event, soundboard sound, poll, or direct message receives a structure built from the dispatch’s IDs (partialistrue,fetch()completes it) instead ofnull. (#142)
Bug fixes
Message#reply()— No longer hardcodesfailIfNotExiststofalse. It defaults like every otherreply, toGatewayClientOptions.failIfNotExists ?? true. (#142)
Breaking changes
GatewayClient#coreis protected — Useclient.api(the same@discordjs/coreAPI),client.rest, andclient.gatewayinstead ofclient.core.api,client.core.rest, andclient.core.gateway.- Type changes —
BaseInvite.channelisAnyChannel | APIInviteChannel | null.MessageReaction.emoji,PollAnswer.emoji,SoundboardSound.emoji,WelcomeChannel.emoji, andGuildOnboardingPromptOption.emojimay be aGuildEmoji.
Updates
GatewayClient#coreis protected — Useclient.api(the same@discordjs/coreAPI),client.rest, andclient.gatewayinstead ofclient.core.api,client.core.rest, andclient.core.gateway. (#142)- Type changes —
BaseInvite.channelisAnyChannel | APIInviteChannel | null.MessageReaction.emoji,PollAnswer.emoji,SoundboardSound.emoji,WelcomeChannel.emoji, andGuildOnboardingPromptOption.emojimay be aGuildEmoji. (#142)
Migration
- Replace
client.core.apiwithclient.api,client.core.restwithclient.rest, andclient.core.gatewaywithclient.gateway.
0.2.0
New features
container.gatewayClient— EveryGatewayClientis registered ascontainer.gatewayClient, typed asGatewayClient, so pieces reach its managers throughthis.container.gatewayClientwithout a cast. (#130)- Request guild members —
client.members.request(guildId, options)andguild.requestMembers(options)sendREQUEST_GUILD_MEMBERSfor every member, aquery, or up to 100userIds. Rejects withGuildMembersTimeoutErrorwhen chunks stop arriving, orGuildMembersRateLimitErrorwhen Discord answers withRATE_LIMITED. Every chunk is also emitted as the newguildMembersChunkevent. (#126) - Resume sessions —
GatewayClientgains asessionStoreoption (andsessionStoreTimeout).GatewayClient#destroy({ resumable: true })closes the shards with a resumable code and keeps their sessions stored for the next process. Store failures are reported asGatewaySessionStoreErrors and fall back to identifying. See@wolfstar/plugin-cache. (#128) - Synchronous cache reads — Every
CachedManagergainscached(...ids), which returns the structure without a promise, for exampleclient.members.cached(guildId, userId). It returnsundefinedon a miss, and throws aTypeErroron an asynchronous cache. (#131)
Updates
- Structures extend
@discordjs/structures—User,Message,Attachment,Embed,MessageReaction,Poll,Emoji,BaseInvite,Presence,VoiceState,Webhook,Sticker, and every channel type now inherit from their@discordjs/structurescounterparts. The source is organised in one folder per domain. (#138)
Breaking changes
- Getters that now come from
@discordjs/structuresreturnundefinedrather thannullwhen the field is absent. Channel.flagsis a frozenChannelFlagsBitFieldrather than anumber.Embed.timestampis the timestamp in milliseconds rather than the ISO string.MessageReaction.burstColorsholds numbers rather than#rrggbbstrings.VoiceState.requestToSpeakTimestampis the raw ISO string rather than milliseconds. UserequestToSpeakAtfor aDate.
Bug fixes
./registerexport — Adds a no-op./registersubpath export, fixingERR_PACKAGE_PATH_NOT_EXPORTEDcrashes at startup with the Stars CLI build. (#123)- Subpath exports removed from README — Removes the README’s “Subpath exports” section:
@wolfstar/plugin-gateway/restand@wolfstar/plugin-gateway/wswere never exported. Depend on@discordjs/restand@discordjs/wsdirectly instead. (#134)
Migration
- Getters that now come from
@discordjs/structuresreturnundefinedrather thannullwhen the field is absent. Channel.flagsis a frozenChannelFlagsBitFieldrather than anumber.Embed.timestampis the timestamp in milliseconds rather than the ISO string.MessageReaction.burstColorsholds numbers rather than#rrggbbstrings.VoiceState.requestToSpeakTimestampis the raw ISO string rather than milliseconds. UserequestToSpeakAtfor aDate.
0.1.1
Updates
- Updated to
@wolfstar/plugin-cache0.2.0.
0.1.0
New features
- New package —
@wolfstar/plugin-gatewayimplements the Gateway RFC.GatewayClientextends the framework’sClientwith a Discord gateway connection (through@discordjs/ws), per-entity managers reading from an optional@wolfstar/plugin-cachecache, and events carrying structures instead of raw payloads. (#93) - Gateway actions and startup — Adds gateway actions and a unified
GatewayClient.start()startup method, uses@discordjs/corefor API operations, optimizes structure data during construction and patches, and provides a standalone gateway cache adapter. (#113) - Guild channels — Brings guild channels to discord.js parity:
edit,setName,clone, per-type setters,setParent/lockPermissions/setPosition,PermissionOverwriteManagerwithPermissionOverwrites,guild.channels(GuildChannelManager), and channel permissions with overwrites. (#105) - Guilds — Brings guilds to discord.js parity (every field, editing, invites pause, incident actions, leave and delete, preview, vanity data, voice regions) and adds emojis, stickers, sticker packs, and invites with their guild managers. (#98)
- Scheduled events, stage instances, soundboard — Adds
GuildScheduledEvent,StageInstance, andSoundboardSoundwith their gateway events. (#110) - Integrations, templates, welcome screens, widgets, onboarding — Adds
Integration,GuildTemplate,WelcomeScreen,Widget, andGuildOnboarding. (#111) - Managers
_addandresolve— Adds discord.js’sCachedManager#_addandDataManager#resolveto every manager: API payloads are merged into the cached entry, and structures resolve their relations from the cache. (#102) - Messages — Brings messages to discord.js parity:
Attachment,Embed,MessageMentions,MessageReaction,Poll,PollAnswer,ReactionEmoji,Messageactions,ReactionManager/ReactionUserManager, and every message and reaction route. (#101) - Moderation — Adds
GuildBan, audit logs, auto moderation, and their gateway events. (#109) - Reaction and poll events — Emits
messageReactionAdd,messageReactionRemove,messageReactionRemoveAll,messageReactionRemoveEmoji,messagePollVoteAdd, andmessagePollVoteRemove, with reactions and poll answers read from the cached message after the dispatch is counted into it. (#104) - Relations from cache — Resolves
guildfrom the cache on every guild structure andchannelon messages, like discord.js, withfetchGuild()for when the guild is not cached. (#103) - Threads — Brings threads to discord.js parity:
channel.threads, thread setters,join/leave,ThreadMember, and thread events. (#107) - Users, members, and roles — Brings users, guild members, and roles to discord.js parity: every API field, CDN URLs,
ClientUser,GuildMemberRoleManager, permission computation, member moderation, member listing and search, and role management.Role#permissionsis now aPermissionsBitField. (#97) - Voice states and presences — Adds
VoiceState,PresencewithActivityandRichPresenceAssets,client.voiceStatesandclient.presences, and their events. (#108) - Webhooks — Adds
Webhook,client.webhooks, channel and guild webhook methods, andAnnouncementChannel#addFollower. (#106) - Discord parity for structures and managers — Users, guild members, roles, guilds, guild channels, threads, messages, reactions, polls, emojis, stickers, invites, webhooks, voice states, presences, scheduled events, stage instances, soundboard sounds, integrations, guild templates, welcome screens, widgets, onboarding, and moderation (bans, audit logs, auto moderation), each with their gateway events.
Bug fixes
- Per-guild dispatch partitions — Processes dispatches in per-guild partitions instead of one queue per shard, reports dispatches slower than
dispatchTimeout, adds acacheFailurepolicy ("skip"or"emitUncached"), accepts{ force, cache }options on managers’fetch, and drops cached guilds a newREADYno longer lists.READYitself is always emitted, even when the cache fails. (#95)
Updates
- Dependencies — Updated
@wolfstar/plugin-cacheto0.1.0. (#93)