F
F
Felix_fenik2020-08-04 09:12:26
Python
Felix_fenik, 2020-08-04 09:12:26

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)


what's wrong?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dimonchik, 2020-08-04
@dimonchik2013

item is wrong

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question