From 7be4fee6695ca2675e19899a9d4ac3f16807d84e Mon Sep 17 00:00:00 2001 From: yuki Date: Wed, 8 Oct 2025 00:39:47 -0300 Subject: [PATCH] remove redundant if in setfm --- commands/config.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/commands/config.py b/commands/config.py index d27687c..1467019 100644 --- a/commands/config.py +++ b/commands/config.py @@ -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 `")) - 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."))