remove redundant if in setfm

This commit is contained in:
yuki 2025-10-08 00:39:47 -03:00
parent 94f43336f7
commit 7be4fee669

View file

@ -10,10 +10,11 @@ def setup(bot: bot.Bot):
if not username:
await ctx.send(u.error_msg("Please provide your Last.fm username.\n\
usage: `/fm <your last.fm username>`"))
else:
try:
await bot.set_lastfm(ctx.author.id, username)
await ctx.send(u.good_msg(f"Your Last.fm user has been set to **{username}**!"))
except Exception as e:
print(e)
await ctx.send(u.error_msg("Unknown database error."))
return
try:
await bot.set_lastfm(ctx.author.id, username)
await ctx.send(u.good_msg(f"Your Last.fm user has been set to **{username}**!"))
except Exception as e:
print(e)
await ctx.send(u.error_msg("Unknown database error."))