Skip to content

A simple and customizable Telegram chat bot built with Node.js and the Telegram Bot API. Accepts commands, images.

Notifications You must be signed in to change notification settings

avinashtare/Telegram-Chat-Bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Telegram Chatbot

A simple Telegram chatbot built with Node.js and the Telegram Bot API

Introduction

This Telegram chatbot is designed to [mention the purpose of your chatbot]. It uses the Telegram Bot API to interact with users on the Telegram platform.

Features

  • Commands: Interact with the bot using various commands.
  • Images Upload: Allow users to upload images to the bot.
  • Documents Read Upload: Accept document uploads for further processing.

Local Configuration

  • Clone the repository and cd:

    git clone https://github.com/avinashtare/Telegram-Chat-Bot.git
    
    cd Telegram-Chat-Bot

Create Chat Token

  • Open Telegram Channel [@BotFather]: -

  • Write Command:

    /newbot
  • Copy Token And Rename .env.example to .env and set:

    PORT=5012
    Telegram_Bot_Token=<YOUR TOKEN>
    
    # Enter your ngrok public serve url <example> replace from you server url
    NgrokURL = "https://cc62-103-71-16-137.ngrok-free.app/"  

Create Virtual Free Host From Ngrok

  • Install Ngrok For Window:
choco install ngrok
// you can also install direct as exe
  • Configuration Your Ngrok:
ngrok config add-authtoken <AUTH_ID>
  • Start a tunnel (Add You Telegram Chat Bot Running App PORT):
ngrok http 5012

- Configuration Your Chat Bot To You Host:

https://api.telegram.org/bot<Token>/setWebhook?url=<Ngrok_Url>

Installation

  • Install Npm Pacakges:
    npm i
  • Start npm (before start do local configuration)
    npm start

Command Reference (Use In Telegram Chat Bot)

command Responses
/Start Hey hi! i am you bot!
/random Random Value
/time Current Time
/by Goood Byyyyy
/uplaod image return path

you can change this in \controller\lib\Telegram.js

Telegram Documentation

Documentation

License

License This project is released under the MIT License.

Contact

[email protected]

Author

卐🕉 Avinash Tare 🕉 卐

About

A simple and customizable Telegram chat bot built with Node.js and the Telegram Bot API. Accepts commands, images.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published