This repository has been archived by the owner on Mar 4, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
Home
Iuri Guilherme edited this page Aug 6, 2020
·
3 revisions
Para facilitar o desenvolvimento: json que o robô recebe quando alguém é adicionado e removido no grupo
remover
{
u'from':
{
u'username': u'desci42',
u'first_name': u'Desobediente',
u'last_name': u'Civil',
u'id': 0,
u'language_code': u'en'
},
u'left_chat_participant':
{
u'username': u'cryptoforexbot',
u'first_name': u'Crypto Forex Bot',
u'id': 335985767
},
u'left_chat_member':
{
u'username': u'cryptoforexbot',
u'first_name': u'Crypto Forex Bot',
u'id': 335985767
},
u'chat':
{
u'all_members_are_administrators': True,
u'type': u'group',
u'id': -241182224,
u'title': u'Crypto Forex Bot Development/Testing'
},
u'date': 1495882993,
u'message_id': 4271
}
adicionar
{
u'from':
{
u'username': u'desci42',
u'first_name': u'Desobediente',
u'last_name': u'Civil',
u'id': 0,
u'language_code': u'en'
},
u'new_chat_participant':
{
u'username': u'cryptoforexbot',
u'first_name': u'Crypto Forex Bot',
u'id': 335985767
},
u'new_chat_members':
[
{
u'username': u'cryptoforexbot',
u'first_name': u'Crypto Forex Bot',
u'id': 335985767
}
],
u'chat':
{
u'all_members_are_administrators': True,
u'type': u'group',
u'id': -241182224,
u'title': u'Crypto Forex Bot Development/Testing'
},
u'date': 1495882999,
u'message_id': 4274,
u'new_chat_member':
{
u'username': u'cryptoforexbot',
u'first_name': u'Crypto Forex Bot',
u'id': 335985767
}
}
If you're using MessageHandlers and do not want them to respond to the channel posts automatically forwarded to the discussion group linked to your channel, you can use this filter in your MessageHandler:
~ Filters.user(777000)
777000
is the user id of the Telegram Service Messages chat, that also gives you your login codes and in this case will be the originator of the forwarded channel post.