diff --git a/src/modules/sqs-module/sqs.post.service.ts b/src/modules/sqs-module/sqs.post.service.ts index f44f5a3..6fc8b76 100644 --- a/src/modules/sqs-module/sqs.post.service.ts +++ b/src/modules/sqs-module/sqs.post.service.ts @@ -26,6 +26,7 @@ export class SqsPostService { } default: { this.logger.error(`SqsPostService -> K tim thay username=${username} `); + throw new Error(`Khong tim thay queue username=${username}`); break; } } diff --git a/src/modules/telegram/telegram.updates.ts b/src/modules/telegram/telegram.updates.ts index 4365e3d..5bb8f4f 100644 --- a/src/modules/telegram/telegram.updates.ts +++ b/src/modules/telegram/telegram.updates.ts @@ -131,12 +131,13 @@ export class TelegramUpdates { await this.sharedAutoComment(ctx, payload, 'realflashkaze'); } - @Action(/action_auto_comment_(.+)/) + @Action(/action_auto_comment-(.+)/) async onDownloadAction(@Ctx() ctx: Context) { await ctx.answerCbQuery(); // Tắt trạng thái loading trên nút bấm - const callbackData = (ctx.callbackQuery as any).data; - const accountX = callbackData.split('_')[1]; + // @ts-ignore + const callbackData = ctx.callbackQuery.data as any; + const accountX = callbackData.split('-')[1]; // Ép kiểu để ép TypeScript nhận diện đúng đối tượng tin nhắn chữ // @ts-ignore @@ -962,8 +963,8 @@ export class TelegramUpdates { reply_markup: { inline_keyboard: [ [ - {text: '📥 Chạy lệnh auto cmt flashkaze', callback_data: 'action_auto_comment_realflashkaze'}, - {text: '📥 Chạy lệnh auto cmt ech com', callback_data: 'action_auto_comment_echcomvuive'} + {text: '📥 Cmt realflashkaze', callback_data: 'action_auto_comment-realflashkaze'}, + {text: '📥 Cmt echcomvuive', callback_data: 'action_auto_comment-echcomvuive'} ] ] }