Telethon: Response from a send_message() gives "Message is not iterable" error when being iterated
03:00 10 Jun 2022

I am using python and replying to a message using this code in telethon:

    s = client.send_message(entity='group', message='Thank you!', reply_to=chatid)
    print(s)

And get the response well printed:

    Message(id=34535, peer_id=PeerUser(user_id=55455544), date=datetime.datetime(2022, 6, 10, 6, 20, tzinfo=datetime.timezone.utc), # and so on... 

I can clearly see the output well but the error is there when I try to iterate over it. However, when I tried looping over the response variable s using this:

    message_id = []
    message = []
    sender = []
    for chat in s:
        message_id.append(chat.id)
        message.append(chat.message)
        sender.append(chat.from_id)

I get this error:

    TypeError: 'Message' object is not iterable

Is there a way to fix this error? Or a workaround? I want to get the chatid from the response and store it in a variable. Thank you for giving time to read my question!

python iterable telethon