Skip to content

cryptoscan-pro/crypto-ai-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Telegram AI Bot

Example Image

This is a Telegram bot that interacts with an AI API to provide responses to user messages.

Features

  • 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]

Usage

  1. Clone the repository:

    git clone https://github.com/your-username/telegram-ai-bot.git
    
  2. Install dependencies:

    cd telegram-ai-bot
    npm install
    
  3. Create a .env file in the project root and add your Telegram bot token:

    BOT_TOKEN=your_telegram_bot_token
    
  4. Start the bot:

    npm start
    

    The bot will now be running and listening for messages from users.

How it Works

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.

Examples of questions

  • Give pumps in bybit in 1 minute

Dependencies

  • 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

License

This project is licensed under the MIT License.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published