You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Telegram bots now supports inline queries, which allows the bot to provide information even if it isn't in that specific group. I plan to implement the feature with the following API:
@bot.inline(cache=60, private=True, paginate=10)defprocess_inline(user, query):
ifnotquery:
returnFalse# do not send the repliesi=1whileTrue:
# Send an article with `i` as the title and "A number" as the contentyieldbotogram.inline_article(str(i), "A number")
i+=1
Because it's implemented as a generator, it's possible to implement pagination framework-side without processing every item you might send. In the example above, most of the times you will process only the first 10-20 numbers, but the user is able to scroll down how much he wants.
The text was updated successfully, but these errors were encountered:
Telegram bots now supports inline queries, which allows the bot to provide information even if it isn't in that specific group. I plan to implement the feature with the following API:
Because it's implemented as a generator, it's possible to implement pagination framework-side without processing every item you might send. In the example above, most of the times you will process only the first 10-20 numbers, but the user is able to scroll down how much he wants.
The text was updated successfully, but these errors were encountered: