add a slow service notice to dalle

This commit is contained in:
derpystuff 2022-09-22 21:50:27 +02:00
parent 46c9164a7e
commit e3d4658353

View file

@ -21,6 +21,14 @@ module.exports = {
run: async (context, args) => { run: async (context, args) => {
let response = await editOrReply(context, { embeds: [createEmbed("loading", context, `Synthesizing images...`)] }) 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{ try{
let t = Date.now(); let t = Date.now();
@ -28,6 +36,8 @@ module.exports = {
.send({ .send({
prompt: args.query prompt: args.query
}) })
clearTimeout(noticeTimer)
let embeds = []; let embeds = [];
let files = []; let files = [];