fix(channel): start a thread in a forum without throwing - #14
Merged
Merged
Conversation
startThreadInForumChannel() has never worked. It built its return type as an anonymous class extending Channel — but inside Rest\Channel the bare name is that class itself, since Parts\Channel is imported under an alias. So it extended the REST resource, whose constructor takes three arguments, and every call died on "Too few arguments" before reaching the network. The type it wanted is now a real part. Discord answers this one call with the opening message attached, which is what reactions and edits on the post address, so it is worth a name rather than a cast — and a caller can now be typed against it, which an anonymous class never allowed. No test referenced the method, which is how it stayed broken.
github-actions Bot
pushed a commit
that referenced
this pull request
Sep 2, 2026
## [1.3.1](v1.3.0...v1.3.1) (2026-09-02) ### Bug Fixes * **channel:** start a thread in a forum without throwing ([#14](#14)) ([6bae9fc](6bae9fc))
|
🎉 This PR is included in version 1.3.1 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
startThreadInForumChannel()has never worked. Any call dies before it reaches the network:The method built its return type as an anonymous class:
Inside
Rest\Channel, the bare nameChannelis that class itself —Parts\Channelis imported under the aliasPartsChannel. So the anonymous class extended the REST resource, whose constructor takes three arguments, and instantiating it threw immediately.No test referenced the method, which is how it stayed broken. There is one now.
Parts\ForumThreadThe type it was reaching for is now a real part rather than an anonymous class. This is the only call where Discord answers with a channel that carries a message, and that message is what reactions and edits on the post address — so it is worth a name. It also means a caller can be typed against it: an anonymous class cannot be referenced from outside the method, so static analysis flagged every use of
->messageas an undefined property and the only way through was a cast.Found while porting a bot whose petitions are forum posts that members vote on with reactions.
🤖 Generated with Claude Code