randydev commited on
Commit
6c9a559
·
verified ·
1 Parent(s): e7b7d36

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +4 -4
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(user_id: int = None):
63
- username = "RendyProjects"
64
  try:
65
- mention_user = await user_client.get_users(user_id)
66
- user = await user_client.get_chat_member(username, user_id)
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",