Necesito mi bot de discordia para escuchar eventos y necesito que tenga comandos. Aquí hay un ejemplo de mi problema.
import os from keepalive import keep_alive from discord.ext import commands client = commands.Bot(command_prefix = "$") banned_words = [ "blah", "blahh", "blahhh" ] @client.event async def on_message(message): msg = message.content msgsend = message.channel.send if any(word in msg.lower() for word in banned_words): await message.channel.purge(limit=1) await msgsend("Please don't use banned words!") @client.command() async def dice(message, amount:int): await message.channel.send("blah blah blah")Agregue await client.process_commands(message) al comienzo de su evento on_message . Este código procesa comandos y permite a los usuarios invocarlos/usarlos.