Advertisement
Guest User

Untitled

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