Skip to content

Commit

Permalink
[Gban] make spamwatch ignore wolves and tigers
Browse files Browse the repository at this point in the history
  • Loading branch information
Neppu-Nep committed Apr 11, 2021
1 parent 713615b commit 98bd86b
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions SaitamaRobot/modules/global_bans.py
Original file line number Diff line number Diff line change
Expand Up @@ -415,11 +415,13 @@ def gbanlist(update: Update, context: CallbackContext):

def check_and_ban(update, user_id, should_message=True):

chat = update.effective_chat # type: Optional[Chat]
try:
sw_ban = sw.get_ban(int(user_id))
except:
if user_id in TIGERS or user_id in WOLVES:
sw_ban = None
else:
try:
sw_ban = sw.get_ban(int(user_id))
except:
sw_ban = None

if sw_ban:
update.effective_chat.kick_member(user_id)
Expand Down

0 comments on commit 98bd86b

Please sign in to comment.