Coder Social home page Coder Social logo

bitrick's Introduction

BitRick

A Telegram Assistent Bot.

This is a personal telegram bot. Some plugins are added to the project to provide additional bot services.

Getting Started

Firts: git clone https://github.com/marcosnunesmbs/BitRick.git

Next: cd BitRick

Configuration

  1. Create a Telegram Bot and save the Token with @BotFather.

    1.1. Open your Telegram and search for: @BotFather;

    1.2. Type it: /newbot;

    1.3. Set a name to your bot;

    1.4. Set a username

    1.5. You will receive a Token. Save it.

  2. Copy the sample.config.json file to config.json in the /src/config folder.

  3. Set your botToken and TelegramID (your user id in telegram).

    3.1 To get your User Id, you need to search fot @userdatabot, type /start and receive your id.

  4. To active plugins services you need to set a array of services names on modules key on /src/config/config.js file.

  5. You can find the avaliable services in /src/plugins folders.

  6. Serach your bot username on Telegram and start it.

  7. Join It!

Plugins

Structure

  • index.js - main file
  • config.js - the plugin configuration file
  • responses.js - a array of bot responses to errors
  • /services/plugin-name.js - the file that provider connection with api services.

The config.js is necessary to bot map all plugins that have and create the commands helpers.

The bot will just map the services that been set in main config.js modules key.

config.js

{
	"module_name":  "Binance",
	"description":  "Realize consultas na exchange Binance.",
	"functions":  [
		{
		"name":  "consultar saldo",
		"description":  "digite bbalance + moeda para saber o salgo",
		"keypass":  "bbalance"
		},
		{
		"name":  "consultar cotação",
		"description":  "digite btrade + par para saber a cotação",
		"keypass":  "bprice"
		},
		{
		"name":  "consultar ordens",
		"description":  "digite bordens + par para saber as ordens finalizadas e em aberto",
		"keypass":  "borders"
		}
	],
	"APIKEY":  "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
	"APISECRET":  "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}

The module_name key will be used to bot create the command to show the funcitons commands.

Create a Plugin by example

To create a new pluign you can use the npm script new:plugin and add --flag to set name.

npm run new:plugin --name=myplugin

Available Plugins

Binance

This plugin provides some Binance's Servies like: Consult Balances, Verify Criptocurrencys Prices and Your last orders.

You need to config your APIKEY and APISECRET in /src/plugins/binance/config.js

Main Command: /binance

CoinMarketCap

This plugin offers a cryptocurrency conversion based on CoinMarketCap API.

You need to config your APIKEY in /src/plugins/cmc/config.js

Main Command: /coinmarketcap

Doante

If You like this bot, you can donate. Thanks.

NANO: nano_3mjxfnquraoygt4u6uxipeh9pznwbmzx7ncy1dk5ahe6qnf197x917d6ghom

Bitcoin: 3Mt3hGJGWpN2p5AmeAzGvK5Uu9pegSz5J5

bitrick's People

Contributors

marcosnunesmbs avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

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.