Skip to content

Instantly share code, notes, and snippets.

@Soheab
Last active December 20, 2025 15:58
Show Gist options
  • Select an option

  • Save Soheab/4709e335474784d8a1877812f6d0c354 to your computer and use it in GitHub Desktop.

Select an option

Save Soheab/4709e335474784d8a1877812f6d0c354 to your computer and use it in GitHub Desktop.
See here everything about threads and how to manage them using discord.py

Basics

  • (Forum) posts are threads in forum channels.
  • Threads can be created per message or per channel.
  • Only channel threads can be private.
  • For message and forum threads, the thread's ID matches the starter message's ID.
  • You can lock threads so only users with the right permissions can send messages.
  • Threads can be archived, which removes them from the channel list. This also happens automatically after a period of inactivity.

Permissions

Events

Events are dispatched for various thread actions:

Getting Threads

From a message:

From cache:

Fetching from API:

Creating Threads

You can create a thread in a text channel, forum channel, or from a specific message in a text channel:

Starter Message

Threads created from a message or in a forum channel have a starter message. Get the cached message: Thread.starter_message

To fetch the starter message:

starter_message = await thread.parent.fetch_message(thread.id)

Or, if you don't need the full object / not waste an API call:

starter_message = thread.get_partial_message(thread.id)
# await starter_message.pin()

Extras

Some other useful thread attributes:

Types

Threads can be one of three types, depending on where or how they were created:

Related:

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