Disable web page preview for einfo

This commit is contained in:
blank X 2021-12-25 14:02:23 +07:00
parent 17095861ae
commit a7a932a96a
Signed by: blankie
GPG Key ID: CC15FC822C7F61F5
1 changed files with 7 additions and 7 deletions

View File

@ -67,17 +67,17 @@ async def fedstat(client, message):
if not isinstance(entity, str):
entity = str(entity.id)
if entity.startswith('TEL-') or int(entity) < 0 or command in ('spb', 'spamprotection'):
await message.reply_text(f'Spam Protection:\n{await get_spam_protection(entity)}')
await message.reply_text(f'Spam Protection:\n{await get_spam_protection(entity)}', disable_web_page_preview=True)
elif command in ('sw', 'spamwatch'):
await message.reply_text(f'SpamWatch:\n{await get_spamwatch(entity)}')
await message.reply_text(f'SpamWatch:\n{await get_spamwatch(entity)}', disable_web_page_preview=True)
elif command == 'deai':
await message.reply_text(f'DEAI:\n{await get_deai(client, entity)}')
await message.reply_text(f'DEAI:\n{await get_deai(client, entity)}', disable_web_page_preview=True)
elif command == 'rose':
await message.reply_text(f'Rose Support:\n{await get_rose(client, entity)}')
await message.reply_text(f'Rose Support:\n{await get_rose(client, entity)}', disable_web_page_preview=True)
elif command in ('cas', 'combot'):
await message.reply_text(f'CAS:\n{await get_cas(entity)}')
await message.reply_text(f'CAS:\n{await get_cas(entity)}', disable_web_page_preview=True)
elif command == 'sibyl':
await message.reply_text(f'Sibyl:\n{await get_sibyl(entity)}')
await message.reply_text(f'Sibyl:\n{await get_sibyl(entity)}', disable_web_page_preview=True)
else:
spamwatch, deai, cas, spam_protection, rose, sibyl = await asyncio.gather(get_spamwatch(entity), get_deai(client, entity), get_cas(entity), get_spam_protection(entity), get_rose(client, entity), get_sibyl(entity))
await message.reply_text(f'''SpamWatch:
@ -96,7 +96,7 @@ Spam Protection:
{spam_protection}
Sibyl:
{sibyl}''')
{sibyl}''', disable_web_page_preview=True)
async def get_spamwatch(entity):
async with session.get(f'https://api.spamwat.ch/banlist/{entity}', headers={'Authorization': f'Bearer {config["config"]["spamwatch_api"]}'}) as resp: