mirror of
https://github.com/skoobasteeve/telegram-moviebot.git
synced 2026-04-20 16:38:57 +00:00
fix disney+, make filter user optional
This commit is contained in:
@@ -66,7 +66,7 @@ def services_speller(service):
|
|||||||
elif service == "netflix":
|
elif service == "netflix":
|
||||||
service_proper = "Netflix"
|
service_proper = "Netflix"
|
||||||
elif service == "disney":
|
elif service == "disney":
|
||||||
service_proper = "Disney+"
|
service_proper = "Disney\+"
|
||||||
elif service == "apple":
|
elif service == "apple":
|
||||||
service_proper = "Apple TV\+"
|
service_proper = "Apple TV\+"
|
||||||
elif service == "paramount":
|
elif service == "paramount":
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ tmdb_api_token = os.environ.get("TMDB_API_TOKEN")
|
|||||||
sa_api_token = os.environ.get("SA_API_TOKEN")
|
sa_api_token = os.environ.get("SA_API_TOKEN")
|
||||||
bot_token = os.environ.get("TG_BOT_TOKEN")
|
bot_token = os.environ.get("TG_BOT_TOKEN")
|
||||||
|
|
||||||
filter_user = "@skoobasteeve"
|
filter_user = ""
|
||||||
|
|
||||||
tmdb_url = "https://api.themoviedb.org/3"
|
tmdb_url = "https://api.themoviedb.org/3"
|
||||||
tmdb_headers = {
|
tmdb_headers = {
|
||||||
@@ -123,8 +123,12 @@ def unknown(update: Update, context: CallbackContext):
|
|||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
|
||||||
|
if filter_user:
|
||||||
start_handler = CommandHandler('start', start,
|
start_handler = CommandHandler('start', start,
|
||||||
Filters.user(username=filter_user))
|
Filters.user(username=filter_user))
|
||||||
|
else:
|
||||||
|
start_handler = CommandHandler('start', start)
|
||||||
|
|
||||||
dispatcher.add_handler(start_handler)
|
dispatcher.add_handler(start_handler)
|
||||||
|
|
||||||
unknown_handler = MessageHandler(Filters.command, unknown)
|
unknown_handler = MessageHandler(Filters.command, unknown)
|
||||||
|
|||||||
Reference in New Issue
Block a user