mirror of
https://github.com/Maks1mS/nestjs-telegraf.git
synced 2025-12-17 02:39:52 +03:00
feat(decorators): TelegrafGameQuery added
This commit is contained in:
@@ -99,6 +99,8 @@ export class TelegrafExplorer implements OnModuleInit {
|
||||
instance[key],
|
||||
);
|
||||
this.handleTelegrafInlineQuery(instance, key, telegraf, metadata);
|
||||
} else if (this.metadataAccessor.isTelegrafGameQuery(instance[key])) {
|
||||
this.handleTelegrafGameQuery(instance, key, telegraf);
|
||||
}
|
||||
},
|
||||
);
|
||||
@@ -233,4 +235,12 @@ export class TelegrafExplorer implements OnModuleInit {
|
||||
// @ts-ignore
|
||||
telegraf.inlineQuery(metadata.triggers, instance[key].bind(instance));
|
||||
}
|
||||
|
||||
handleTelegrafGameQuery(
|
||||
instance: object,
|
||||
key: string,
|
||||
telegraf: Telegraf<ContextMessageUpdate>,
|
||||
) {
|
||||
telegraf.gameQuery(instance[key].bind(instance));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user