Skip to content

πŸ€– The best template for use to create a telegram bot with NODEJS and EXPRESS.

Notifications You must be signed in to change notification settings

juninhopo/telegram-bot-typescript-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

5 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Template for Telegram Bot

Structure

πŸ€– bot-telegram-template
β”œβ”€β”€ src
β”‚Β Β  β”œβ”€β”€ app.ts
β”‚Β Β  β”œβ”€β”€ controllers
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ handler-telegram
β”‚Β Β  β”‚Β Β  β”‚Β Β  β”œβ”€β”€ messages
β”‚Β Β  β”‚Β Β  β”‚Β Β  β”‚Β Β  └── start
β”‚Β Β  β”‚Β Β  β”‚Β Β  β”‚Β Β      └── index.ts
β”‚Β Β  β”‚Β Β  β”‚Β Β  β”œβ”€β”€ new-message.ts // Aqui voce vai adicionar as novas funçáes
β”‚Β Β  β”‚Β Β  β”‚Β Β  └── send-message-telegram.ts
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ test-bot
β”‚Β Β  β”‚Β Β  β”‚Β Β  └── hello-user.ts
β”‚Β Β  β”‚Β Β  └── webhook
β”‚Β Β  β”‚Β Β      β”œβ”€β”€ receive-webhook.ts
β”‚Β Β  β”‚Β Β      └── set-webhook.ts
β”‚Β Β  └── routes
β”‚Β Β      β”œβ”€β”€ index.ts
β”‚Β Β      └── webhook.ts
└── tsconfig.json

Local Test

Add file .env to the project root with the variables below.

PORT=3000

# Create the bot on Telegram and place the token here
TELEGRAM_TOKEN=

# URL of where your backend is hosted
URL_SERVER=

About

πŸ€– The best template for use to create a telegram bot with NODEJS and EXPRESS.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published