change: update config.ini

use definitions from danbooru dotenv, add comments

Signed-off-by: mctaylors <cantsendmails@mctaylors.ru>
This commit is contained in:
Macintxsh 2025-03-26 14:03:09 +03:00
parent 895f27470f
commit 496ea38b5c
Signed by: mctaylors
GPG key ID: 4EEF4F949A266EE2
4 changed files with 19 additions and 11 deletions

View file

@ -34,14 +34,14 @@ def main() -> None:
def validate_config() -> None:
# TODO: do some PublicDomain checks or something
# TODO: do some HostName checks or something
# noinspection PyBroadException
try:
response = requests.get(f"http://{config.get('Service', 'Domain')}/status.json")
response = requests.get(f"http://{config.get('App', 'Host')}/status.json")
if response.status_code != 200:
raise
except:
print("Unable validate Domain in config.ini.")
print("Unable validate App.Host in config.ini.")
exit(1)
@ -52,7 +52,7 @@ def get_token():
if config.get('General', 'Token') != "":
return config.get('General', 'Token')
print("Set BOT_TOKEN environment variable or use config.ini to set bot token.")
print("Set BOT_TOKEN environment variable or use General.Token in config.ini to set bot token.")
exit(1)