Skip to content

feat(threads): private threads and thread membership - #16

Merged
Akayashuu merged 1 commit into
masterfrom
feat/private-threads
Aug 4, 2026
Merged

feat(threads): private threads and thread membership#16
Akayashuu merged 1 commit into
masterfrom
feat/private-threads

Conversation

@Akayashuu

Copy link
Copy Markdown
Collaborator

Why

Threads().Start opens a thread off a message, so the channel carries a visible "thread started" trace. A job an operator wants kept to themselves needs the other shape.

What

  • StartPrivate(ctx, channelID, name)POST /channels/{id}/threads with type: 12, invitable: false, 24 h auto-archive. No parent message, so nothing appears in the channel.
  • AddMember(ctx, threadID, userID)PUT /channels/{id}/thread-members/{user}. A private thread is invisible until members are added, so this is what makes one usable by a person.

Visibility is Discord's: invited members, the bot, and moderators holding MANAGE_THREADS. Documented in the doc comment rather than implied.

Verification

gofmt -l .    # clean
go vet ./...  # clean
go test ./... # 92 passed, 2 packages

New: TestThreadsStartPrivate (asserts the channel-not-message path, the private type and invitable:false), TestThreadsAddMember.

Start opens a thread off a message, which is a public trace in the channel. A
job an operator wants kept to themselves needs the other shape: a thread created
off the channel, typed private, with invitable false so members cannot pull
others in. It is invisible until someone is added to it, so AddMember is what
makes one usable by a person rather than only by the bot that opened it.
@Akayashuu
Akayashuu merged commit e731fd6 into master Aug 4, 2026
1 check passed
@Akayashuu
Akayashuu deleted the feat/private-threads branch August 4, 2026 14:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant