Repository navigation
feat: bring gateway messages, reactions and polls to discord.js parity - #101
Conversation
◈ PR LensPR Lens paused analysis for this repository — the fair-use limit was reached. It resumes automatically at 2026-09-25T18:00:00.000Z. |
There was a problem hiding this comment.
Important
One method's implementation doesn't match its own documented contract — see below.
Reviewed changes
Reviewed the full diff (20 files) bringing gateway messages, reactions, and polls to discord.js parity.
- New structures:
Attachment,Embed,MessageMentions,MessageReaction,Poll,PollAnswer,ReactionEmoji— thin wrappers over API payload slices, consistent with the existingStructure<T>pattern. Messageadditions: new fields/getters (flags,poll,reactions,thread,messageSnapshots,cleanContent,system, ...), actions (reply,edit,delete,forward,pin/unpin,react,crosspost,startThread,suppressEmbeds,removeAttachments,equals), and async relation/permission checks (fetchChannel,fetchGuild,fetchReference,fetchEditable/fetchDeletable/fetchBulkDeletable/fetchPinnable/fetchCrosspostable).- New managers:
MessageManagergains the full message/reaction/poll REST surface;ReactionManager(a message-payload snapshot, explicitly documented as not gateway-updated yet) andReactionUserManager(paginated reactors);ChannelMessageManageras a channel-scoped facade overclient.messages. TextChannelMixin:messages,send,sendTyping,bulkDelete,fetchLastMessage.- Breaking, in-place changes (package unreleased, acknowledged in the PR description):
message.mentionsis nowMessageMentionsinstead ofUser[];attachments/embedsreturn structures instead of raw payload objects.
I verified the new Routes.* calls, permission strings, and bit-field usage against the vendored discord-api-types and existing codebase patterns — all check out (routes exist with matching arities, PinMessages/ManageMessages are valid PermissionFlagsBits keys, .bitField access matches GuildMember.ts/User.ts).
ℹ️ Nitpicks
MessageReaction.fetch()(src/structures/MessageReaction.ts) resetscount/meto0/falsewhen the reaction is fully gone, but leavescountDetails,meBurst, andburstColorsstale from before the fetch.ChannelMessageManagerexposescrosspost/pin/unpinbut notreact/startThread/removeAllReactions/endPoll, despite its doc comment describing it as "client.messages, with the channel's ID filled in." Worth a deliberate scope call rather than an accidental gap.
Claude Sonnet | 𝕏
@wolfstar/plugin-api
@wolfstar/plugin-cache
@wolfstar/plugin-gateway
@wolfstar/plugin-i18next
@wolfstar/plugin-logger
@wolfstar/plugin-subcommands-advanced
commit: |
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
Reviewed the delta since the prior Pullfrog review (1d4d859 → f552acc), a single fix commit resolving every item raised in round 1.
- Fixed
fetchCrosspostable()— now fetches the channel and requireschannel.type === ChannelType.GuildAnnouncementbefore returningtrue, matching its own docstring. Two new tests cover both branches. - Fixed stale reaction fields on full removal —
MessageReaction.fetch()now resetscount_details,me_burst, andburst_colorsalongsidecount/mewhen the reaction is gone, instead of leaving them stale. - Filled out
ChannelMessageManager's route surface — addedbulkDelete,forward,react,removeReactionEmoji,removeAllReactions,startThread,endPoll, andfetchPollAnswerVotersas thin delegations toclient.messages.*, closing the gap between its doc comment ("client.messages, with the channel's ID filled in") and its actual coverage.
I verified each new ChannelMessageManager method's parameter order and types against the corresponding MessageManager method it delegates to — all consistent — and confirmed ChannelType.GuildAnnouncement (value 5) is correct against the vendored [email protected] payload types.
Claude Sonnet | 𝕏
f552acc to
98fb02e
Compare
98fb02e to
839f584
Compare
839f584 to
2dbc549
Compare
|
Your Claude subscription has hit its usage limit. It resets at 7:20pm (UTC). Re-trigger Pullfrog after the reset, or add an Add repo secret → · Model settings → · Setup docs → · Ask in Discord →
|

Stacked on #98.
🔗 Linked issue
Related to #54 (phase 7a of the roadmap).
🧭 Context
Messageonly exposed raw attachments and embeds and a list of mentioned users, and the only message route wasfetch. Replying, reacting, pinning or sending to a channel meant going through raw REST calls.📚 Description
Messages now follow discord.js. Attachments, embeds, mentions, reactions and polls get their own structures, and
Messagegains discord.js's actions:reply,edit,delete,forward,pin/unpin,react,crosspost,startThread,suppressEmbedsandremoveAttachments.client.messagesnow covers every message and reaction route (list, send, bulk delete, pins, crosspost, poll end and voters). Text channels getmessages,send,sendTyping,bulkDeleteandfetchLastMessage.Things worth reviewing:
message.mentionsis now aMessageMentionsinstead ofUser[], andattachments/embedsreturn structures instead of raw objects. The package isn't released yet, so I changed them in place instead of keeping the old shapes around.channel,guildanddeletable& co. synchronously from its cache. Here they arefetchChannel,fetchGuild,fetchReferenceandfetchDeletable/fetchEditable/fetchPinnable/fetchCrosspostable/fetchBulkDeletable. These checks use guild-wide permissions for now. Channel overwrites come in phase 8.message.reactionsreads the reactions in the message payload. The gateway reaction events don't update the cached message yet. That's phase 7b, which needs a new cache operation in plugin-cache.cleanContentonly replaces user mentions, using the names in the payload, and defuses@everyone/@here. Role and channel names would need the async cache, so those mentions are left as they are.Key changes
Attachment,Embed,MessageMentions,MessageReaction,Poll,PollAnswer,ReactionEmojiMessageflags,poll,reactions,thread,messageSnapshots,cleanContent, ...), the actions listed above,fetch*relations,equalsMessageManagerroutes,ChannelMessageManager,ReactionManager,ReactionUserManagermessages,send,sendTyping,bulkDelete,fetchLastMessageType of Change
Pre-flight Checklist
pnpm changeset(orpnpm changeset add --emptyif no release is needed). See .changeset/README.md.