Remove bing results from image
This commit is contained in:
		
							parent
							
								
									fbefd0f10a
								
							
						
					
					
						commit
						c4ac08f40a
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
					@ -11,7 +11,7 @@ class ImageSearchCommand extends Command {
 | 
				
			||||||
    if (this.args.length === 0) return "You need to provide something to search for!";
 | 
					    if (this.args.length === 0) return "You need to provide something to search for!";
 | 
				
			||||||
    this.client.sendChannelTyping(this.message.channel.id);
 | 
					    this.client.sendChannelTyping(this.message.channel.id);
 | 
				
			||||||
    const embeds = [];
 | 
					    const embeds = [];
 | 
				
			||||||
    const rawImages = await fetch(`${random(searx)}/search?format=json&safesearch=2&categories=images&q=!goi%20!bii%20!ddi%20${encodeURIComponent(this.args.join(" "))}`).then(res => res.json());
 | 
					    const rawImages = await fetch(`${random(searx)}/search?format=json&safesearch=2&categories=images&q=!goi%20!ddi%20${encodeURIComponent(this.args.join(" "))}`).then(res => res.json());
 | 
				
			||||||
    if (rawImages.results.length === 0) return "I couldn't find any results!";
 | 
					    if (rawImages.results.length === 0) return "I couldn't find any results!";
 | 
				
			||||||
    const images = rawImages.results.filter((val) => !val.img_src.startsWith("data:"));
 | 
					    const images = rawImages.results.filter((val) => !val.img_src.startsWith("data:"));
 | 
				
			||||||
    for (const [i, value] of images.entries()) {
 | 
					    for (const [i, value] of images.entries()) {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue