mirror of
https://github.com/skoobasteeve/telegram-moviebot.git
synced 2026-03-20 03:28:57 +00:00
error and exit if env variables are empty
This commit is contained in:
@@ -135,6 +135,18 @@ def unknown(update: Update, context: CallbackContext):
|
|||||||
|
|
||||||
def main():
|
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:
|
if filter_user:
|
||||||
start_handler = CommandHandler('start', start,
|
start_handler = CommandHandler('start', start,
|
||||||
Filters.user(username=filter_user))
|
Filters.user(username=filter_user))
|
||||||
|
|||||||
Reference in New Issue
Block a user