feat(stats): New /profile command.

This commit is contained in:
2023-10-09 18:23:10 +03:00
parent d674dc4c8e
commit cfc9ea5ea9
3 changed files with 112 additions and 3 deletions

View File

@@ -17,11 +17,11 @@ async def get_profile_card(bot: LionBot, userid: int, guildid: int):
ranks: Optional[RankCog] = bot.get_cog('RankCog')
stats: Optional[StatsCog] = bot.get_cog('StatsCog')
if ranks is None or stats is None:
return
raise ValueError("Cannot get profile card without ranks and stats cog loaded.")
guild = bot.get_guild(guildid)
if guild is None:
return
raise ValueError(f"Cannot get profile card without guild {guildid}")
lion = await bot.core.lions.fetch_member(guildid, userid)
luser = lion.luser