This commit is contained in:
		
							
								
								
									
										9
									
								
								bot.py
									
									
									
									
									
								
							
							
						
						
									
										9
									
								
								bot.py
									
									
									
									
									
								
							@@ -53,11 +53,12 @@ class CustomClient(discord.Client):
 | 
			
		||||
                    timeout=aiohttp.ClientTimeout(total=5)
 | 
			
		||||
                ) as session:
 | 
			
		||||
                    resp = await session.head(
 | 
			
		||||
                        "https://stream.purser.it/{stripped}/?provider=seafile&raw=true"
 | 
			
		||||
                        "https://stream.purser.it/{stripped}/?provider=seafile&raw=true",
 | 
			
		||||
                        allow_redirects=True,
 | 
			
		||||
                    )
 | 
			
		||||
                    raw = (
 | 
			
		||||
                        ctype := resp.headers.get("content-type")
 | 
			
		||||
                    ) and "image" in ctype
 | 
			
		||||
                    raw = str(
 | 
			
		||||
                        (ctype := resp.headers.get("content-type")) and "image" in ctype
 | 
			
		||||
                    ).lower()
 | 
			
		||||
 | 
			
		||||
                    await message.reply(
 | 
			
		||||
                        content=f"https://stream.purser.it/{stripped}/?provider=seafile&raw={raw}"
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user