Closed ghost closed 1 year ago
Oddly enough, A forum channel's thread and its started message have the same snowflake. Not sure if this is intentional or a discord bug, since this doesn't happen with text channel threads.
That's intentional and happens if:
For your fix: Please pr it
Summary
When trying to edit a forum channel thread's starter message sent by a webhook, this raises an "Unknown Message" exception
Reproduction Steps
discord.Webhook.send()
and assign a variable to it (wait has to be True)Minimal Reproducible Code
Expected Results
The webhook's starter message is expected to be edited.
Actual Results
The following traceback gets printed:
Intents
message_content, messages, guilds, emojis, reactions
System Information
Checklist
Additional Context
This seems to be the lines that are causing the issue are the following:
This code doesn't handle the case where
channel.type
would beForumChannel
, so thread gets sent as None, and therefore the discord API's link that pycord sends a request to looks like this:https://discord.com/api/v10/webhooks/[webhook id]/[webhook token]/messages/[message id]
Which, according to the official Discord Developer Docs, is missing the
thread_id
query string parameter, since it's a Forum Channel and it needs a thread id, otherwise it returns anUnknown Message
error. I created a band-aid fix for this:Oddly enough, A forum channel's thread and its started message have the same snowflake. Not sure if this is intentional or a discord bug, since this doesn't happen with text channel threads.