Answer the question
In order to leave comments, you need to log in
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
@bot.event
async def on_message(message):
if message.content.startswith("Как дела?"):
await message.channel.send("Нормально")
1)
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 questionAsk a Question
731 491 924 answers to any question