Spaces:
Sleeping
Sleeping
Captain Ezio
commited on
Commit
·
f87a0c5
1
Parent(s):
92b81e1
Update info.py
Browse files- Powers/plugins/info.py +17 -18
Powers/plugins/info.py
CHANGED
@@ -98,25 +98,24 @@ async def user_info(c: Gojo, user, already=False):
|
|
98 |
is_bot = user.is_bot
|
99 |
is_fake = user.is_fake
|
100 |
status = user.status
|
101 |
-
|
102 |
if is_bot is True:
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
last_date = "User is currently online"
|
120 |
|
121 |
caption = f"""
|
122 |
<b><i><u>⚡️ Extracted User info From Telegram ⚡️</b></i></u>
|
|
|
98 |
is_bot = user.is_bot
|
99 |
is_fake = user.is_fake
|
100 |
status = user.status
|
101 |
+
last_date = "Unable to fetch"
|
102 |
if is_bot is True:
|
103 |
+
last_date = "Targeted user is a bot"
|
104 |
+
if status == enums.UserStatus.RECENTLY:
|
105 |
+
last_date = "User was seen recently"
|
106 |
+
if status == enums.UserStatus.LAST_WEEK:
|
107 |
+
last_date = "User was seen last week"
|
108 |
+
if status == enums.UserStatus.LAST_MONTH:
|
109 |
+
last_date = "User was seen last month"
|
110 |
+
if status == enums.UserStatus.LONG_AGO:
|
111 |
+
last_date = "User was seen long ago or may be I am blocked by the user :("
|
112 |
+
if status == enums.UserStatus.ONLINE:
|
113 |
+
last_date = "User is online"
|
114 |
+
if status == enums.UserStatus.OFFLINE:
|
115 |
+
try:
|
116 |
+
last_date = datetime.fromtimestamp(user.status.date).strftime("%Y-%m-%d %H:%M:%S")
|
117 |
+
except Exception as e:
|
118 |
+
last_date = "User is offline"
|
|
|
119 |
|
120 |
caption = f"""
|
121 |
<b><i><u>⚡️ Extracted User info From Telegram ⚡️</b></i></u>
|