Disable web page preview for einfo
This commit is contained in:
		
							parent
							
								
									17095861ae
								
							
						
					
					
						commit
						a7a932a96a
					
				| 
						 | 
				
			
			@ -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:
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue