fix report.py
This commit is contained in:
+2
-1
@@ -26,7 +26,8 @@ PYTHONCHATRU = -1001338616632 # pythonchatru
|
|||||||
|
|
||||||
URL_RX = re.compile(r'\w+\.\w+/\w+')
|
URL_RX = re.compile(r'\w+\.\w+/\w+')
|
||||||
ALLOWED_WORDS = ['paste', 'nekobin', 'github', 'google', 'nometa', 'python', 'django', 'flask', 'fastapi', 'wiki',
|
ALLOWED_WORDS = ['paste', 'nekobin', 'github', 'google', 'nometa', 'python', 'django', 'flask', 'fastapi', 'wiki',
|
||||||
'stackoverflow', 'habr', 'medium', 'youtu', 'stepik', 'telegra', '#rtfm', 'support']
|
'stackoverflow', 'habr', 'medium', 'youtu', 'stepik', 'telegra', '#rtfm', 'support',
|
||||||
|
'jetbrains', ]
|
||||||
|
|
||||||
WHITEUN = set(os.environ.get('whitelist', '<<<ERR_USRS').split(','))
|
WHITEUN = set(os.environ.get('whitelist', '<<<ERR_USRS').split(','))
|
||||||
WHITEIDS = {int(i) for i in os.environ.get('whiteids', '<<<ERR_IDS').split(',')}
|
WHITEIDS = {int(i) for i in os.environ.get('whiteids', '<<<ERR_IDS').split(',')}
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ from .config import DATA
|
|||||||
|
|
||||||
|
|
||||||
def create_report_text(chat_id):
|
def create_report_text(chat_id):
|
||||||
|
report = ''
|
||||||
top_users = ''
|
top_users = ''
|
||||||
flooders = []
|
flooders = []
|
||||||
if os.path.exists(f'{DATA}{chat_id}.db'):
|
if os.path.exists(f'{DATA}{chat_id}.db'):
|
||||||
|
|||||||
Reference in New Issue
Block a user