discord / discord-api-docs

Official Discord API Documentation
https://discord.com/developers/docs/intro
Other
5.95k stars 1.26k forks source link

listing active threads doesn't show applied_tags #6258

Closed svenwiltink closed 1 year ago

svenwiltink commented 1 year ago

Description

The active threads resource used to list applied_tags because it returns a list of channel objects. Instead of performing a single call to list all active threads with a certain tag applied we now have to perform N requests, where N is the amount of active threads.

Steps to Reproduce

list active threads https://discord.com/api/guilds/118456055842734083/threads/active

Expected Behavior

Expecting the body to contain applied_tags

Current Behavior

body does not contain applied tags

Screenshots/Videos

{
  "id": "1114486033875214397",
  "type": 11,
  "last_message_id": "1114625620853395561",
  "flags": 0,
  "guild_id": "118456055842734083",
  "name": "What is the difference between the curl cmd and go func?",
  "parent_id": "118456055842734083",
  "rate_limit_per_user": 0,
  "bitrate": 64000,
  "user_limit": 0,
  "rtc_region": null,
  "owner_id": "294518258457903106",
  "thread_metadata": {
    "archived": false,
    "archive_timestamp": "2023-06-03T09:33:55.840100+00:00",
    "auto_archive_duration": 4320,
    "locked": false,
    "create_timestamp": "2023-06-03T09:33:55.840100+00:00"
  },
  "message_count": 19,
  "member_count": 3,
  "total_message_sent": 19
}

Client and System Information

Just using curl

kkrypt0nn commented 1 year ago

Well first things first, it's time to update the API version to something non-deprecated - especially when dealing with these channel types.

image

Though it also doesn't return the data in v10

svenwiltink commented 1 year ago

whoops. Edited the original post to reflect the api version I actually tried. Copied the wrong version from my terminal after trying a bunch of versions

boudewijnbout commented 1 year ago

Hey, is there a workaround for this or something?

kkrypt0nn commented 1 year ago

Hey, is there a workaround for this or something?

Doing a request per thread to get its applied tags

boudewijnbout commented 1 year ago

How do I do this?

And is this temporary or is this the new way to get the tags?

kkrypt0nn commented 1 year ago

How do I do this?

With this

And is this temporary or is this the new way to get the tags?

Until an employee responds, we don't know. Considering there's a synced label to the issue they are/will be looking into it.

svenwiltink commented 1 year ago

That is what we've done as well: https://github.com/discord-gophers/forumcleaner/blob/50f87306d28b6c8c99c91c90e11071e65ad42572/main.go#L165-L170

rain-discord commented 1 year ago

This is fixed now