remove redundant if in setfm
This commit is contained in:
parent
94f43336f7
commit
7be4fee669
1 changed files with 8 additions and 7 deletions
|
|
@ -10,10 +10,11 @@ def setup(bot: bot.Bot):
|
||||||
if not username:
|
if not username:
|
||||||
await ctx.send(u.error_msg("Please provide your Last.fm username.\n\
|
await ctx.send(u.error_msg("Please provide your Last.fm username.\n\
|
||||||
usage: `/fm <your last.fm username>`"))
|
usage: `/fm <your last.fm username>`"))
|
||||||
else:
|
return
|
||||||
try:
|
|
||||||
await bot.set_lastfm(ctx.author.id, username)
|
try:
|
||||||
await ctx.send(u.good_msg(f"Your Last.fm user has been set to **{username}**!"))
|
await bot.set_lastfm(ctx.author.id, username)
|
||||||
except Exception as e:
|
await ctx.send(u.good_msg(f"Your Last.fm user has been set to **{username}**!"))
|
||||||
print(e)
|
except Exception as e:
|
||||||
await ctx.send(u.error_msg("Unknown database error."))
|
print(e)
|
||||||
|
await ctx.send(u.error_msg("Unknown database error."))
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue