-1

Heres The Code: (I want to be able to use commands and have events working at the same time, Yes the on_ready event does work at all times, Its a selfbot)

@bot.event
async def on_message(message):
    if message.content == "hey it looks like you already have a full bank BUD":
        await message.channel.send('pls use banknote')

@bot.command()
async def d(ctx):
 print(Fore.BLUE + ('Running Farmer 1.0 - Dank Memer') + Fore.RESET)
 while True:
  await ctx.send('pls fish')
  await ctx.send('pls dig')
  await ctx.send('pls hunt')
  await ctx.send('pls beg')
  await ctx.send('pls dep all')
Redz
  • 3
  • 3
  • 2
    Does this answer your question? [Why does on\_message stop commands from working?](https://stackoverflow.com/questions/49331096/why-does-on-message-stop-commands-from-working) – TheFungusAmongUs Jun 25 '22 at 17:38

1 Answers1

-1

Add

await bot.process_commands(message)

to the end of your on_message.

Consider checking the FAQ: https://discordpy.readthedocs.io/en/stable/faq.html#why-does-on-message-make-my-commands-stop-working

stijndcl
  • 5,294
  • 1
  • 9
  • 23