Compare commits

...

3 commits

Author SHA1 Message Date
2200f4a3cd handle mentions in collage 2025-10-08 06:56:24 -03:00
7ff4463963 fix error message 2025-10-08 06:38:03 -03:00
1daa666ee1 add await whoops 2025-10-08 06:35:07 -03:00

View file

@ -15,7 +15,7 @@ def setup(bot: bot.Bot):
temp_msg = None
if 'x' not in size:
await ctx.send(u.error_msg("Please provide a valid size.\nie `/chart album 5x5`"))
await ctx.send(u.error_msg("Please provide a valid size.\nie `/chartalbum 5x5`"))
return
if int(size.split('x')[0]) > 5 or int(size.split('x')[1]) > 5:
@ -33,6 +33,18 @@ def setup(bot: bot.Bot):
print("returned")
return
if username.startswith("[@:"):
mentioned = bot.get_user(username[3:-1])
try: username = await bot.get_lastfm(mentioned.id)
except Exception as e:
print(e)
await ctx.send(u.error_msg(f"Unknown database error:\n{e}"))
if not username:
await ctx.send(u.error_msg(f"[@:{mentioned.id}] doesn't seem to have an account set. Do so with `/setfm`."))
print("returned")
return
match timeframe:
case "a" | "all" | "alltime" | "o" | "overall": timeframe = "overall"
case "y" | "year" | "yearly": timeframe = "12month"
@ -42,7 +54,7 @@ def setup(bot: bot.Bot):
case _: "7day"
if timeframe == "1day":
ctx.send(u.error_msg("Daily charts are not yet supported. Sorry!!"))
await ctx.send(u.error_msg("Daily charts are not yet supported. Sorry!!"))
return
try: