Conditions | 1 |
Total Lines | 18 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | # -*- coding: utf-8 -*- |
||
18 | async def ban_members(user_id, time_out): |
||
19 | |||
20 | """ |
||
21 | |||
22 | The function is designed to ban the chat user. |
||
23 | |||
24 | """ |
||
25 | |||
26 | add_members = f""" |
||
27 | INSERT |
||
28 | INTO banned_chat_members (user_id, time_out) |
||
29 | VALUES ({user_id}, FROM_UNIXTIME({time_out})) |
||
30 | ON DUPLICATE KEY UPDATE time_out = time_out |
||
31 | """ |
||
32 | |||
33 | cursor.execute(add_members) |
||
34 | |||
35 | db.commit() |
||
36 |