a much better approach to last commit

master
Aevann 2023-08-20 03:58:58 +03:00
parent ee6c0f9a6f
commit 9e147029d5
1 changed files with 4 additions and 5 deletions

View File

@ -156,11 +156,7 @@ def NOTIFY_USERS(text, v, oldtext=None, ghost=False, log_cost=None, followers_pi
cost = 0
coin_receivers = set()
groups = group_mention_regex.finditer(text)
if len(list(groups)) > 5:
abort(403, "You can only ping a maximum of 5 ping groups!")
for i in groups:
for i in group_mention_regex.finditer(text):
if oldtext and i.group(1) in oldtext:
continue
@ -212,6 +208,9 @@ def NOTIFY_USERS(text, v, oldtext=None, ghost=False, log_cost=None, followers_pi
if SITE == 'rdrama.net' and v.id in {256, 9287, 10489, 18701}:
notify_users.discard(AEVANN_ID)
if len(notify_users) > 200:
abort(403, "You can only notify a maximum of 200 users.")
return notify_users - BOT_IDs - {v.id, 0} - v.all_twoway_blocks