This is a Telegram bot that interacts with an AI API to provide responses to user messages.
- Responds to text messages from users
- Responds to photo uploads from users
- Responds to voice message uploads from users
- Responds to document uploads from users
[GitHub] [Our website] [Docs] [Discord]
-
Clone the repository:
git clone https://github.com/your-username/telegram-ai-bot.git
-
Install dependencies:
cd telegram-ai-bot npm install
-
Create a
.env
file in the project root and add your Telegram bot token:BOT_TOKEN=your_telegram_bot_token
-
Start the bot:
npm start
The bot will now be running and listening for messages from users.
The bot uses the Telegraf.js library to interact with the Telegram Bot API. When a user sends a message, the bot extracts the message text or file URL (for photos, voice messages, and documents) and sends a POST request to the https://api.cryptoscan.pro/ai
API with the extracted data as the prompt
parameter.
The API response is then parsed and sent back to the user as the bot's response.
- Give pumps in bybit in 1 minute
- Telegraf.js - A modern Telegram bot framework for Node.js
- dotenv - Loads environment variables from a
.env
file - telegramify-markdown - Converts Markdown to Telegram-compatible Markdown V2
This project is licensed under the MIT License.