Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/jim380/Botelicious

Botelicious. Make sure you spell it with only one "o"
https://github.com/jim380/Botelicious

Last synced: about 1 month ago
JSON representation

Botelicious. Make sure you spell it with only one "o"

Awesome Lists containing this project

README

        

# Botelicious - ;)
A chatbot for making node-specific queries, while featuring a simple alerting system. Currently supports:

- Cosmos

- Irisnet

## Downloads
**Prerequisite**
- [node.js](https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions-enterprise-linux-fedora-and-snap-packages)

```$ curl -sL https://deb.nodesource.com/setup_11.x | sudo -E bash -```
```$ sudo apt-get install -y nodejs```

1. ```$ git clone https://github.com/jim380/Botelicious```
## Configuration
#### Telegram

2. ```$ cd Botelicious/Telegram```

3. ```$ nano config.json``` and fill in the empty field for ```"url"```. You may change the prefix too if you like.

4. ```$ nano app.js``` and fill in the empty field for ```token: ''``` at line 128.

5. **Optional:** ```$ nano app.js``` and fill in the empty fields for ```apiKey = ''``` and ```apiSecret = ''``` at line 166-167 if you want to get Bitmex working.

#### Discord

2. ```$ cd Botelicious/Discord```

3. ```$ nano config.json``` and fill in the empty fields for ```"token"``` and ```"url"```. You may change the prefix too if you like.

**Sample config.json**
```
{
"token" : "oalehuk4NzYkl9o4Nehtsp0n.qklunl.17jgsplzZK5lbGu6rhskauqyuk1",
"prefix" : "+",
"cosmos_node" : {
"url" : "111.11.11.11",
"ports" : ["26657", "26660", "1317"]
}
}
```
## Deploy
#### Method 1 – from source
4. ```$ npm i```
5. ```$ node app.js```

#### Method 2 – via docker
4. ```$ npm i```
5. ```$ docker build -t .```
6. ```$ docker run -i --name ```
## Command Glossary
#### Telegram

Menu

![Menu](Telegram/pics/node.png)

Node Queries

![Node Queries](Telegram/pics/node_queries.png)

Chain Queries

![Chain Queries](Telegram/pics/chain_queries.png)

Alerts

![Alerts](Telegram/pics/alert.png)

LCD Queries

![LCD Queries](Telegram/pics/lcd.png)

Bitmex

![Bitmex](Telegram/pics/mex.png)

#### Discord
```
Append [IP] if querying a node that's not speficied in config.json

+cosmos last block (last block height the node is synced at)
+cosmos node info (node-id, address, voting power etc.)
+cosmos peers count (num. of peers)
+cosmos peers list (list all peers)
+cosmos validators (list all active validators)
+cosmos genesis validators (list all genesis validators)
+cosmos block [block#] (hash and proposer of the block; num. of txs in the block)
+cosmos proposals (all proposals with YES/NO ratio)
+cosmos txs [txn hash] (gas wanted & gas used in transaction)
+cosmos subscribe [validator addr] (get alerts when the validator in query misses blocks)
+cosmos unsubscribe [validator addr] (stop alerts)

---
The following commands require a running REST server

+cosmos keys (all keys available at the supplied account)
+cosmos mempool flush (flush flush)
+cosmos balance (account balance)
```
For use in Irisnet, simple replace ```+cosmos``` with ```+iris```.
## Contact
@aakatev
@jim380