Answer the question
In order to leave comments, you need to log in
How to change the rights of the created chat, how to send a message there and how to ping this created chat?
How to change the rights of the created chat, how to send a message there and how to ping this created chat?
async def on_message(message):
Answer the question
In order to leave comments, you need to log in
@bot.command()
async def create_channel(ctx):
for guild in bot.guilds:
maincategory = discord.utils.get(guild.categories, id=890206389455159346)#id категории где будет создаваться канал
channel = await guild.create_text_channel(name=f'Текстовый Канал',category = maincategory)
member = ctx.author
#await channel.set_permissions(member,manage_channels=True)
emb = discord.Embed(title='Канал Создан', description=f'{ctx.author.mention}, Ваш канал был создан. Для перехода в него нажмите -> <#{channel.id}>')
emb.set_thumbnail(url=ctx.author.avatar_url)
await ctx.send(embed = emb)
emb = discord.Embed(tilte='Текст в канале', description=f'{ctx.author.mention}, ваш канал был создан.')
emb.set_thumbnail(url=ctx.author.avatar_url)
await channel.send(embed = emb)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question