mirror of
https://gitlab.com/bignutty/labscore.git
synced 2025-06-22 12:57:03 -04:00
make all image responses use the same embed type
This commit is contained in:
parent
951cb87a82
commit
43d8801821
14 changed files with 138 additions and 152 deletions
|
@ -29,15 +29,15 @@ module.exports = {
|
|||
if(res.response.body.status == 1) return editOrReply(context, {embeds:[createEmbed("warning", context, res.response.body.errors[0])]})
|
||||
|
||||
image = res.response.body.data.images[res.response.body.data.best_quality]
|
||||
return editOrReply(context, {embeds:[createEmbed("default", context, {
|
||||
image: {
|
||||
url: image
|
||||
},
|
||||
footer: {
|
||||
iconUrl: STATICS.photofunia,
|
||||
text: `PhotoFunia • ${context.application.name} • Took ${res.timings}s`
|
||||
|
||||
return editOrReply(context, createEmbed("image", context, {
|
||||
url: image,
|
||||
time: res.timings,
|
||||
provider: {
|
||||
icon: STATICS.photofunia,
|
||||
text: "PhotoFunia"
|
||||
}
|
||||
})]})
|
||||
}))
|
||||
}catch(e){
|
||||
console.log(e)
|
||||
if(e.response?.body?.message) return editOrReply(context, {embeds:[createEmbed("error", context, e.response.body.message)]})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue