pyTelegramBotAPI icon indicating copy to clipboard operation
pyTelegramBotAPI copied to clipboard

inline_example

Open DevMykola opened this issue 1 year ago • 8 comments

  1. What version of pyTelegramBotAPI are you using? Last
  2. What OS are you using? Android 12, one ui
  3. What version of python are you using? Last

Example "inline_example.py" doesn't work.

@bot.inline_handler(lambda query: query.query == 'text')
def query_text(inline_query):

query_text does not start

DevMykola avatar Apr 23 '24 19:04 DevMykola

Any details?

Badiboy avatar Apr 23 '24 20:04 Badiboy

I added details by editing

DevMykola avatar Apr 23 '24 20:04 DevMykola

image

Enabled?

Badiboy avatar Apr 23 '24 20:04 Badiboy

Yes. When i wrote "@mybot ", "@mybot text", "@mybot photo1" the input field was loading and nothing. In logs at this time: received 0 new updates. As far as I understand, TeleBot.Inline_handler() just doesn't work

DevMykola avatar Apr 23 '24 20:04 DevMykola

You have to play with allowed_updates in infinity_polling if you are sure that you are not getting the updates.

coder2020official avatar Apr 25 '24 16:04 coder2020official

@coder2020official Fast check shown that something is not obvious there. I'll check deeper later.

Badiboy avatar Apr 25 '24 16:04 Badiboy

What do you mean by "something is not obvious there"? I have been using inline handlers for a long time. I think problem is within the allowed updates list

coder2020official avatar Apr 25 '24 16:04 coder2020official

With allowed_updates in infinity_polling works as it should

DevMykola avatar Apr 25 '24 18:04 DevMykola