mirror of
https://gitlab.com/bignutty/labscore.git
synced 2025-06-13 08:33:02 -04:00
add error message if no results are found
This commit is contained in:
parent
68b41e23d0
commit
abac1a96f6
1 changed files with 2 additions and 0 deletions
|
@ -57,6 +57,8 @@ module.exports = {
|
||||||
let search = await rule34(context, args.query, args.site.toLowerCase())
|
let search = await rule34(context, args.query, args.site.toLowerCase())
|
||||||
search = search.response
|
search = search.response
|
||||||
|
|
||||||
|
if(search.body.data.length == 0) return editOrReply(context, {embeds:[createEmbed("warning", context, `No results found on ${SITES[args.site.toLowerCase()]}.`)]})
|
||||||
|
|
||||||
let pages = []
|
let pages = []
|
||||||
for(const res of search.body.data){
|
for(const res of search.body.data){
|
||||||
pages.push(createRule34Page(context, res))
|
pages.push(createRule34Page(context, res))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue