diff --git a/TeleGatherer.py b/TeleGatherer.py index fb9645a..f136caa 100644 --- a/TeleGatherer.py +++ b/TeleGatherer.py @@ -250,6 +250,10 @@ def add_token_and_chat_id_to_file(file_path, bot_token, chat_id): file_path = ".bot-history" # Replace with the actual file path + # Remove possible keyword "bot" before the token + if args.bot_token.startswith("bot"): + args.bot_token = args.bot_token[3:] + if check_file_for_token_and_chat_id(file_path, args.bot_token, args.chat_id): print("Bot token and chat ID pair already exists in the file.") response = input("Are you sure you want to continue? (y/n): ") @@ -258,4 +262,4 @@ def add_token_and_chat_id_to_file(file_path, bot_token, chat_id): else: add_token_and_chat_id_to_file(file_path, args.bot_token, args.chat_id) - main(args.bot_token, args.chat_id) \ No newline at end of file + main(args.bot_token, args.chat_id)