When I get the history chat message with a bot I can't see the "hello" message ("What can this bot do?") in the return message_context. How can I get it?
message_context = client.send_message(bot_name, '/start')
for message in client.iter_messages(bot_name):
print("{}".format(bot_name))
You need to use GetFullUserRequest to fetch the bot_info attribute of the UserFull instance:
from telethon.sync import TelegramClient
from telethon import functions, types
with TelegramClient(name, api_id, api_hash) as client:
result = client(functions.users.GetFullUserRequest(bot_name))
bot_info = result.bot_info
print(bot_info)
print(bot_info.description)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With