PyTelegramSender/config.py
2024-04-21 23:10:52 +02:00

8 lines
263 B
Python

import json
print("\033[1;32;40mConfiguration\033[1;34;40m")
token = input("Telegram Bot Token: ")
chatid = input("Telegram Chat ID: ")
with open('telegram.json', 'w') as file:
json.dump({'token': token, 'chatid': chatid}, file)
print("Configuration saved.")