Compare commits
3 commits
615f0cd184
...
2200f4a3cd
| Author | SHA1 | Date | |
|---|---|---|---|
| 2200f4a3cd | |||
| 7ff4463963 | |||
| 1daa666ee1 |
1 changed files with 14 additions and 2 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue