error and exit if env variables are empty

This commit is contained in:
2022-04-23 13:36:23 -04:00
parent 1ae6c9b82a
commit 53bbb750d0

View File

@@ -135,6 +135,18 @@ def unknown(update: Update, context: CallbackContext):
def main():
if not tmdb_api_token:
print("ERROR: TMDB API token not provided. Exiting...")
exit()
if not sa_api_token:
print("ERROR: Streaming Availability API token not provided. Exiting...")
exit()
if not bot_token:
print("ERROR: Telegram bot token not provided. Exiting...")
exit()
if filter_user:
start_handler = CommandHandler('start', start,
Filters.user(username=filter_user))