Neblio crypto currency tipbot for Slack
We're using digitalocean.com so these instructions will be specific to that plaform.
- Go to digitalocean.com and create a new droplet
- hostname: nebl-tipbot
- Size
- Pick either w/ 2GB/2CPUs $20 a month or w/ 1GB/1CPUs $10 a month.
- Region
- Amsterdam or whatever location is closest to you.
- One-click Apps
- Dokku 0.94 on 16.04
- Add SSH keys
- Digital Ocean provide a easy-following tutorial for this that can be accessed once you click on add SSH key’s option, you’ll see a html link above the ssh key input console for creating and using SSH keys.
- Copy/Paste IP address into URL bar after the droplet has installed which might take 5/10 minutes, to be faced with the Dokku setup.
- Put in
hostname
for whatever domain you are using.example.com
- Check `Use virtualhost naming for apps
http://<app-name>.example.com
- Finish Setup
- Put in
- You'll need a domain for this. For this documentation I'm using
example.com
- Point your domain's nameservers to digitalocean
ns1.digitalocean.com
ns2.digitalocean.com
ns3.digitalocean.com
- In digitalocean's
DNS
section set anA-Record
for yourhostname
from your previous step- Make the
hostname
be the name of your appnebl-tipbot
- Make the IP address be the one provided by digitalocean for your droplet.
- Make the
- After the DNS propogates which may take 10/20 minutes.
- In the
Zone file
of the DNS section of digital ocean you'll see:nebl-tipbot IN A 143.143.243.143
- In the
- Go to a console/terminal on your Desktop and enter the following to command to see if the domain is live and connected to your droplet, you should see a response with your droplet's IP.
ping nebl-tipbot.example.com
PING nebl-tipbot.example.com (143.143.243.143): 56 data bytes
ssh -o "IdentitiesOnly yes" -i ~/location/id_rsa root@droplet-ip
orssh root@droplet-ip
- If you correctly added your SSH keys you'll get signed in
Compile nebliod & let the blockchain sync which may take up to around 10-15 hours. (You can still progress but balances won't update until synced)
-
cd
-
git clone https://github.com/NeblioTeam/nebl-tipbot
-
cd nebl-tipbot
-
Install Ruby 2.4.0 and rvm
-
sudo apt-get install libgdbm-dev libncurses5-dev automake libtool bison libffi-dev
cdgpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
curl -sSL https://get.rvm.io | bash -s stable
source /home/nebl-tipbot/.rvm/scripts/rvm
-
rvm install ruby-2.4.0
-
rvm use 2.4.0 --default
-
ruby -v
-
Install bundler
-
gem install bundler
-
bundle update
-
sudo apt install ruby-bundler
-
To start using RVM you need to run
source rvm
-
Run
bundle
-
Parsing dependencies.
-
chmod +x disp.sh
-
sudo apt-get install html-xml-utils
-
Enter droplet IP in the
bitcoin_client_extensions.rb
file where it saysHost IP
-
nano bitcoin_client_extensions.rb
-
{ host: 'Host IP', port: 6326, ssl: false} )
-
Ctrl + X + Enter to save.
-
Install node.js and slack-sdk client.
-
sudo apt install -y nodejs-legacy && sudo apt install -y npm && git clone https://github.com/slackapi/node-slack-sdk
-
cd node-slack-sdk
-
sudo npm install -g forever
-
sudo npm install -g @slack/client --save
-
sudo npm install -g --save-dev capture-console
-
cd
-
cd tipbot
- https://api.slack.com/custom-integrations/legacy-tokens
- Request a legacy token for your slack channel and copy it to the clipboard.
- Paste this value in the
leaderboard.js
file andmessage.js
file in the following positon where the valueAPI_KEY
is. var token = process.env.SLACK_API_TOKEN || 'API_KEY' ;
nano leaderboard.js
-> Ctrl + X + Enter to save.nano message.js
-> Ctrl + X + Enter to save.
- https://neblio.slack.com/services/new/outgoing-webhook
- Write down the api token they show you in this page
- Set the trigger word, use
tipbot
- Set the Url to the server you'll be deploying on http://example.com:4567/tip
source rvm
bundle
forever start message.js
forever start leaderboard.js
RPC_USER=neblrpc RPC_PASSWORD=your_pass SLACK_API_TOKEN=your_api_key COIN=neblio bundle exec ruby tipper.rb -p 4567
- Ctrl/Cmd + A + D to detach from the screen.
Note: Tip over 10 times before initating the leaderboard command.
say any of the tipbot commands for example tipbot hi
, tipbot tip @username 100
, tipbot deposit
use the command tipbot help
to find out more.
This wallet is unecrypted please go to extra efforts to secure the system from attacks, aka encrypting the neblio core wallet and SSL encryption improvement.
Forked from coin-agnostic tipbot by cgcardona along with aspects of the tutorial.
This project was originally forked from dogetip-slack by tenforwardconsulting