How to Create a Stage Channel on discord.py

Viewed 1463

Yes, I know this is a new feature and might not get an answer.

Today, discord made a new feature called 'Stage Channels' pretty neat and awesome and I would like to code a discord.py bot to create a discord channel. This is my code:

import discord
from discord.ext import commands
import os

prefix = "r!"
intents = discord.Intents.default()
client = commands.Bot(command_prefix=prefix, intents=intents)

@client.event
async def on_ready():
    print('connected to Discord as {0.user}'.format(client))

@client.command()
async def livechannel(ctx):
  await ctx.guild.create_role(name="Role Name")
  await ctx.guild.create_stage_channel('Stage Name')

client.run(os.getenv('TOKEN'))

it works fine if I change stage to tex and it creates the role.

2 Answers

1.7 has just been released to PyPi, and it comes with stage channels support, to create a stage channel:

await guild.create_stage_channel(...)

Reference:

discord.py doesn't already support them. You don't have any feature for now. The only way is to use the discord api with the requests module, give a look at the official discord.com/developers docs. I see them, and currently they are not documented. Wait at least a eek to see them appear on the docs, and at least one month to see the feature work on discord.py!

Related