mirror of
https://gitlab.com/bignutty/labscore.git
synced 2025-06-09 06:33:05 -04:00
handle potential error
This commit is contained in:
parent
32b536b7ab
commit
52d7e6c25d
1 changed files with 1 additions and 0 deletions
|
@ -40,6 +40,7 @@ module.exports = {
|
||||||
await editOrReply(context, createEmbed("ai_custom", "Generating page summary...", STATIC_ICONS.ai_summary))
|
await editOrReply(context, createEmbed("ai_custom", "Generating page summary...", STATIC_ICONS.ai_summary))
|
||||||
|
|
||||||
let res = await summarizeWebpage(context, webUrl[0])
|
let res = await summarizeWebpage(context, webUrl[0])
|
||||||
|
if(!res.response.body.summaries) return editOrReply(context, createEmbed("error", context, "Summary generation failed."))
|
||||||
|
|
||||||
return editOrReply(context, createEmbed("defaultNoFooter", context, {
|
return editOrReply(context, createEmbed("defaultNoFooter", context, {
|
||||||
author: {
|
author: {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue