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

@ -31,7 +31,7 @@ module.exports = {
const timings = Date.now();
let mkswt = await circuitBoard(image)
return await response.edit({
return await editOrReply(context, {
embeds: [createEmbed("image", context, {
url: "makesweet.gif",
time: ((Date.now() - timings) / 1000).toFixed(2),
@ -43,7 +43,7 @@ module.exports = {
files: [{ filename: "makesweet.gif", value: mkswt.body }]
})
} catch (e) {
await response.edit({ embeds: [createEmbed("error", context, e)] })
await editOrReply(context, createEmbed("error", context, e))
}
}
}