mirror of
https://gitlab.com/bignutty/labscore.git
synced 2025-06-08 22:23: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
|
@ -24,26 +24,15 @@ module.exports = {
|
|||
"data": args.text
|
||||
})
|
||||
|
||||
await response.edit({
|
||||
embeds: [
|
||||
createEmbed("default", context, {
|
||||
image: {
|
||||
url: `attachment://qrcode.png`
|
||||
},
|
||||
footer: {
|
||||
iconUrl: `https://cdn.discordapp.com/avatars/${context.application.id}/${context.application.icon}.png?size=256`,
|
||||
text: `labsCore • Took ${((Date.now() - t) / 1000).toFixed(2)}s`
|
||||
}
|
||||
})
|
||||
],
|
||||
files: [{
|
||||
filename: "qrcode.png",
|
||||
value: res.body
|
||||
}]
|
||||
return await response.edit({
|
||||
embeds: [createEmbed("image", context, {
|
||||
url: "qrcode.png",
|
||||
time: ((Date.now() - t) / 1000).toFixed(2)
|
||||
})],
|
||||
files: [{ filename: "qrcode.png", value: res.body }]
|
||||
})
|
||||
}catch(e){
|
||||
console.log(e)
|
||||
return editOrReply(context, {embeds:[createEmbed("error", context, `Unable to generate qr code.`)]})
|
||||
return await response.edit({ embeds: [createEmbed("error", context, `Unable to generate qr code.`) ] })
|
||||
}
|
||||
}
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue