mirror of
https://github.com/miloszowi/everyone-mention-telegram-bot.git
synced 2025-10-25 16:35:55 +00:00
Banned users env, access validator, removed silent command, code quality improvements
This commit is contained in:
10
src/validator/accessValidator.py
Normal file
10
src/validator/accessValidator.py
Normal file
@@ -0,0 +1,10 @@
|
||||
from config.credentials import BANNED_USERS
|
||||
from exception.actionNotAllowedException import ActionNotAllowedException
|
||||
|
||||
|
||||
class AccessValidator:
|
||||
|
||||
@staticmethod
|
||||
def validate(user_id: str) -> None:
|
||||
if user_id in BANNED_USERS:
|
||||
raise ActionNotAllowedException('You are banned')
|
||||
Reference in New Issue
Block a user