Send owner name on delete

This commit is contained in:
norohind 2021-12-27 19:21:11 +03:00
parent 00ba5be476
commit e4a7007807
Signed by: norohind
GPG Key ID: 01C3BECC26FB59E1
2 changed files with 3 additions and 2 deletions

View File

@ -232,11 +232,12 @@ def detect_removing_ru_squads(squad_id: int, db_conn: sqlite3.Connection):
tag = important[3]
user_tags = json.loads(important[4])
created = important[5]
owner_name = important[6]
if 32 in user_tags:
# ru squad
message = f'Deleted RU squad `{name}`\nplatform: {platform}, members: {members}, tag: {tag}, ' \
f'created: {created}'
f'created: {created}, owner: `{owner_name}`'
utils.notify_discord(message)
return

View File

@ -104,7 +104,7 @@ where squad_id = ? and type_of_news = 'public_statements'
order by inserted_timestamp desc
limit 2;"""
select_important_before_delete: str = """select name, platform, member_count, tag, user_tags, created
select_important_before_delete: str = """select name, platform, member_count, tag, user_tags, created, owner_name
from squads_view
where squad_id = ?;"""