forked from rDrama/rDrama
fix
parent
f4164052cf
commit
7b8483b83f
|
@ -379,26 +379,27 @@ def execute_blackjack(v, target, body, type):
|
||||||
elif hasattr(target, 'is_banned'):
|
elif hasattr(target, 'is_banned'):
|
||||||
target.is_banned = True
|
target.is_banned = True
|
||||||
|
|
||||||
extra_info = "unknown entity"
|
if CARP_ID and AEVANN_ID:
|
||||||
|
extra_info = "unknown entity"
|
||||||
|
|
||||||
if type == 'submission':
|
if type == 'submission':
|
||||||
extra_info = target.permalink
|
extra_info = target.permalink
|
||||||
elif type == 'chat':
|
elif type == 'chat':
|
||||||
extra_info = "chat message"
|
extra_info = "chat message"
|
||||||
elif type == 'flag':
|
elif type == 'flag':
|
||||||
extra_info = f"reports on {target.permalink}"
|
extra_info = f"reports on {target.permalink}"
|
||||||
elif type == 'modmail':
|
elif type == 'modmail':
|
||||||
extra_info = "modmail"
|
extra_info = "modmail"
|
||||||
elif type in {'comment', 'message'}:
|
elif type in {'comment', 'message'}:
|
||||||
for id in (CARP_ID, AEVANN_ID):
|
for id in (CARP_ID, AEVANN_ID):
|
||||||
n = Notification(comment_id=target.id, user_id=id)
|
n = Notification(comment_id=target.id, user_id=id)
|
||||||
g.db.add(n)
|
g.db.add(n)
|
||||||
g.db.flush()
|
g.db.flush()
|
||||||
extra_info = None
|
extra_info = None
|
||||||
|
|
||||||
if extra_info:
|
if extra_info:
|
||||||
for id in (CARP_ID, AEVANN_ID):
|
for id in (CARP_ID, AEVANN_ID):
|
||||||
send_repeatable_notification(id, f"Blackjack for @{v.username}: {extra_info}")
|
send_repeatable_notification(id, f"Blackjack for @{v.username}: {extra_info}")
|
||||||
return False
|
return False
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue