Limit Search Results to 5
This commit is contained in:
parent
e25557190c
commit
ae82fda49f
@ -431,8 +431,14 @@ if (searchMatch) {
|
|||||||
const searchQuery = searchMatch[1];
|
const searchQuery = searchMatch[1];
|
||||||
console.log(`${getTimestamp()} [INFO] Detected search query in user message: ${searchQuery}`);
|
console.log(`${getTimestamp()} [INFO] Detected search query in user message: ${searchQuery}`);
|
||||||
|
|
||||||
|
const options = {
|
||||||
|
query: searchQuery,
|
||||||
|
limit: 5,
|
||||||
|
disableConsole: true
|
||||||
|
};
|
||||||
|
|
||||||
try {
|
try {
|
||||||
googleIt({ 'query': searchQuery }).then(async results => {
|
googleIt(options).then(async results => {
|
||||||
let searchResponse = `Search Query: ${searchQuery}\n`;
|
let searchResponse = `Search Query: ${searchQuery}\n`;
|
||||||
searchResponse += `Top Google search results:\n`;
|
searchResponse += `Top Google search results:\n`;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user