Add name to .stats command

This commit is contained in:
Michael De Roover 2021-03-15 01:33:40 +01:00
parent afa5772631
commit 019f63fd08
Signed by: vim
GPG Key ID: 075496E232CE04CB

12
ubot.py
View File

@ -62,10 +62,14 @@ async def edit(event):
mentions += dialog.unread_mentions_count mentions += dialog.unread_mentions_count
unread += dialog.unread_count unread += dialog.unread_count
rpl = f'Private chats: {pms} ({pms - bots} users / {bots} bots)\n' sender = await event.get_sender()
rpl += f'Groups: {groups} ({gadmin} admin / {gcreator} creator)\n' name = (sender.first_name)
rpl += f'Channels: {chans} ({cadmin} admin / {ccreator} creator)\n'
rpl += f'Unread: {unread} ({mentions} mentions)\n' rpl = f'**Stats for {name}**\n'
rpl += f'**Private chats:** {pms} ({pms - bots} users / {bots} bots)\n'
rpl += f'**Groups:** {groups} ({gadmin} admin / {gcreator} creator)\n'
rpl += f'**Channels:** {chans} ({cadmin} admin / {ccreator} creator)\n'
rpl += f'**Unread:** {unread} ({mentions} mentions)\n'
await event.edit(rpl) await event.edit(rpl)
if '.fire' in msg: if '.fire' in msg: