Mahesh0253/Media-Search-bot

Any way to run this bot for specific users ?

Closed this issue · 11 comments

Anyway to run this bot for specific users ?
Because i want to run this bot for private purpose.so anyway to prevent others using it by comamands or env vars ?

Add chat filter for inline query in inline.py file (line no.8)

Example:
@Client.on_inline_query(filters.chat(1234))

Replace 1234 by your chat id

can i add more chat ids like 123,456,555 ?

Yes, use list in filter. For example filters.chat([1234, 5678, 54311])

IMG_20200914_193317_450

getting InlineQuery object has no attribute "chat" error after changing like that

like files are not showing while i search as inline

Try with filters.user instead of filters.chat

Try with filters.user instead of filters.chat

Tried.But one problem,still everyone can access the bot and files.

i changed as like you said @Client.on_inline_query(filters.user(MY NUMERIC ID)) and still the bot is working for other peoples

By filters.user other users can't access files in inline search, please check it again

Yes, use list in filter. For example filters.chat([1234, 5678, 54311])

The previous issue was solved.i put CACHE_TIME to 0 and hopefully it worked.

now see this image whilebi outting one more ids,it shows an error.anyway to fix this one too ?

IMG_20200914_224227_502

put ids in list format - filters.user([1234, 5678, 54311])

Use put ids in list format - filters.user([1234, 5678, 54311])

Worked.Thank you for your great help ☺️