P
P
pythonnovi4ok2020-10-13 10:18:53
Bots
pythonnovi4ok, 2020-10-13 10:18:53

How to make a Telegram bot user registration in Python via SQLite3?

I write a bot in Python in Telegram
I use telebot
How to make it so that when the / start command is pressed, there is a check if the user is in the database or not.
Regarding the database - the name of the user table in it is telegram_id ; username ; status
If there is no user, writes his telegram_id ; username ; status(always 1)
If there is also its status = 1, then write to it - Hello!
Preferably with an example, thanks in advance!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dr. Bacon, 2020-10-13
@bacon

He himself described step by step how to do it, now it remains to go and study SQL so that you no longer come here with such elementary questions.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question