mirror of
https://github.com/Maks1mS/nestjs-telegraf.git
synced 2025-01-12 15:11:05 +03:00
refactor: remove all ts-ignore
This commit is contained in:
parent
744da0a922
commit
b83a9bc5d8
@ -178,12 +178,10 @@ export class TelegrafExplorer implements OnModuleInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
handleTelegrafSettings(instance: object, key: string) {
|
handleTelegrafSettings(instance: object, key: string) {
|
||||||
// @ts-ignore
|
|
||||||
this.telegraf.settings(instance[key].bind(instance));
|
this.telegraf.settings(instance[key].bind(instance));
|
||||||
}
|
}
|
||||||
|
|
||||||
handleTelegrafEntity(instance: object, key: string, metadata: EntityOptions) {
|
handleTelegrafEntity(instance: object, key: string, metadata: EntityOptions) {
|
||||||
// @ts-ignore
|
|
||||||
this.telegraf.entity(metadata.entity, instance[key].bind(instance));
|
this.telegraf.entity(metadata.entity, instance[key].bind(instance));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -192,12 +190,10 @@ export class TelegrafExplorer implements OnModuleInit {
|
|||||||
key: string,
|
key: string,
|
||||||
metadata: MentionOptions,
|
metadata: MentionOptions,
|
||||||
) {
|
) {
|
||||||
// @ts-ignore
|
|
||||||
this.telegraf.mention(metadata.username, instance[key].bind(instance));
|
this.telegraf.mention(metadata.username, instance[key].bind(instance));
|
||||||
}
|
}
|
||||||
|
|
||||||
handleTelegrafPhone(instance: object, key: string, metadata: PhoneOptions) {
|
handleTelegrafPhone(instance: object, key: string, metadata: PhoneOptions) {
|
||||||
// @ts-ignore
|
|
||||||
this.telegraf.phone(metadata.phone, instance[key].bind(instance));
|
this.telegraf.phone(metadata.phone, instance[key].bind(instance));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -206,7 +202,6 @@ export class TelegrafExplorer implements OnModuleInit {
|
|||||||
key: string,
|
key: string,
|
||||||
metadata: HashtagOptions,
|
metadata: HashtagOptions,
|
||||||
) {
|
) {
|
||||||
// @ts-ignore
|
|
||||||
this.telegraf.hashtag(metadata.hashtag, instance[key].bind(instance));
|
this.telegraf.hashtag(metadata.hashtag, instance[key].bind(instance));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -215,7 +210,6 @@ export class TelegrafExplorer implements OnModuleInit {
|
|||||||
key: string,
|
key: string,
|
||||||
metadata: CashtagOptions,
|
metadata: CashtagOptions,
|
||||||
) {
|
) {
|
||||||
// @ts-ignore
|
|
||||||
this.telegraf.cashtag(metadata.cashtag, instance[key].bind(instance));
|
this.telegraf.cashtag(metadata.cashtag, instance[key].bind(instance));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -229,7 +223,6 @@ export class TelegrafExplorer implements OnModuleInit {
|
|||||||
metadata: InlineQueryOptions,
|
metadata: InlineQueryOptions,
|
||||||
) {
|
) {
|
||||||
if (metadata.triggers) {
|
if (metadata.triggers) {
|
||||||
// @ts-ignore
|
|
||||||
this.telegraf.inlineQuery(
|
this.telegraf.inlineQuery(
|
||||||
metadata.triggers,
|
metadata.triggers,
|
||||||
instance[key].bind(instance),
|
instance[key].bind(instance),
|
||||||
|
Loading…
Reference in New Issue
Block a user