Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/codecraft26/tele-bot-osnhq


https://github.com/codecraft26/tele-bot-osnhq

Last synced: 5 days ago
JSON representation

Awesome Lists containing this project

README

        

# Telegram Bot with NestJS

Deployed link on render - https://tele-bot-osnhq-5mr7.onrender.com/
telegram Bot name - @welcome2626_bot(for test)
## Setup Instructions

1. Clone the repository.
2. Install dependencies:
```bash
npm install
```
3. Create a `.env` file with the following content:
```
TELEGRAM_BOT_TOKEN=
```
4. Start the application:
```bash
npm run start
```

## Usage Guide

- Open Telegram and search for your bot.
- Send a message "hello" or "hi" or "/start" to the bot.
- The bot will respond with a funny statement.
- If you send any other message, the bot will respond with "Sorry, I didn't understand that command."

## Middleware Logging

- All incoming messages and bot responses are logged to the console.

## Testing

- Run unit tests:
```bash
npm run test
```