Update main.py
Browse files
main.py
CHANGED
@@ -59,11 +59,11 @@ async def startup_event():
|
|
59 |
LOGS.info(f"Started UserBot: {userbot.me.first_name}")
|
60 |
|
61 |
@fast_app.get("/user/status/ban")
|
62 |
-
async def user_status_ban(
|
63 |
-
|
64 |
try:
|
65 |
-
mention_user = await user_client.get_users(
|
66 |
-
user = await user_client.get_chat_member(
|
67 |
if user.status == ChatMemberStatus.BANNED:
|
68 |
return {
|
69 |
"message": f"❌ you {mention_user.first_name} have been blocked from the RendyProjects",
|
|
|
59 |
LOGS.info(f"Started UserBot: {userbot.me.first_name}")
|
60 |
|
61 |
@fast_app.get("/user/status/ban")
|
62 |
+
async def user_status_ban(username: int = None):
|
63 |
+
username_ch = "RendyProjects"
|
64 |
try:
|
65 |
+
mention_user = await user_client.get_users(username)
|
66 |
+
user = await user_client.get_chat_member(username_ch, username)
|
67 |
if user.status == ChatMemberStatus.BANNED:
|
68 |
return {
|
69 |
"message": f"❌ you {mention_user.first_name} have been blocked from the RendyProjects",
|