I'm trying to create a voice channel on my discord server using a bot, but I need it in a specific position on the list of channels. How do I do this?
2 Answers
0
votes
Check out the documentation for VoiceChannel.edit.
You can pass position={index}
to move the channel to an arbitrary position in your channellist.
0
votes
In case someone wants a snippet
# creates the category at the top of the server channels
category_text = 'ex category'
category = await ctx.guild.create_category(category_text, position=0)
# creates the channel
channel_total_members = await ctx.guild.create_text_channel('lmao1')
# edit other parameters of the channel such as name, position or the category that is in
await channel_total_members.edit(name="test1", position=0, category=category)