List Discord channels
TL;DR
About
Discord's developer API hands a server's channel list to a bot added to that server, and adding one takes the Manage Server permission. Without that, the list to work from is your own sidebar as your signed-in account sees it, scrolled to the bottom, since Discord only keeps the rows near the scroll position on the page. Say you are a plain member of a 120-channel modding server for a city-builder game and only care about #releases and the three channels under "Bug Reports". Grab the guildId from list_servers and run this once. A filter on category plus #releases leaves four URLs to feed read_messages every morning. If one of them is a forum, it needs list_forum_posts instead, and the output will not flag it because there is no channel type field. Folded categories are where people get caught out: Discord removes their already-read channels, so a category with collapsed true comes back short. Unfold it first.
Input
guildId requiredServer id, e.g. from discord.com/list_servers.
Output
guildId requiredchannels requiredChannels in sidebar order. The sidebar is scrolled top to bottom to cover rows the page renders lazily. Threads are not listed (a channel's thread rows are skipped).
categories requiredCategories in sidebar order.
Example output
Shape only: placeholder values generated from the output schema, not a real run.
{
"guildId": "abc123",
"channels": [
{
"url": "https://example.com/item/123",
"name": "Example",
"category": "…",
"channelId": "abc123"
}
],
"categories": [
{
"name": "Example",
"channelId": "abc123",
"collapsed": true
}
]
}