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 was looking for listing all of the channels (including all types) with categories (sorted correctly like in UI) and found that comment from Danny on issue #2392. I noticed that the result returned by that method ignores empty categories (categories with no channels in it) for some reasons.
Reproduction Steps
Create a guild with two categories
Create some test channels under one of the categories, leave the other empty
Use ctx.guild.by_category() and see results
@commands.command()asyncdeftest(self, ctx):
awaitctx.send(ctx.guild.by_category()) # Supposed to return both categoriesawaitctx.send(len(ctx.guild.by_category())) # Supposed to return 2
Expected Results
It should return all categories, so 2 in total.
Actual Results
It ignores the empty category and only returns one.
Summary
I was looking for listing all of the channels (including all types) with categories (sorted correctly like in UI) and found that comment from Danny on issue #2392. I noticed that the result returned by that method ignores empty categories (categories with no channels in it) for some reasons.
Reproduction Steps
ctx.guild.by_category()
and see resultsExpected Results
It should return all categories, so 2 in total.
Actual Results
It ignores the empty category and only returns one.
Checklist
System Information
020
The text was updated successfully, but these errors were encountered: