Answer the question
In order to leave comments, you need to log in
Python discord bot. So that the bot sends a message to the selected channel and a message through the chat?
# Отправка сообщения от имени бота
@client.command()
@commands.has_permissions(administrator = True)
async def say(ctx, channel : discord.TextChannel, *args):
await ctx.message.delete()
if not channel:
await ctx.send( 'Введите канал, в который вы хотите отправить сообщение ')
return
if not args:
await ctx.send('Необходимо ввести текст сообщения')
text = ' '
for item in args:
text = text + item + ' '
await channel.send(text)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question