Почему disnake бот не обнаруживает embed при слушании сообщений?
import disnake
from disnake.ext import commands
import asyncio
class BumpBonusListener(commands.Cog):
def __init__(self, bot: commands.Bot):
self.bot = bot
@commands.Cog.listener()
async def on_message(self, message: disnake.Message):
if message.author.id != 575776004233232386:
return
await asyncio.sleep(5)
if not message.embeds:
return
for embed in message.embeds:
if not embed.description:
continue
description = embed.description
if "Вы успешно лайкнули сервер." in description:
await message.reply("Спасибо за лайк!")
print(f"Произошёл бамп сервера. автор - {message.author.id}")
return
elif "Не так быстро, сэр." in description:
print(f"Бампа не случилось. автор - {message.author.id}")
return
else:
print(f"Неизвестное описание: {description}")
def setup(bot: commands.Bot):
bot.add_cog(BumpBonusListener(bot))
У меня получалось в тестах ловить эмбед, если я добавляю задержку, но на этапе реализации что-то всё равно идет не так. Заранее спасибо за помощь)