From c40cc9fb85700c4b5c6cbdc84b55a4875da97d28 Mon Sep 17 00:00:00 2001 From: Hafitz Setya <71178188+breakdowns@users.noreply.github.com> Date: Fri, 11 Jun 2021 05:08:52 +0700 Subject: [PATCH] revert * Update README.md * Update __init__.py * Update __main__.py * Update config_sample.env * Update app.json --- README.md | 1 - app.json | 4 ---- bot/__init__.py | 6 ------ bot/__main__.py | 4 ++-- config_sample.env | 1 - 5 files changed, 2 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 9c28094..fd14e12 100644 --- a/README.md +++ b/README.md @@ -152,7 +152,6 @@ Fill up rest of the fields. Meaning of each fields are discussed below: - **UPTOBOX_TOKEN**: Uptobox token to mirror uptobox links. Get it from [Uptobox Premium Account](https://uptobox.com/my_account). - **HEROKU_API_KEY**: (Only if you deploying on Heroku) Your Heroku API key, get it from https://dashboard.heroku.com/account. - **HEROKU_APP_NAME**: (Only if you deploying on Heroku) Your Heroku app name. -- **IGNORE_PENDING_REQUESTS**: If you want the bot to ignore pending requests after it restarts, set this to `True`. - **SHORTENER_API**: Fill your Shortener api key if you are using Shortener. - **SHORTENER**: if you want to use Shortener in Gdrive and index link, fill Shortener url here. Examples: ``` diff --git a/app.json b/app.json index e14083e..d0b5751 100644 --- a/app.json +++ b/app.json @@ -140,10 +140,6 @@ "description": "Show Image/Logo in /start message, Use telegra.ph or any direct link image.", "value": "https://telegra.ph/file/db03910496f06094f1f7a.jpg", "required": false - }, - "IGNORE_PENDING_REQUESTS": { - "description": "If you want the bot to ignorepending requests after it restarts, set this to True.", - "required": false }, "VIEW_LINK": { "description": "View Link button to open file Index Link in browser instead of direct download link, you can figure out if it's compatible with your Index code or not, open any video from you Index and check if the END of link from browser link bar is ?a=view, if yes make it True it will work (Compatible with Bhadoo Index Code).", diff --git a/bot/__init__.py b/bot/__init__.py index 1b16424..808a724 100644 --- a/bot/__init__.py +++ b/bot/__init__.py @@ -296,12 +296,6 @@ try: except KeyError: IMAGE_URL = 'https://telegra.ph/file/db03910496f06094f1f7a.jpg' -IGNORE_PENDING_REQUESTS = False -try: - if getConfig("IGNORE_PENDING_REQUESTS").lower() == "true": - IGNORE_PENDING_REQUESTS = True -except KeyError: - pass updater = tg.Updater(token=BOT_TOKEN, use_context=True) bot = updater.bot diff --git a/bot/__main__.py b/bot/__main__.py index c550d2a..c80e1cb 100644 --- a/bot/__main__.py +++ b/bot/__main__.py @@ -11,7 +11,7 @@ import time from telegram import ParseMode, BotCommand from telegram.ext import CommandHandler, run_async -from bot import bot, dispatcher, updater, botStartTime, IMAGE_URL, IGNORE_PENDING_REQUESTS +from bot import bot, dispatcher, updater, botStartTime, IMAGE_URL from bot.helper.ext_utils import fs_utils from bot.helper.telegram_helper.bot_commands import BotCommands from bot.helper.telegram_helper.message_utils import * @@ -238,7 +238,7 @@ def main(): dispatcher.add_handler(help_handler) dispatcher.add_handler(stats_handler) dispatcher.add_handler(log_handler) - updater.start_polling(IGNORE_PENDING_REQUESTS) + updater.start_polling() LOGGER.info("Bot Started!") signal.signal(signal.SIGINT, fs_utils.exit_clean_up) diff --git a/config_sample.env b/config_sample.env index f9e2c86..ad897ee 100644 --- a/config_sample.env +++ b/config_sample.env @@ -14,7 +14,6 @@ TELEGRAM_HASH = "" DATABASE_URL = "" # Optional config AUTHORIZED_CHATS = "" -IGNORE_PENDING_REQUESTS = "" USE_SERVICE_ACCOUNTS = "" INDEX_URL = "" UPTOBOX_TOKEN = ""