You simply need to get a discord.Guild
instance, you can get that using Bot.get_guild
async def on_ready():
await client.wait_until_ready()
guild = client.get_guild(id_here)
await guild.create_text_channel(name="whatever")
If you want to create a channel in all the guilds the bot is in you can loop through client.guilds
async def on_ready():
await client.wait_until_ready()
for guild in client.guilds:
await guild.create_text_channel(name="whatever")
Reference:
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…