ChatMemberUpdated
We need https://core.telegram.org/bots/api#chatmemberupdated
@eternnoir Any plan for this major feature? can I work on it?
@i-Naji You can work on it. Everybody can work on it. But nobody works. Thus the progress is quite slow.
@i-Naji I added it today. Hope it will be merged :)
@SwissCorePy @Badiboy Give an example of how ChatMember works.
I tried but it did not work. Python Ver = 3.8
Which handler should we use? Thanks♥
@SwissCorePy @Badiboy Give an example of how ChatMember works.
I tried but it did not work. Python Ver = 3.8
Which handler should we use? Thanks♥
Sorry there was no handler yet. but i added it now. just wait until it is merged.
@bot.my_chat_member_handler()
def my_chat_member_update(cmu: types.ChatMemberUpdated):
# The bot's chat member status was updated in a chat.
print (cmu.from_user) # User : The admin who changed the bot's status
print (cmu.old_chat_member) # ChatMember : The bot's previous status
print (cmu.new_chat_member) # ChatMember : The bot's new status
@bot.chat_member_handler()
def chat_member_update(cmu: types.ChatMemberUpdated):
# A chat member's status was updated in a chat.
print (cmu.from_user) # User : The admin who changed a member's status
print (cmu.old_chat_member) # ChatMember : The member's previous status
print (cmu.new_chat_member) # ChatMember : The member's new status
@SwissCorePy Hello, Thank you for your efforts♥ The code you sent is completely correct and there is no problem. But this code only works on one of my tokens. But on my other tokens I do not receive an answer. :(( We also tested on different accounts with different tokens, but just one of the tokens will work.
Botfather settings are all the same.
What do you think is the problem? If you need more information, enter your Telegram ID.
{'user': {'id': 785493292, 'is_bot': False, 'first_name': 'Uranus', 'username': 'uraous', 'last_name': None, 'language_code': 'en', 'can_join_groups': None, 'can_read_all_group_messages': None, 'supports_inline_queries': None}, 'status': 'member', 'custom_title': None, 'is_anonymous': None, 'can_be_edited': None, 'can_post_messages': None, 'can_edit_messages': None, 'can_delete_messages': None, 'can_restrict_members': None, 'can_promote_members': None, 'can_change_info': None, 'can_invite_users': None, 'can_pin_messages': None, 'is_member': None, 'can_send_messages': None, 'can_send_media_messages': None, 'can_send_polls': None, 'can_send_other_messages': None, 'can_add_web_page_previews': None, 'can_manage_chat': None, 'can_manage_voice_chats': None, 'until_date': None}
@SwissCorePy Hello, Thank you for your efforts♥ The code you sent is completely correct and there is no problem. But this code only works on one of my tokens. But on my other tokens I do not receive an answer. :(( We also tested on different accounts with different tokens, but just one of the tokens will work.
Botfather settings are all the same.
What do you think is the problem? If you need more information, enter your Telegram ID.
{'user': {'id': 785493292, 'is_bot': False, 'first_name': 'Uranus', 'username': 'uraous', 'last_name': None, 'language_code': 'en', 'can_join_groups': None, 'can_read_all_group_messages': None, 'supports_inline_queries': None}, 'status': 'member', 'custom_title': None, 'is_anonymous': None, 'can_be_edited': None, 'can_post_messages': None, 'can_edit_messages': None, 'can_delete_messages': None, 'can_restrict_members': None, 'can_promote_members': None, 'can_change_info': None, 'can_invite_users': None, 'can_pin_messages': None, 'is_member': None, 'can_send_messages': None, 'can_send_media_messages': None, 'can_send_polls': None, 'can_send_other_messages': None, 'can_add_web_page_previews': None, 'can_manage_chat': None, 'can_manage_voice_chats': None, 'until_date': None}
The token should make no difference. But chat member updates are not requested by default. So you have to set the new allowed_updates parameter in polling()/infintity_polling(). If you want allow all update types. just use bot.polling(allowed_updates=util.update_types).
The token should make no difference. But chat member updates are not requested by default. So you have to set the new
allowed_updatesparameter in polling()/infintity_polling(). If you want allow all update types. just usebot.polling(allowed_updates=util.update_types).
Yes it worked :D thanks for your help ♥
The token should make no difference. But chat member updates are not requested by default. So you have to set the new
allowed_updatesparameter in polling()/infintity_polling(). If you want allow all update types. just usebot.polling(allowed_updates=util.update_types).Yes it worked :D thanks for your help ♥
You're welcome :) I think this can be closed