Code Monkey home page Code Monkey logo

massa-bot's Introduction

Massa Spider Bot

🇺🇸 English | 🇷🇺 Русский

Sources of Telegram bot https://t.me/hekumatiarubot for Massa Blockchain

  • Find node by IP
  • Receive notification when a roll is sold

Table of contents

Under the hood

Commands

Command Description Example
/start Main Menu
/help List all available commands
/hosting Hosting promocodes
/add Add your node /add abcdef tag
/delete Delete your node /delete abcdef
/ip Search by IP /ip 65
/community Community links
/free Countries without nodes
/company Companies with node populations
/country Countries with node population
/version Version with node population
/stats Stakers, cycle, version
/release Grab release Massa from GitHub
/mirror Telegram bot mirror links
/en 🇺🇸 English language
/ru 🇷🇺 Русский язык
/whoami Your id

System Requirements

Minimal server requirements

Hardware Value
CPU 2 core
RAM 1 Gb
Storage 1.2 Gb (images & database)

Installation

Requires Docker. The main folder of this repository contains a functional docker-compose.yml file. Run the application using it as shown below:

curl -sSL https://raw.githubusercontent.com/qqmee/massa-telegram-bot/main/docker-compose.yml > docker-compose.yml
mkdir -p .data/hek-db/{lib,log}

Generate self signed certificate https://core.telegram.org/bots/self-signed

Replace YOUR_IP

openssl req -newkey rsa:2048 -sha256 -nodes -keyout .data/private.key -x509 -days 3650 -out .data/public.pem -subj "/C=US/ST=New York/L=Brooklyn/O=Example Brooklyn Company/CN=YOUR_IP"

chmod 444 .data/{private.key,public.pem}

Start services

# WARN: edit your env variables (goto configuration) before command below
## docker compose up -d

Configuration (through Environment Variables)

Set environment variables in docker-compose.yml

Env Scope Example Description
MYSQL_HOST db,bot,cron massa
MYSQL_PORT db,bot,cron 3306
MYSQL_USER db,bot,cron massa
MYSQL_PASSWORD db,bot,cron bVrsy
MYSQL_DATABASE db,bot,cron massa
REDIS_HOST redis,bot,cron redis
REDIS_PORT redis,bot,cron 6379
REDIS_PASSWORD redis,bot,cron guest
MASSA_RPC bot https://buildnet.massa.net/api/v2,198.27.74.5:33035 api endpoint, comma separated
GEOIP_RPC bot,cron http://127.0.0.1:3050 api endpoint
BOTS bot,cron 1:PPrreevvee,32:DDMMeeDDVveEdd keys from @BotFather
BOT_ADMINS bot,cron 1,2 admin id for cronjob notifications (/whoami command)
PORT bot 3000 webhook port
WEBHOOK_URL bot https://abcdef.loca.lt webhook domain

Installation (development)

git clone https://github.com/qqmee/massa-bot
cd massa-bot

# WARN: edit your env variables (goto configuration) before command below
# Launch database
## docker compose up -d db redis

# install deps
npm i

# run webhook listener
npm run dev &

# optional: launch cron tasks
npm run dev::cron

# launch https tunnel for webhook (replace 'abcdef' with your subdomain)
npx localtunnel --port 3000 --subdomain abcdef # aka https://abcdef.loca.lt

Mirrors

Here

massa-bot's People

Contributors

qqmee avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

appetitoff

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.