randydev commited on
Commit
fb2f620
·
verified ·
1 Parent(s): 7176b19

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +6 -1
main.py CHANGED
@@ -81,6 +81,10 @@ async def get_chat_raw(username: str = None):
81
  try:
82
  chat_raw = (await client.get_chat(username)).raw
83
  ok = await user_client.get_chat(username)
 
 
 
 
84
  except Exception:
85
  return {"error": "Error try again invalid"}
86
  return {
@@ -107,7 +111,8 @@ async def get_chat_raw(username: str = None):
107
  "last_online_date": ok.pinned_message.from_user.last_online_date if ok.pinned_message.from_user else None,
108
  "username": ok.pinned_message.from_user.username if ok.pinned_message.from_user else None,
109
  "is_premium": ok.pinned_message.from_user.is_premium if ok.pinned_message.from_user else None,
110
- "is_scam": ok.pinned_message.from_user.is_scam if ok.pinned_message.from_user else None
 
111
  },
112
  "can_view_participants": chat_raw.can_view_participants,
113
  "can_set_username": chat_raw.can_set_username,
 
81
  try:
82
  chat_raw = (await client.get_chat(username)).raw
83
  ok = await user_client.get_chat(username)
84
+ response = await js.get_creation_date(
85
+ api_key="akeno_OSrXhljIomunACd5JY18jFIeIuuB6Pdx",
86
+ user_id=ok.pinned_message.from_user.id
87
+ )
88
  except Exception:
89
  return {"error": "Error try again invalid"}
90
  return {
 
111
  "last_online_date": ok.pinned_message.from_user.last_online_date if ok.pinned_message.from_user else None,
112
  "username": ok.pinned_message.from_user.username if ok.pinned_message.from_user else None,
113
  "is_premium": ok.pinned_message.from_user.is_premium if ok.pinned_message.from_user else None,
114
+ "is_scam": ok.pinned_message.from_user.is_scam if ok.pinned_message.from_user else None,
115
+ "creation_date": response
116
  },
117
  "can_view_participants": chat_raw.can_view_participants,
118
  "can_set_username": chat_raw.can_set_username,