You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed when I called /channels/<channel_id>/threads/archived/public on a Channel that was recently turned into an Announcement Channel, it did not give me all the Archived Threads, only Archived Threads after it became an Announcement Channel. I tried to turn it into a Regular Channel, and then it did give me the other Threads, but not the ones made while it was an Announcement Channel.
I believe this issue is caused because the API probably only searches for ANNOUNCEMENT_THREAD (10) or PUBLIC_THREAD (11) depending on it's channel type, and neither are converted to other when the Channel Type is converted.
I propose the following as alternatives for solutions: Solution 1: Make /channels/<channel_id>/threads/archived/public search for ANNOUNCEMENT_THREAD (10) and PUBLIC_THREAD (11) regardless of Channel Type. Solution 2: When converting from Text Channel (0) to Announcement Channel (5), convert all PUBLIC_THREAD (11) to ANNOUNCEMENT_THREAD (10), and vice versa. All current PUBLIC_THREAD (11) and ANNOUNCEMENT_THREAD (10) would need to be converted to their appropriate type, this might consume excessive resources, which is why I would recommend Solution 1
Steps to Reproduce
Create a Text Channel (Channel A)
Make a Public Thread (Thread A) [PUBLIC_THREAD (11)]
Archive Thread A
Go into the Settings for Channel A, and turn Announcement Channel on.
Call /channels/<channel_a>/threads/archived/public, with channel_a being the ID of Channel A. (API Call 1)
Make a Public Thread (Thread B) [ANNOUNCEMENT_THREAD (10)]
Archive Thread B
Go into the Settings for Channel A, and turn Announcement Channel off.
Call /channels/<channel_a>/threads/archived/public, with channel_a being the ID of Channel A. (API Call 2)
Expected Behavior
API Call 1 should return Thread A API Call 2 should return Thread A and Thread B
Current Behavior
API Call 1 returns nothing. API Call 2 returns just Thread A
Screenshots/Videos
No response
Client and System Information
Discord API version 10 (Bot) using API with Standalone HTTPS Request through Undici (Version 7.2.0).
The text was updated successfully, but these errors were encountered:
Solution 2: When converting from Text Channel (0) to Announcement Channel (5), convert all PUBLIC_THREAD (11) to ANNOUNCEMENT_THREAD (10), and vice versa. All current PUBLIC_THREAD (11) and ANNOUNCEMENT_THREAD (10) would need to be converted to their appropriate type, this might consume excessive resources, which is why I would recommend Solution 1
I want to add that solution 2 would be a breaking change from the documented behavior, so I would vote for solution 1 too.
Or if solution 2 is the chosen solution, an advance notice with a proper ""deprecation"" period will be required so libs and bots can adjust their code to allow for on-the-fly conversion between the 2 channel types.
And yet it might for a library that has separate classes for separate channel types. Since changing channel types are indeed not documented anywhere apart from the text<->announcement channel change.
Description
I noticed when I called
/channels/<channel_id>/threads/archived/public
on a Channel that was recently turned into an Announcement Channel, it did not give me all the Archived Threads, only Archived Threads after it became an Announcement Channel. I tried to turn it into a Regular Channel, and then it did give me the other Threads, but not the ones made while it was an Announcement Channel.I believe this issue is caused because the API probably only searches for ANNOUNCEMENT_THREAD (10) or PUBLIC_THREAD (11) depending on it's channel type, and neither are converted to other when the Channel Type is converted.
I propose the following as alternatives for solutions:
Solution 1: Make
/channels/<channel_id>/threads/archived/public
search for ANNOUNCEMENT_THREAD (10) and PUBLIC_THREAD (11) regardless of Channel Type.Solution 2: When converting from Text Channel (0) to Announcement Channel (5), convert all PUBLIC_THREAD (11) to ANNOUNCEMENT_THREAD (10), and vice versa. All current PUBLIC_THREAD (11) and ANNOUNCEMENT_THREAD (10) would need to be converted to their appropriate type, this might consume excessive resources, which is why I would recommend Solution 1
Steps to Reproduce
/channels/<channel_a>/threads/archived/public
, with channel_a being the ID of Channel A. (API Call 1)/channels/<channel_a>/threads/archived/public
, with channel_a being the ID of Channel A. (API Call 2)Expected Behavior
API Call 1 should return Thread A
API Call 2 should return Thread A and Thread B
Current Behavior
API Call 1 returns nothing.
API Call 2 returns just Thread A
Screenshots/Videos
No response
Client and System Information
Discord API version 10 (Bot) using API with Standalone HTTPS Request through Undici (Version 7.2.0).
The text was updated successfully, but these errors were encountered: