I am new to Python (and, of course to discord.py), and I didn't really find any documentation on websites or on the official Discord for this question.
I was wondering if there is any function inside discord.py that would create a category on a server ( client.get_server('295959610043531264')
)
Thanks a lot ;)
You can create categories and channel simple with this code.
the command: !new category admin-chat
@client.command()
async def new(ctx, arg1, arg2):
guild = ctx.message.guild
if arg1 == "channel":
await guild.create_text_channel(arg2)
elif arg1 == "category":
await ctx.guild.create_category(arg2)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.