A
A
Andrey Andreev2021-03-09 20:43:06
Python
Andrey Andreev, 2021-03-09 20:43:06

Easy question for the discord bot?

In short, how to make it so that the type of bot could mark a person in its message. For example, here I have hello_words
When a person writes, the bot answers him (Hi, what did you want), but how to make sure that when a person writes, the bot writes to him (hello, write @andrey) and what would it be like a person, not an inscription.?

hello_words = [ 'привет']

async def on_message( message):
  msg = message.content.lower()

  if msg in hello_words:
    emb = discord.Embed( color=0xDB952B, description='Привет чего хотел?')
    await message.channel.send( embed=emb )
  if msg in answer_words:
    emb = discord.Embed( color=0xDB952B, description='Пропиши в чат .help')
    await message.channel.send( embed=emb )

  await client.process_commands(message)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander, 2021-03-09
@Scripteer

https://stackoverflow.com/questions/43964328/how-d...
PS - don't forget about punctuation, it's impossible to read the text..

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question