An open API service indexing awesome lists of open source software.

https://github.com/avinashtare/telegram-chat-bot

A simple and customizable Telegram chat bot built with Node.js and the Telegram Bot API. Accepts commands, images.
https://github.com/avinashtare/telegram-chat-bot

automation backend express telegam-bot

Last synced: 2 months ago
JSON representation

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

Awesome Lists containing this project

README

          

# 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:

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

cd Telegram-Chat-Bot
```

## Create Chat Token

- Open Telegram Channel [@BotFather]: -
- Write Command:

```js
/newbot
```
- Copy Token And Rename .env.example to .env and set:

```bash
PORT=5012
Telegram_Bot_Token=

# Enter your ngrok public serve url 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:
```bash
choco install ngrok
// you can also install direct as exe
```

- Configuration Your Ngrok:
```bash
ngrok config add-authtoken
```

- Start a tunnel (Add You Telegram Chat Bot Running App PORT):
```bash
ngrok http 5012
```

**- Configuration Your Chat Bot To You Host:**
```bash
https://api.telegram.org/bot/setWebhook?url=
```

## Installation

- Install Npm Pacakges:
```js
npm i
```
- Start npm (before start do local configuration)
```js
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](https://core.telegram.org/)

## License

[![License](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
This project is released under the [MIT License](LICENSE).

## Contact

**[avinashtare.work@gmail.com](mailto:avinashtare.work@gmail.com)**

## Author
**卐🕉 Avinash Tare 🕉 卐**