From e3d46583532cee0a663e3aabf756586fad608ea8 Mon Sep 17 00:00:00 2001 From: derpystuff <3515180-derpystuff@users.noreply.gitlab.com> Date: Thu, 22 Sep 2022 21:50:27 +0200 Subject: [PATCH] add a slow service notice to dalle --- commands/message/image/dalle.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/commands/message/image/dalle.js b/commands/message/image/dalle.js index dd9ff5d..0feff56 100644 --- a/commands/message/image/dalle.js +++ b/commands/message/image/dalle.js @@ -21,6 +21,14 @@ module.exports = { run: async (context, args) => { let response = await editOrReply(context, { embeds: [createEmbed("loading", context, `Synthesizing images...`)] }) + let noticeTimer = setTimeout(()=>{ + let emb = createEmbed("loading", context, `Synthesizing images...`) + emb.footer = { + text: "This might take several minutes to complete." + }; + response.edit({ embeds: [ emb ] }); + }, 30000) + try{ let t = Date.now(); @@ -28,6 +36,8 @@ module.exports = { .send({ prompt: args.query }) + + clearTimeout(noticeTimer) let embeds = []; let files = [];