@commands.Cog.listener()
async def on_member_update(self, before, after):
current_time = datetime.datetime.now()
formatted_time = current_time.strftime("%Y-%m-%d %H:%M:%S")
embed = disnake.Embed(
title="Роли участника изменены.",
# description="",
colour=0xFFFF00,
)
embed.add_field(
name="до\n",
value=f"```{before.roles}```\n" ,
inline=False
)
embed.add_field(
name="после:\n",
value=f"```{after.roles}```\n" ,
inline=False
)
embed.add_field(name="Автор:\n"
, value="" f")\n"
, inline=True)
embed.add_field(name="Канал:\n"
, value=f" ()\n"
, inline=True)
embed.set_footer(
text=f"Id сообщения: • {formatted_time}",
)
channel = self.bot.get_channel(1230603543396880384)
await channel.send(embed=embed)