I'am trying to get the name of the channel that sending message into other channel's chat. For example: I have channel named Cat and Cat chat; also I have a channel Dog. I've send the message using Dog into Cat chat and I wanna to get name Dog into variable.
I've tried message.from_user.username
and message.from_user.first_name
but it printed Channel_bot and Channel.
There is example of other channel commenting in my chat
So nickname "gdfgd" should be saved in variable. Is there any method that doing it? I'm using python and aiogram.
CodePudding user response:
https://core.telegram.org/bots/api#chat
I think you need a key 'message.chat.title'
CodePudding user response:
I found method message.sender_chat.title
that prints what i wanted!