Spaces:
Paused
Paused
πππ₯π₯πππ π π¨ππππ₯π β‘ commited on
Update img.js
Browse files- plugins/img.js +1 -3
plugins/img.js
CHANGED
|
@@ -23,8 +23,6 @@ const { cmd } = require('../command');
|
|
| 23 |
const axios = require('axios');
|
| 24 |
const { Buffer } = require('buffer');
|
| 25 |
|
| 26 |
-
const GOOGLE_API_KEY = 'AIzaSyDebFT-uY_f82_An6bnE9WvVcgVbzwDKgU'; // Replace with your Google API key
|
| 27 |
-
const GOOGLE_CX = '45b94c5cef39940d1'; // Replace with your Google Custom Search Engine ID
|
| 28 |
|
| 29 |
cmd({
|
| 30 |
pattern: "img",
|
|
@@ -39,7 +37,7 @@ async (conn, mek, m, { from, quoted, body, isCmd, command, args, q, isGroup, sen
|
|
| 39 |
|
| 40 |
// Fetch image URLs from Google Custom Search API
|
| 41 |
const searchQuery = encodeURIComponent(q);
|
| 42 |
-
const url = `https://api.giftedtech.my.id/api/search/googleimage?apikey=gifted&query=${searchQuery}&
|
| 43 |
|
| 44 |
const response = await axios.get(url);
|
| 45 |
const data = response.data;
|
|
|
|
| 23 |
const axios = require('axios');
|
| 24 |
const { Buffer } = require('buffer');
|
| 25 |
|
|
|
|
|
|
|
| 26 |
|
| 27 |
cmd({
|
| 28 |
pattern: "img",
|
|
|
|
| 37 |
|
| 38 |
// Fetch image URLs from Google Custom Search API
|
| 39 |
const searchQuery = encodeURIComponent(q);
|
| 40 |
+
const url = `https://api.giftedtech.my.id/api/search/googleimage?apikey=gifted&query=${searchQuery}&searchType=image&num=5`;
|
| 41 |
|
| 42 |
const response = await axios.get(url);
|
| 43 |
const data = response.data;
|