Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/codecraft26/tele-bot-osnhq
https://github.com/codecraft26/tele-bot-osnhq
Last synced: 5 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/codecraft26/tele-bot-osnhq
- Owner: codecraft26
- Created: 2024-07-20T07:38:43.000Z (4 months ago)
- Default Branch: master
- Last Pushed: 2024-07-21T08:34:56.000Z (4 months ago)
- Last Synced: 2024-07-22T09:04:33.801Z (4 months ago)
- Language: TypeScript
- Size: 242 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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 Instructions1. 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
```