in telethon:
keyb += [[Button.url(f"{csql.getCaptcha(str(chat.id))[3]}", url="http://t.me/{}?start=captcha_{}_{}".format(sender.username, event.chat_id, event.message_id))]]
Getting Error:
AttributeError: 'Event' object has no attribute 'message_id'. Did you mean: '_message_id'?
in ptb bot username is there and in telethon user's username if any
event.id
Thanks
AttributeError: 'Event' object has no attribute 'id'
yeah, if you're in ChatAction use event.action_message.id
I have tried to print event ChatAction.Event(action_message=None, original_update=UpdateChannelParticipant(channel_id=1561993353, date=datetime.datetime(2023, 9, 15, 17, 7, 21, tzinfo=datetime.timezone.utc), actor_id=5591734243, user_id=5591734243, qts=261049223, via_chatlist=False, prev_participant=ChannelParticipant(user_id=5591734243, date=datetime.datetime(2023, 9, 15, 16, 58, 30, tzinfo=datetime.timezone.utc)), new_participant=None, invite=None), new_pin=False, new_photo=False, photo=None, user_added=False, user_joined=False, user_left=True, user_kicked=False, unpin=True, created=False, new_title=None, new_score=None)
no need. this one has no message id, because there is no message, there is message "User x joined/left" at smaller chats and when no participants are hidden, this one is equivalent of ChatMemberUpdated
It's get worked
It's get Worked Bro Thanks
Обсуждают сегодня