Answer the question
In order to leave comments, you need to log in
User ban via Telegram Python bot?
How to make it so that I can ban a user through my account through his id.
/ban userid
Answer the question
In order to leave comments, you need to log in
Take any database, even a json file and create a blacklist
table/array
. And in the bot you get an ID on command (but first check by ID that the sender is you) and если не существует в базе > добавить
update the database using the construction.
And then the simplest (approximate pseudocode)
if user_id in blocklist_db:
return
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question