adds no search result errors

This commit is contained in:
derpystuff 2022-07-13 14:03:08 +02:00
parent c09a24ce9d
commit 52d2bbbc2d
6 changed files with 10 additions and 4 deletions

View file

@ -13,10 +13,10 @@ module.exports = {
name: 'audio',
aliases: ['aud'],
metadata: {
description: 'video audio detection',
description: '**audio detection**\nusing the audio command without replying to a message will try to identify the song in the most recent video\n\n**music platform links**\n__replying__ to a message while using this command will return a list of music platforms the provided music (link) is available on',
examples: ['aud'],
category: 'search',
usage: 'audio <media>'
usage: 'audio'
},
run: async (context) => {
context.triggerTyping();

View file

@ -41,6 +41,8 @@ module.exports = {
try{
let search = await bingImages(context, args.query, context.channel.nsfw)
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){

View file

@ -38,6 +38,8 @@ module.exports = {
let search = await bing(context, args.query, context.channel.nsfw)
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))

View file

@ -42,6 +42,8 @@ module.exports = {
let search = await googleImages(context, args.query, context.channel.nsfw)
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(createImageResultPage(context, res))