Advertisement
Guest User

Untitled

a guest
Mar 11th, 2020
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. kom = "SELECT user_id, nickname FROM ch_{}".format(chat_id)
  2. c.execute(kom)
  3. max = c.fetchall()
  4. for human in max:
  5. bot.get_chat_member(message.chat.id, human[0])
  6. usern = '{} {}'.format(message.from_user.first_name, message.from_user.last_name)
  7. if usern[-4:] == 'None':
  8. usern = usern[:-5]
  9. if usern == 'None':
  10. usern = '{}'.format(message.from_user.username)
  11. req = "UPDATE ch_{} SET nickname = '{}' WHERE user_id = '{}'".format(chat_id, usern, human[0])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement