bugfix
This commit is contained in:
parent
d34304e6bf
commit
e151e5c285
3 changed files with 16 additions and 3 deletions
|
|
@ -101,7 +101,10 @@ export class BotUpdate {
|
|||
|
||||
@On('callback_query')
|
||||
async onInlineQuery(@Ctx() ctx: any) {
|
||||
try {
|
||||
await TGHandlers.handleCallback(ctx, this.logger, this.gameService);
|
||||
} catch (err) {
|
||||
}
|
||||
}
|
||||
|
||||
@Hears(Messages.CHANGE_PHOTO)
|
||||
|
|
|
|||
|
|
@ -17,7 +17,12 @@ export class TGHandlers {
|
|||
if(ctx.update.callback_query.message.text.indexOf('Внимание') !== -1) {
|
||||
const answer =ctx.update.callback_query.data;
|
||||
gameService.emit({ cmd: "QuestionAnswer"}, { user: ctx.from.id, answer: answer, name: ctx.from.first_name });
|
||||
try {
|
||||
await ctx.editMessageReplyMarkup(undefined);
|
||||
} catch (err) {
|
||||
|
||||
}
|
||||
|
||||
await ctx.editMessageText("ответ принят!");
|
||||
} else if(ctx.update.callback_query.data.startsWith('card/')) {
|
||||
const cardtoplay = ctx.update.callback_query.data.substring('card/'.length);
|
||||
|
|
|
|||
|
|
@ -51,7 +51,12 @@ export class QuizScene {
|
|||
|
||||
@On('callback_query')
|
||||
async onInlineQuery(@Ctx() ctx: Context) {
|
||||
try {
|
||||
await TGHandlers.handleCallback(ctx, this.logger, this.gameService);
|
||||
|
||||
}catch (e) {
|
||||
|
||||
}
|
||||
}
|
||||
@On('text')
|
||||
async onText(@Message('text') text: string, @Ctx() ctx: Context) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue