[cmd](google) error when there are no results

This commit is contained in:
derpystuff 2022-05-31 17:09:01 +02:00
parent 489a12976d
commit 91bd5f960c

View file

@ -39,6 +39,8 @@ module.exports = {
let search = await google(context, args.query)
search = search.response
if(search.body.status == 2) return editOrReply(context, {embeds:[createEmbed("error", context, search.body.message)]})
let pages = []
for(const res of search.body.results){
pages.push(createSearchResultPage(context, res))