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