Skip to content

MercuryHgO/BOTiskaf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Telegram bot, built with some architecture.

About

Made with this tutorial

This is the pet project thai I will be using to learn Telegram API and Telegraf.js

Docs

Diagrams

Full with main file

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
Loading

Services

classDiagram
    
    class IConfig {
        <<interface>>
        +get(key: string): string
    }
    class ConfigService {
        -config: DotenvParseOutput*

        +get(key: string): string
    }
    ConfigService..|>IConfig
Loading

Models

    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
Loading

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published