Skip to content

Instantly share code, notes, and snippets.

@Kylmakalle
Created June 10, 2017 12:36
Show Gist options
  • Save Kylmakalle/0bb68ed5f83a3bfa5abf6e203c966375 to your computer and use it in GitHub Desktop.
Save Kylmakalle/0bb68ed5f83a3bfa5abf6e203c966375 to your computer and use it in GitHub Desktop.
if blocked.contains(users.ID == str(message.new_chat_member.id)):
bot.kick_chat_member(message.chat.id, message.new_chat_member.id)
bot.send_message(message.chat.id, '`' + message.new_chat_member.first_name + '`' + ' was blocked',
parse_mode='Markdown')
bot.send_message(me, '`' + message.new_chat_member.first_name + '`' + ' #id' + str(
message.new_chat_member.id) + ' was banned because of *BLOCK* in #{}'.format(message.chat.username),
parse_mode='Markdown')
blocked.remove(eids=[blocked.get(users.ID == str(message.new_chat_member.id)).eid])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment