Home python How to create a channel on a specific discord server?

How to create a channel on a specific discord server?

Author

Date

Category

Tell me how to create a text feed on a specific server using a command on another?
That is, there is server X where the command! Channelcreate (channel name) (server id Y) is entered, after which a text channel is created on server Y.


Answer 1

Why did I find the strength to read the docks of Discord.py

@ bot.command ()
async def createTxtChannel (ctx, name, count, server):
  if count.lower ()! = 'while':
    x = 0
    while x! = int (count):
      guild = ctx.message.guild
      guild.id = server
      await guild.create_text_channel (name)
      x = x + 1
  else:
    while 1 == 1:
      guild = ctx.message.guild
      guild.id = server
      await guild.create_text_channel (name)

Programmers, Start Your Engines!

Why spend time searching for the correct question and then entering your answer when you can find it in a second? That's what CompuTicket is all about! Here you'll find thousands of questions and answers from hundreds of computer languages.

Recent questions