Auto create config file if it doesn't exist

This commit is contained in:
2026-02-25 20:27:54 +00:00
parent 4a7fdea118
commit 2ef948e970

View File

@@ -11,11 +11,12 @@ if not os.path.exists(default_config_path):
os.makedirs('config', exist_ok=True)
with open(default_config_path, 'w') as f:
f.write(
'# Reddit API credentials\n'
'username = ""\n'
'password = ""\n'
'client_id = ""\n'
'client_secret = ""\n'
'user_agent = "Flair Timer Comment Bot"\n'
'user_agent = "Flair Timer Comment Bot" # Must be unique and descriptive\n'
'\n'
'# Subreddits\n'
'subreddit = ""\n'