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

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +3 -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(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",
@@ -79,7 +79,6 @@ async def user_status_ban(username: int = None):
79
  async def hello():
80
  return {"success": "hello world!"}
81
 
82
- @fast_app.get("")
83
  @fast_app.get("/user/get_story")
84
  async def get_user_story(link: str = None):
85
  username, random_id = get_random_from_channel(link)
 
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: str = None):
63
  username_ch = "RendyProjects"
64
  try:
65
+ mention_user = await client.get_users(username)
66
+ user = await 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",
 
79
  async def hello():
80
  return {"success": "hello world!"}
81
 
 
82
  @fast_app.get("/user/get_story")
83
  async def get_user_story(link: str = None):
84
  username, random_id = get_random_from_channel(link)