U
U
u_pwnd2017-04-19 22:30:28
Python
u_pwnd, 2017-04-19 22:30:28

Need to know user id via reply pytelegrambotapi?

Need to know user id via reply pytelegrambotapi

@bot.message_handler(commands=['getid'])
def command_getid(m):
    cid = m.chat.id
    bot.send_message(cid, str(m.chat.id) + " " + m.from_user.username)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vitaly, 2017-09-03
@u_pwnd

cid = m.chat.idThis is the user ID

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question