Home > Mobile >  Fetching Guild Categories
Fetching Guild Categories

Time:02-27

I am attempting to fetch all of the guild's categories and list each channel inside of the category.

Is it something like this?

for category in ctx.guild.categories
    for channel in category.channels:
        print(channel.name)

CodePudding user response:

Yes. If you wish to confirm this, you can review the discord.py documentation for Guild.categories and CategoryChannel.channels, or try running your own code.

  • Related