K
K
ki ki2020-01-25 18:10:11
Python
ki ki, 2020-01-25 18:10:11

How to temporarily block users of my bot?

There is a database that contains a 'black list' with user_id.
How to make the bot temporarily not respond to requests from blacklisted users?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Andrey, 2020-01-25
@anerev

Check if the user is in an emergency and just ignore his messages or send him a message about the ban.

S
sergeyfilippov4, 2020-01-26
@sergeyfilippov4

ignore_list = ()
if user_id in ignore_list:
    continue

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question