Made with this tutorial
This is the pet project thai I will be using to learn Telegram API and Telegraf.js
classDiagram
class Bot {
-bot: Telegraf*
-commands: CommandModel[]*
-configService: IConfigService
constructor(configService: IConfigService)
+init()
}
Bot..>Telegraf
Bot..>StartCommand
Bot..>ConfigService
class IConfig {
<<interface>>
+get(key: string): string
}
class ConfigService {
-config: DotenvParseOutput*
+get(key: string): string
}
ConfigService..|>IConfig
class CommandModel {
<<abstract>>
constructor(public bot: Telegraf<IContext>)
*handle(): void
}
class StartCommand {
constructor(public bot: Telegraf<IContext>)
+handle(): void
}
class Telegraf
StartCommand--|>CommandModel
StartCommand..>Telegraf
CommandModel..>Telegraf
classDiagram
class IConfig {
<<interface>>
+get(key: string): string
}
class ConfigService {
-config: DotenvParseOutput*
+get(key: string): string
}
ConfigService..|>IConfig
classDiagram
class CommandModel {
<<abstract>>
constructor(public bot: Telegraf<IContext>)
*handle(): void
}
class StartCommand {
constructor(public bot: Telegraf<IContext>)
+handle(): void
}
class Telegraf
StartCommand--|>CommandModel
StartCommand..>Telegraf
CommandModel..>Telegraf