Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -228,16 +228,10 @@ def block_user(user_id, user, reason):
|
|
| 228 |
blocked = True
|
| 229 |
attempts = 0
|
| 230 |
while not finished:
|
| 231 |
-
|
| 232 |
-
|
| 233 |
-
|
| 234 |
-
|
| 235 |
-
time.sleep(60)
|
| 236 |
-
|
| 237 |
-
if attempts > 5:
|
| 238 |
-
finished = True
|
| 239 |
-
break
|
| 240 |
-
|
| 241 |
print("Blocked {}, for {}".format(user, reason))
|
| 242 |
return blocked
|
| 243 |
|
|
|
|
| 228 |
blocked = True
|
| 229 |
attempts = 0
|
| 230 |
while not finished:
|
| 231 |
+
attempts = attempts + 1
|
| 232 |
+
client.account_block(user_id)
|
| 233 |
+
|
| 234 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 235 |
print("Blocked {}, for {}".format(user, reason))
|
| 236 |
return blocked
|
| 237 |
|