Не работает строка await bot.process_commands discord.py
Суть заключается в том, что бот должен переписывать сообщение в эмбет и на свой эмбет ставить реакции, соответственно удалять оригинал. Оно работает НО не работают команды. Я уже пробывал await bot.process_commands(ctx) но бесполезно. Вот весь код:
from discord.ext import commands
print("Starts...")
intents = discord.Intents.all()
bot = commands.Bot(command_prefix='g.',intents=intents)
@bot.event
async def on_message(ctx):
if ctx.author != bot.user:
channel = bot.get_channel(1073146856223293530)
if channel.id == ctx.channel.id:
await ctx.delete()
embed = discord.Embed(title=f"От: {ctx.author.name}", description=ctx.content, color=0x3498db)
message = await channel.send(embed=embed)
await message.add_reaction('👍')
await message.add_reaction('👎')
# не работает↓
await bot.process_commands(ctx)
@bot.command()
async def hello(ctx):
author = ctx.message.author
await ctx.send(f'Hello, {author.mention}!')
bot.run("TOKEN")
Если же убрать то что дальше bot.event к bot.command, то команды будут работать.
Источник: Stack Overflow на русском