forked from pinks/eris
1
0
Fork 0

refactor: move sendChatAction

resolves pinks/eris#18
This commit is contained in:
nameless 2023-11-10 10:21:35 +00:00
parent f678324889
commit 26927208bd
1 changed files with 4 additions and 2 deletions

View File

@ -240,8 +240,6 @@ async function processGenerationJob(
if (progressResponse.data.progress > state.progress) {
state.progress = progressResponse.data.progress;
await updateJob({ state: state });
await bot.api.sendChatAction(state.chat.id, "upload_photo", { maxAttempts: 1 })
.catch(() => undefined);
await bot.api.editMessageText(
state.replyMessage.chat.id,
state.replyMessage.message_id,
@ -297,6 +295,10 @@ async function processGenerationJob(
{ maxAttempts: 1 },
).catch(() => undefined);
// send upload photo action
await bot.api.sendChatAction(state.chat.id, "upload_photo", { maxAttempts: 1 })
.catch(() => undefined);
debug(`Generation finished for ${formatUserChat(state)}`);
}