Skip to content
This repository has been archived by the owner on Sep 1, 2022. It is now read-only.

Commit

Permalink
removed MAX_RESULTS from info.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Mahesh0253 committed Jun 6, 2021
1 parent f19040e commit cfee05f
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 10 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ Check [`sample_info.py`](sample_info.py) before editing [`info.py`](info.py) fil

### Optional Variables
* `COLLECTION_NAME`: Name of the collections. Defaults to Telegram_files. If you going to use same database, then use different collection name for each bot
* `MAX_RESULTS`: Maximum limit for inline search results
* `CACHE_TIME`: The maximum amount of time in seconds that the result of the inline query may be cached on the server
* `USE_CAPTION_FILTER`: Whether bot should use captions to improve search results. (True/False)
* `AUTH_USERS`: Username or ID of users to give access of inline search. Separate multiple users by space. Leave it empty if you don't want to restrict bot usage.
Expand Down
5 changes: 0 additions & 5 deletions app.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,6 @@
"value": "Telegram_files",
"required": false
},
"MAX_RESULTS": {
"description": "Maximum limit for inline search results",
"value": "10",
"required": false
},
"CACHE_TIME": {
"description": "The maximum amount of time in seconds that the result of the inline query may be cached on the server",
"value": "300",
Expand Down
1 change: 0 additions & 1 deletion info.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
USERBOT_STRING_SESSION = environ.get('USERBOT_STRING_SESSION')

# Bot settings
MAX_RESULTS = int(environ.get('MAX_RESULTS', 10))
CACHE_TIME = int(environ.get('CACHE_TIME', 300))
USE_CAPTION_FILTER = bool(environ.get('USE_CAPTION_FILTER', False))

Expand Down
4 changes: 2 additions & 2 deletions plugins/inline.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from pyrogram.types import InlineKeyboardButton, InlineKeyboardMarkup, InlineQueryResultCachedDocument

from utils import get_search_results
from info import MAX_RESULTS, CACHE_TIME, SHARE_BUTTON_TEXT, AUTH_USERS, AUTH_CHANNEL
from info import CACHE_TIME, SHARE_BUTTON_TEXT, AUTH_USERS, AUTH_CHANNEL

logger = logging.getLogger(__name__)
cache_time = 0 if AUTH_USERS or AUTH_CHANNEL else CACHE_TIME
Expand Down Expand Up @@ -36,7 +36,7 @@ async def answer(bot, query):
reply_markup = get_reply_markup(bot.username, query=string)
files, next_offset = await get_search_results(string,
file_type=file_type,
max_results=MAX_RESULTS,
max_results=10,
offset=offset)

for file in files:
Expand Down
1 change: 0 additions & 1 deletion sample_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
USERBOT_STRING_SESSION = ''

# Bot settings
MAX_RESULTS = 10
CACHE_TIME = 300
USE_CAPTION_FILTER = False

Expand Down

0 comments on commit cfee05f

Please sign in to comment.