randydev commited on
Commit
8636018
·
verified ·
1 Parent(s): 9bd76ca

Update Akeno/plugins/deakall.py

Browse files
Files changed (1) hide show
  1. Akeno/plugins/deakall.py +4 -1
Akeno/plugins/deakall.py CHANGED
@@ -128,9 +128,11 @@ async def lastall(client: Client, message: Message):
128
  recently_count = 0
129
  last_week_count = 0
130
  online_count = 0
 
131
  pro = await message.reply_text("Wait processing.....")
132
  async for dialog in client.get_dialogs():
133
  if dialog.top_message and dialog.top_message.from_user:
 
134
  user_id = dialog.top_message.from_user.id
135
  if dialog.chat.type == ChatType.PRIVATE:
136
  if dialog.top_message.from_user:
@@ -149,6 +151,7 @@ async def lastall(client: Client, message: Message):
149
  elif dialog.top_message.from_user.status == UserStatus.LAST_WEEK:
150
  if user_id:
151
  last_week_count += 1
 
152
  elif dialog.top_message.from_user.status == UserStatus.ONLINE:
153
  if user_id:
154
  online_count += 1
@@ -157,7 +160,7 @@ async def lastall(client: Client, message: Message):
157
  f"LONG_AGO: `{long_ago_count}`\n"
158
  f"OFFLINE: `{offline_count}`\n"
159
  f"RECENTLY: `{recently_count}`\n"
160
- f"LAST_WEEK: `{last_week_count}`\n"
161
  f"ONLINE: `{online_count}`\n"
162
  )
163
  await pro.edit_text(count_all_msg)
 
128
  recently_count = 0
129
  last_week_count = 0
130
  online_count = 0
131
+ last_week_text = ""
132
  pro = await message.reply_text("Wait processing.....")
133
  async for dialog in client.get_dialogs():
134
  if dialog.top_message and dialog.top_message.from_user:
135
+ first_name = dialog.top_message.from_user.first_name
136
  user_id = dialog.top_message.from_user.id
137
  if dialog.chat.type == ChatType.PRIVATE:
138
  if dialog.top_message.from_user:
 
151
  elif dialog.top_message.from_user.status == UserStatus.LAST_WEEK:
152
  if user_id:
153
  last_week_count += 1
154
+ last_week_text += f"User First Name: {first_name} | UserID: {user_id}\n"
155
  elif dialog.top_message.from_user.status == UserStatus.ONLINE:
156
  if user_id:
157
  online_count += 1
 
160
  f"LONG_AGO: `{long_ago_count}`\n"
161
  f"OFFLINE: `{offline_count}`\n"
162
  f"RECENTLY: `{recently_count}`\n"
163
+ f"`• {last_week_count} | {last_week_text}`\n"
164
  f"ONLINE: `{online_count}`\n"
165
  )
166
  await pro.edit_text(count_all_msg)