U
U
UniFild4452021-12-12 20:29:25
Python
UniFild445, 2021-12-12 20:29:25

How to make the bot answer the user's question "How are you?" word "normal"?

I'm trying to make the bot answer the word "Normal" to the user's question "How are you?" , well, or a message containing the word "deeds", without using a prefix. Nothing happens, not even an error message. Tell me what to do.

Here is the code:

import discord
from discord.ext import commands

bot = commands.Bot(command_prefix = settings['prefix']

@bot.event
async def on_massage(message):
if 'things' in message.content.lower():
await ctx.channel.send('OK')

@bot.event
async def on_ready():
await bot.change_presence(status=discord.Status.online, activity=discord.Game('.help DeverBot.')) #do_not_disturd - "do not disturb" status

bot.run(settings['token'])

Answer the question

In order to leave comments, you need to log in

2 answer(s)
W
Wolf_Yout, 2021-12-12
@UniFild445

@bot.event
async def on_message(message):
    if message.content.startswith("Как дела?"):
        await message.channel.send("Нормально")

Try something like this

S
Sergey Karbivnichy, 2021-12-12
@hottabxp

1) 61b632c3d4446199563415.jpeg
2) Off. documentation for this library (this library is well documented).
Everything. Do not need anything else.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question