Skip to content

TechExpand/moonshoot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MoonShot Telegram Bot

🚀 MoonShot Bot is a Telegram bot built to help users track trending cryptocurrency tokens and their market data, including price, volume, and more, using the GeckoTerminal API.

Table of Contents

Features

  • Fetches real-time market data for specified cryptocurrency pools.
  • Displays information such as price, volume, market cap, and price changes.
  • Rate limiting to prevent spamming.
  • Easily configurable and secure with environment variables.

Prerequisites

  1. Node.js (v14 or higher): Download and install Node.js
  2. Telegram Bot Token: Obtain a token by creating a bot on Telegram using BotFather.
  3. GeckoTerminal API: You’ll need access to the GeckoTerminal API.

Setup

  1. Clone the repository:

    git clone https://github.com/yourusername/moonshot-telegram-bot.git
    cd moonshot-telegram-bot
  2. Install dependencies:

    npm install
  3. Create Environment Variables:

    • Create a .env file in the root directory and add your API keys (see Environment Variables for details).

Environment Variables

In your project root, create a .env file to securely store sensitive information:

- TELEGRAM_TOKEN=your_telegram_bot_token
- GECKO_API_BASE_URL=https://api.geckoterminal.com/api/v2

##Folder Structure

moonshot-telegram-bot/
├── src/
│   ├── commands.js       # Contains bot command handlers
│   ├── config.js         # Loads environment variables and performs basic checks
│   ├── fetchData.js      # Contains functions to fetch data from GeckoTerminal API
│   └── index.js          # Main server and bot initialization
└── .env                  # Environment variables file
└── README.md             # Project documentation

##Usage

  1. Run the bot locally:
node src/index.js
  1. Start interacting with the bot on Telegram:

Open Telegram and search for your bot by username. Use the commands listed below to start fetching cryptocurrency data.

##Available Commands Command Description /start Start the bot and receive a welcome message. /call_moonshot Fetch and display data for trending tokens. /join_community Provides a link to join the Telegram community. /trade_moonshots Provides a link to start trading MoonShots.

##Deployment To deploy the bot on a server:

  1. Ensure that your server has Node.js installed.
  2. Clone the repository and set up environment variables on the server.
  3. Use a process manager like PM2 to keep the bot running:
pm2 start src/index.js --name moonshot-telegram-bot

##Contributing

  1. Fork the repository.
  2. Create a new branch:
git checkout -b feature-branch
  1. Make your changes and commit:
git commit -m "Description of changes"
  1. Push to the branch:
git push origin feature-branch
  1. Create a pull request.

##License This project is licensed under the MIT License. See the LICENSE file for details.

This `README.md` file provides a structured, step-by-step guide for users and contributors. Let me know if there are further modifications you’d like!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •