mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-26 22:32:52 +02:00
Make Code Prettier
This commit is contained in:
@@ -29,10 +29,10 @@ module.exports = class GoogleCommand extends Command {
|
||||
.get(`https://www.google.com/search?q=${query}`);
|
||||
const $ = cheerio.load(text);
|
||||
let href = $('.r').first().find('a').first().attr('href');
|
||||
if (!href) throw new Error('No Results');
|
||||
if(!href) throw new Error('No Results');
|
||||
href = querystring.parse(href.replace('/url?', ''));
|
||||
return message.edit(href.q);
|
||||
} catch (err) {
|
||||
} catch(err) {
|
||||
return message.edit('No Results Found.');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user