Skip to content

fix(rest): modify a channel with PATCH rather than POST - #11

Merged
mikield merged 1 commit into
masterfrom
fix/modify-channel-uses-patch
Sep 2, 2026
Merged

mikield merged 1 commit into
masterfrom
fix/modify-channel-uses-patch

Conversation

@mikield

@mikield mikield commented Sep 2, 2026

Copy link
Copy Markdown
Member

Modify Channel is PATCH /channels/{channel.id}. Channel::modify() sent POST, so every rename, move between categories and permission change made through it was refused by Discord — nothing that edits a channel after creating it has ever worked.

Found while porting a bot that archives ticket channels by renaming them and moving them into another category: the calls went out and silently did nothing.

The five modify cases in ChannelTest asserted post, i.e. the verb the implementation happened to use rather than the one the API documents, so the suite stayed green over the bug. They now assert patch.

I checked the rest of the REST layer for the same class of mistake — updateRecords, editChannelPermissions, modifyMfaLevel, modifyOnboarding and editApplicationCommandPermissions are all documented as PUT or POST and are correct as they stand. This is the only one.

🤖 Generated with Claude Code

Modify Channel is PATCH /channels/{channel.id}. Sending POST meant every
rename, move between categories and permission change made through
Channel::modify() was refused by Discord, so nothing that edits a channel
after creating it has ever worked.

The test covering it asserted the verb the implementation happened to use
rather than the one the API documents, so it passed throughout.
@mikield
mikield merged commit e8f47bf into master Sep 2, 2026
4 checks passed
@mikield
mikield deleted the fix/modify-channel-uses-patch branch September 2, 2026 01:24
github-actions Bot pushed a commit that referenced this pull request Sep 2, 2026
## [1.2.0](v1.1.0...v1.2.0) (2026-09-02)

### Features

* **format:** spell Discord's message markup once ([#12](#12)) ([4512390](4512390))

### Bug Fixes

* **rest:** modify a channel with PATCH rather than POST ([#11](#11)) ([e8f47bf](e8f47bf))
@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown

🎉 This PR is included in version 1.2.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant