Compare commits

..

No commits in common. "e364f354b007a9deeefacfab8bd35c03069d9402" and "1a37ec8838ac76e985bab7cb2a0801110b69ee7f" have entirely different histories.

4 changed files with 8 additions and 20 deletions

View file

@ -12,33 +12,21 @@ class MyStats(commands.Cog):
self.bot = bot
@commands.command(name="mystats")
async def mystats(self, ctx, *, target_user: str = None):
async def mystats(self, ctx, target_user: str = None):
"""Affiche tous les PB d'un utilisateur avec les nouvelles difficultés"""
if ctx.channel.id != AUTHORIZED_CHANNEL_ID:
return
try:
if target_user:
matches = db_manager.find_user_by_name(target_user)
if not matches:
await ctx.send(f"❌ No data found for **{target_user}**.")
return
if len(matches) > 1:
await ctx.send(f"⚠️ Multiple users found for **{target_user}**. Please be more specific.")
return
user_id, display_name = matches[0]
else:
user_id = ctx.author.id
display_name = ctx.author.display_name
user_data = db_manager.get_user_all_pbs(user_id)
username = target_user if target_user else ctx.author.id
user_data = db_manager.get_user_all_pbs(username)
if not user_data:
await ctx.send(f"❌ No data found for **{display_name}**.")
await ctx.send(f"❌ No data found for **{ctx.author.display_name}**.")
return
embed = discord.Embed(
title=f"📊 {display_name}'s Complete Stats",
title=f"📊 {ctx.author.display_name}'s Complete Stats",
color=0x00bfff
)

View file

@ -10,7 +10,7 @@ class Pbchimera(commands.Cog):
self.bot = bot
@commands.command(name="pbchimera")
async def pbchimera(self, ctx, arg1: str = None, *, arg2: str = None):
async def pbchimera(self, ctx, arg1: str = None, arg2: str = None):
"""Commande !pbchimera avec gestion des difficultés"""
await handle_pb_command(ctx, 'chimera', arg1, arg2)

View file

@ -10,7 +10,7 @@ class Pbcvc(commands.Cog):
self.bot = bot
@commands.command(name="pbcvc")
async def pbcvc(self, ctx, *, target_user: str = None):
async def pbcvc(self, ctx, target_user: str = None):
"""Commande !pbcvc"""
await handle_pb_command(ctx, 'cvc', target_user)

View file

@ -10,7 +10,7 @@ class Pbhydra(commands.Cog):
self.bot = bot
@commands.command(name="pbhydra")
async def pbhydra(self, ctx, arg1: str = None, *, arg2: str = None):
async def pbhydra(self, ctx, arg1: str = None, arg2: str = None):
"""Commande !pbhydra avec gestion des difficultés"""
await handle_pb_command(ctx, 'hydra', arg1, arg2)