File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,8 @@ Retorna o primeiro resultado de uma pesquisa no google.
88
99*args válidos:*
1010 \`\`\`--help\`\`\` -> _mostra esta mensagem._
11+ \`\`\`--target\`\`\` -> _define um site especifico para pesquisa._
12+ \`\`\`--limit\`\`\` -> _define um limite de resultados. O padrão é 1._
1113 ` . trim ( ) ,
1214} ;
1315
@@ -18,7 +20,7 @@ class Search {
1820 }
1921
2022 async execute ( data , message ) {
21- const { args, text } = data ;
23+ const { args, text, kwargs } = data ;
2224
2325 if ( args . includes ( 'help' ) ) {
2426 message . reply ( this . strings . help ) ;
@@ -29,12 +31,12 @@ class Search {
2931 throw new Error ( 'Nenhum texto para pesquisa foi especificado.' ) ;
3032 }
3133
32- const results = await search ( text ) ;
34+ const results = await search ( text , kwargs . target , kwargs . limit ) ;
3335
3436 if ( results . length > 0 ) {
3537 const stringResult = results
3638 . map ( ( r ) => Search . formatResult ( r ) )
37- . join ( '\n\n' ) ;
39+ . join ( '\n\n🔹🔹🔹\n\n ' ) ;
3840 message . reply ( stringResult ) ;
3941 return ;
4042 }
You can’t perform that action at this time.
0 commit comments