fixes an issue where the bot would edit deleted replies

This commit is contained in:
derpystuff 2023-06-26 11:10:35 +02:00
parent bbafd7f48c
commit 4f1d288d3e
11 changed files with 31 additions and 32 deletions

View file

@ -34,7 +34,7 @@ module.exports = {
"data": args.text
})
return await response.edit({
return await editOrReply(context, {
embeds: [createEmbed("image", context, {
url: "qrcode.png",
time: ((Date.now() - t) / 1000).toFixed(2)
@ -42,7 +42,7 @@ module.exports = {
files: [{ filename: "qrcode.png", value: res.body }]
})
}catch(e){
return await response.edit({ embeds: [createEmbed("error", context, `Unable to generate qr code.`) ] })
return await editOrReply(context, createEmbed("error", context, `Unable to generate qr code.`))
}
}