S
S
shuzzixd2021-07-09 21:18:03
Python
shuzzixd, 2021-07-09 21:18:03

How to create a system for blocking a user by id in a telegram bot through the sqlite3 database?

For example: I write /ban 198468345
Then this id gets into the list of blocked. I think it's pretty easy to do this.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
U
UberPool, 2021-07-09
@UberPool

1.Make a table with banned users.
2.At the ban command, add user data.
3.When new messages in the bot, check if its id is in this table.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question