From eba71cdb70e715e52b3f859b577342e9662efb2d Mon Sep 17 00:00:00 2001 From: Lasse Studion Date: Sun, 18 Dec 2022 08:51:13 +0100 Subject: [PATCH] Create config.json from start if not existing. --- twitterbot.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/twitterbot.py b/twitterbot.py index 4811b5b..6393b7c 100644 --- a/twitterbot.py +++ b/twitterbot.py @@ -31,6 +31,9 @@ def start_bot(default=True): return first_tweet_id if __name__ == "__main__": + + conf = config.get_config() + if len(sys.argv) > 1: if sys.argv[1].lower() == 'start': if sys.argv[1].lower() == 'default': @@ -53,7 +56,7 @@ if __name__ == "__main__": print('Exiting...') conf = config.get_config() - + print(f'You have posted your first tweet: https://twitter.com/{conf["bot_username"]}/status/{first_tweet_id}') # Start monitoring answers to the first tweet.