mirror of
https://github.com/flibusta-apps/book_bot.git
synced 2025-12-06 15:35:35 +01:00
Fixed chat actioin
This commit is contained in:
@@ -50,15 +50,12 @@ export async function sendFile(ctx: Context, state: BotState) {
|
|||||||
const sendSendingAction = async () => {
|
const sendSendingAction = async () => {
|
||||||
await ctx.telegram.sendChatAction(chatId, "upload_document");
|
await ctx.telegram.sendChatAction(chatId, "upload_document");
|
||||||
}
|
}
|
||||||
|
const action = setInterval(() => sendSendingAction(), 5000);
|
||||||
sendSendingAction();
|
|
||||||
const action = setInterval(() => sendSendingAction(), 1000);
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
sendSendingAction();
|
||||||
return await _sendFile(ctx, state, chatId, parseInt(id), format);
|
return await _sendFile(ctx, state, chatId, parseInt(id), format);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.log(e);
|
|
||||||
|
|
||||||
return await ctx.reply("Ошибка! Попробуйте позже :(", {
|
return await ctx.reply("Ошибка! Попробуйте позже :(", {
|
||||||
reply_to_message_id: ctx.message.message_id,
|
reply_to_message_id: ctx.message.message_id,
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user