Display restrictions in whois information

This commit is contained in:
Justin Crawford 2021-04-09 11:37:02 -07:00 committed by blank X
parent 5d9a11f591
commit a97fdb9548
Signed by: blankie
GPG Key ID: CC15FC822C7F61F5
1 changed files with 6 additions and 0 deletions

View File

@ -55,6 +55,12 @@ async def info(client, message):
if entity.username: if entity.username:
text_ping += f'\n<b>Username:</b> @{entity.username}' text_ping += f'\n<b>Username:</b> @{entity.username}'
text_unping += f'\n<b>Username:</b> @{ZWS}{entity.username}' text_unping += f'\n<b>Username:</b> @{ZWS}{entity.username}'
if entity.restrictions:
restrictions = []
for r in entity.restrictions:
restrictions.append(f"{r.reason}-{r.platform}")
text_ping += f'\n<b>Restrictions:</b> {", ".join(restrictions)}'
text_unping += f'\n<b>Restrictions:</b> {", ".join(restrictions)}'
if entity.members_count: if entity.members_count:
text_ping += f'\n<b>Members:</b> {entity.members_count}' text_ping += f'\n<b>Members:</b> {entity.members_count}'
text_unping += f'\n<b>Members:</b> {entity.members_count}' text_unping += f'\n<b>Members:</b> {entity.members_count}'