def count_channels(channels):
text = 0
voice = 0
categories = 0
for channel in channels:
if isinstance(channel, discord.TextChannel):
text += 1
elif isinstance(channel, discord.VoiceChannel):
voice += 1
elif isinstance(channel, discord.CategoryChannel):
categories += 1
return text, voice, categories
评论列表
文章目录