This commit is contained in:
Davte 2019-12-01 12:42:05 +01:00
parent 886c0c95e4
commit d30ed21de2
3 changed files with 12 additions and 12 deletions

View File

@ -166,7 +166,7 @@ def _main():
simple_bot_token = input("Enter bot token:\t\t") simple_bot_token = input("Enter bot token:\t\t")
with open( with open(
f'{path}/secrets.py', f'{path}/secrets.py',
'a' # Append to file, create if it does not exist 'a' # Append to file, create it if it does not exist
) as secrets_file: ) as secrets_file:
secrets_file.write(f'simple_bot_token = "{simple_bot_token}"\n') secrets_file.write(f'simple_bot_token = "{simple_bot_token}"\n')

View File

@ -39,7 +39,7 @@ def _main():
webhook_bot_token = input("Enter bot token:\t\t") webhook_bot_token = input("Enter bot token:\t\t")
with open( with open(
f'{path}/secrets.py', f'{path}/secrets.py',
'a' # Append to file, create if it does not exist 'a' # Append to file, create it if it does not exist
) as secrets_file: ) as secrets_file:
secrets_file.write(f'webhook_bot_token = "{webhook_bot_token}"\n') secrets_file.write(f'webhook_bot_token = "{webhook_bot_token}"\n')
try: try:
@ -48,7 +48,7 @@ def _main():
hostname = input("Enter host name:\t\t") hostname = input("Enter host name:\t\t")
with open( with open(
f'{path}/secrets.py', f'{path}/secrets.py',
'a' # Append to file, create if it does not exist 'a' # Append to file, create it if it does not exist
) as secrets_file: ) as secrets_file:
secrets_file.write(f'hostname = "{hostname}"\n') secrets_file.write(f'hostname = "{hostname}"\n')
try: try:
@ -57,7 +57,7 @@ def _main():
certificate = input("Enter ssl certificate:\t\t") certificate = input("Enter ssl certificate:\t\t")
with open( with open(
f'{path}/secrets.py', f'{path}/secrets.py',
'a' # Append to file, create if it does not exist 'a' # Append to file, create it if it does not exist
) as secrets_file: ) as secrets_file:
secrets_file.write(f'certificate = "{certificate}"\n') secrets_file.write(f'certificate = "{certificate}"\n')
try: try:
@ -66,7 +66,7 @@ def _main():
local_host = input("Enter local host:\t\t") local_host = input("Enter local host:\t\t")
with open( with open(
f'{path}/secrets.py', f'{path}/secrets.py',
'a' # Append to file, create if it does not exist 'a' # Append to file, create it if it does not exist
) as secrets_file: ) as secrets_file:
secrets_file.write(f'local_host = "{local_host}"\n') secrets_file.write(f'local_host = "{local_host}"\n')
try: try:
@ -75,7 +75,7 @@ def _main():
port = input("Enter local port:\t\t") port = input("Enter local port:\t\t")
with open( with open(
f'{path}/secrets.py', f'{path}/secrets.py',
'a' # Append to file, create if it does not exist 'a' # Append to file, create it if it does not exist
) as secrets_file: ) as secrets_file:
secrets_file.write(f'port = "{port}"\n') secrets_file.write(f'port = "{port}"\n')
try: try:
@ -84,7 +84,7 @@ def _main():
long_polling_bot_token = input("Enter bot token:\t\t") long_polling_bot_token = input("Enter bot token:\t\t")
with open( with open(
f'{path}/secrets.py', f'{path}/secrets.py',
'a' # Append to file, create if it does not exist 'a' # Append to file, create it if it does not exist
) as secrets_file: ) as secrets_file:
secrets_file.write( secrets_file.write(
f'long_polling_bot_token = "{long_polling_bot_token}"\n' f'long_polling_bot_token = "{long_polling_bot_token}"\n'

View File

@ -35,7 +35,7 @@ def _main():
webhook_bot_token = input("Enter bot token:\t\t") webhook_bot_token = input("Enter bot token:\t\t")
with open( with open(
f'{path}/secrets.py', f'{path}/secrets.py',
'a' # Append to file, create if it does not exist 'a' # Append to file, create it if it does not exist
) as secrets_file: ) as secrets_file:
secrets_file.write(f'webhook_bot_token = "{webhook_bot_token}"\n') secrets_file.write(f'webhook_bot_token = "{webhook_bot_token}"\n')
try: try:
@ -44,7 +44,7 @@ def _main():
hostname = input("Enter host name:\t\t") hostname = input("Enter host name:\t\t")
with open( with open(
f'{path}/secrets.py', f'{path}/secrets.py',
'a' # Append to file, create if it does not exist 'a' # Append to file, create it if it does not exist
) as secrets_file: ) as secrets_file:
secrets_file.write(f'hostname = "{hostname}"\n') secrets_file.write(f'hostname = "{hostname}"\n')
try: try:
@ -53,7 +53,7 @@ def _main():
certificate = input("Enter ssl certificate:\t\t") certificate = input("Enter ssl certificate:\t\t")
with open( with open(
f'{path}/secrets.py', f'{path}/secrets.py',
'a' # Append to file, create if it does not exist 'a' # Append to file, create it if it does not exist
) as secrets_file: ) as secrets_file:
secrets_file.write(f'certificate = "{certificate}"\n') secrets_file.write(f'certificate = "{certificate}"\n')
try: try:
@ -62,7 +62,7 @@ def _main():
local_host = input("Enter local host:\t\t") local_host = input("Enter local host:\t\t")
with open( with open(
f'{path}/secrets.py', f'{path}/secrets.py',
'a' # Append to file, create if it does not exist 'a' # Append to file, create it if it does not exist
) as secrets_file: ) as secrets_file:
secrets_file.write(f'local_host = "{local_host}"\n') secrets_file.write(f'local_host = "{local_host}"\n')
try: try:
@ -71,7 +71,7 @@ def _main():
port = input("Enter local port:\t\t") port = input("Enter local port:\t\t")
with open( with open(
f'{path}/secrets.py', f'{path}/secrets.py',
'a' # Append to file, create if it does not exist 'a' # Append to file, create it if it does not exist
) as secrets_file: ) as secrets_file:
secrets_file.write(f'port = "{port}"\n') secrets_file.write(f'port = "{port}"\n')