π€ 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
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=