Skip to content
Loki-XerPublic

About

A simple, lightweight Telegram bot built with Node.js using node-telegram-bot-api. It runs on Express, handles HTTP requests via Axios, detects file types with file-type, and stays online 24/7 with PM2. Easy to deploy, easy to extend.

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Latest commit

 

History

292 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🤖 tg-bot

A simple, lightweight Telegram bot built with Node.js using node-telegram-bot-api, kept online with PM2.

✨ Features

  • Built on node-telegram-bot-api
  • Express server for HTTP handling
  • File type detection with file-type
  • Runs 24/7 with PM2
  • Easy to deploy and extend

📋 Requirements

🚀 Setup

1. Clone the repo

git clone https://github.com/Loki-Xer/tg.git
cd tg

2. Add your BotFather token

Create a .env file in the project root:

BOT_TOKEN=your_botfather_token_here

Get a token by messaging @BotFather on Telegram and sending /newbot.

3. Install and start

npm install && npm start

🛠 Commands

Command Description
npm start Start the bot with PM2
npm run stop Stop the bot

Useful PM2 commands:

pm2 logs tg-bot     # view logs
pm2 restart tg-bot  # restart the bot

⚠️ Security

Never commit your .env file or share your bot token. Add .env to your .gitignore.

📄 License

Made by Loki-Xer.

About

A simple, lightweight Telegram bot built with Node.js using node-telegram-bot-api. It runs on Express, handles HTTP requests via Axios, detects file types with file-type, and stays online 24/7 with PM2. Easy to deploy, easy to extend.

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages