setpersona command fix

This commit is contained in:
esef committed 2026-06-29 19:12:07 +03:00
1 parent d338e474b1
commit 9c410d3daa
2 files changed
+8 -5

No files matched your search

+8 -5
View File
@@ -121,11 +121,11 @@ class AIRoleplay(commands.Cog):
if wh: if wh:
display_name = persona.capitalize() display_name = persona.capitalize()
for i, chunk in enumerate(chunks): # set webhook avatar before sending (avatar takes bytes via edit, not send)
kwargs = {'content': chunk, 'username': display_name, 'wait': True} if avatar_bytes:
if i == 0 and avatar_bytes: await wh.edit(avatar=avatar_bytes)
kwargs['avatar'] = avatar_bytes for chunk in chunks:
await wh.send(**kwargs) await wh.send(content=chunk, username=display_name, wait=True)
else: else:
first = True first = True
for chunk in chunks: for chunk in chunks:
@@ -141,6 +141,9 @@ class AIRoleplay(commands.Cog):
if message.author.bot or not message.guild: if message.author.bot or not message.guild:
return return
# ensure commands always work
await self.bot.process_commands(message)
mentioned = self.bot.user in message.mentions mentioned = self.bot.user in message.mentions
in_active = message.channel.id in self.active_channels in_active = message.channel.id in self.active_channels
Binary file not shown.

Before

Width:  |  Height:  |  Size: 787 KiB

After

Width:  |  Height:  |  Size: 1.2 MiB