diff --git a/commands/collage.py b/commands/collage.py index a911d95..6caf099 100644 --- a/commands/collage.py +++ b/commands/collage.py @@ -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"