From faaeb087731f07dd5768dcc0bfb5808205155ca8 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Mon, 6 Jul 2020 23:50:09 +0200 Subject: [PATCH] Display the bot's username instead of "greed" in the starting message --- core.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core.py b/core.py index 781dc1d..704d742 100644 --- a/core.py +++ b/core.py @@ -39,7 +39,7 @@ def main(): # Test the specified token log.debug("Testing bot token...") try: - bot.get_me() + me = bot.get_me() except telegram.error.Unauthorized: logging.fatal("The token you have entered in the config file is invalid. Fix it, then restart greed.") sys.exit(1) @@ -58,7 +58,7 @@ def main(): next_update = None # Notify on the console that the bot is starting - log.info("greed is starting!") + log.info(f"@{me.username} is starting!") # Main loop of the program while True: