mirror of
https://github.com/IgorL123/mafia_api.git
synced 2026-09-23 23:20:19 +00:00
kill by userID
This commit is contained in:
@@ -49,12 +49,14 @@ def action(): # put application's code here
|
|||||||
cur = db.cursor
|
cur = db.cursor
|
||||||
|
|
||||||
if killedUserID != healedUserID:
|
if killedUserID != healedUserID:
|
||||||
cur.execute(f"UPDATE Users SET isAlive = false WHERE TrueUserID = '{killedUserID}'")
|
cur.execute(f"Select UserID from chats join userschats uc on uc.chatid = chats.chatid join "
|
||||||
|
f"users on users.userid = uc.userid where truechatid = '{trueChatID}' and TrueUserID = '{killedUserID}'")
|
||||||
|
id = cur.fetchall()[0]
|
||||||
|
cur.execute(f"UPDATE Users SET isAlive = false WHERE UserID = '{id}'")
|
||||||
response["killedUserId"] = killedUserID
|
response["killedUserId"] = killedUserID
|
||||||
|
|
||||||
cur.execute(f"SELECT role FROM users WHERE TrueUserID ='{checkedUserID}';")
|
cur.execute(f"SELECT role FROM users WHERE TrueUserID ='{checkedUserID}';")
|
||||||
row = cur.fetchall()
|
role = cur.fetchall()[0]
|
||||||
role = row[0]
|
|
||||||
|
|
||||||
if role == 4:
|
if role == 4:
|
||||||
response["checkedRole"] = True
|
response["checkedRole"] = True
|
||||||
|
|||||||
Reference in New Issue
Block a user