S
S
svntxxnx2021-01-04 06:39:12
Python
svntxxnx, 2021-01-04 06:39:12

How to know the user id of my bot in telegram?

Good day everyone!

I create a telegram bot using the Pytelegrambotapi library

Question:

Is it possible to do this so that the id and username are stored in a variable?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Danny Arty, 2021-01-04
@svntxxnx

variable_name = c.from_user.first_nameand
variable_id = c.from_user.idaccordingly

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question