From 16677146cafe4c1dfcab093f59a5a30c8f43631c Mon Sep 17 00:00:00 2001 From: ranto-dev05 Date: Sat, 15 Aug 2026 18:14:35 -0400 Subject: [PATCH] chore: proteger arranque con if __name__ == '__main__' --- main.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/main.py b/main.py index 6fb4f7a..d935074 100644 --- a/main.py +++ b/main.py @@ -66,8 +66,12 @@ async def on_ready() -> None: logger.info(f"Bot conectado como {bot.user}") -if settings.discord_token is None: - print("Error: No se encontrĂ³ el token de Discord." - ) -else: - bot.run(settings.discord_token) \ No newline at end of file +def main() -> None: + if settings.discord_token is None: + print("Error: No se encontrĂ³ el token de Discord.") + return + bot.run(settings.discord_token) + + +if __name__ == "__main__": + main() \ No newline at end of file