development #1

Merged
AllfatherHatt merged 157 commits from development into master 2025-06-14 15:47:26 +02:00
Showing only changes of commit 4e64b77b91 - Show all commits

View File

@ -38,7 +38,7 @@ class ReginaldCog(commands.Cog):
@commands.command(name="reginald", help="Ask Reginald a question in shared channels")
@commands.cooldown(1, 10, commands.BucketType.user)
async def reginald(self, ctx, *, prompt=None):
"""Handles multi-user memory tracking in shared channels"""
"""Handles multi-user memory tracking in shared channels, recognizing mentions properly."""
if not await self.is_admin(ctx) and not await self.is_allowed(ctx):
await ctx.send("You do not have the required role to use this command.")
@ -53,7 +53,11 @@ class ReginaldCog(commands.Cog):
await ctx.send("OpenAI API key not set. Use `!setreginaldcogapi`.")
return
channel_id = str(ctx.channel.id) # ✅ Track memory per-channel
channel_id = str(ctx.channel.id)
# ✅ Convert mentions into readable names
for mention in ctx.message.mentions:
prompt = prompt.replace(f"<@{mention.id}>", mention.display_name)
# ✅ Ensure only one update per channel at a time
if channel_id not in self.memory_locks: