1

I am trying to query an inline telegram bot in telethon, along the guidelines of the Docs. I'm having trouble being able to select one of the outputs on the menu from the bot. For simplicity, it is an inline bot in a channel about colors and if you query it the string "favorite color poll" a menu pops up with a selection of colors to choose from. My code is as follows:

from telethon import TelegramClient
from telethon.tl.functions.messages import GetInlineBotResultsRequest
from telethon.tl.functions.messages import SendInlineBotResultRequest

async def main():
    bot_results = client(GetInlineBotResultsRequest(colorbot, colorgroup, 'favorite 
    color poll', ''))

But then I get confused how to recognize the values of the options from the bot and to select one. I know it should be something along these lines:

client(SendInlineBotResultRequest(get_input_peer(colorbot), obtained_query_id, obtained_str_id))

But I am unsure of how to use these parameters to find the desired output of the bot and to select it.

Exosylver
  • 135
  • 1
  • 14

0 Answers0