I then refactored the code, coalesced all prices into one bot and made it generic so that anyone who wants to add this bot to their discord server can with minimal configuration of the environment variables in
From here I was able to find the right match in the array of exchange pairs and get our token values.
And then we get the fiat values from here, all in BTC
We need to do some calculation around volume, then format all the strings we want the bot to report.
Finally we loop around and display each statistic after another with the sleep time requested.
Once this is done, it starts again, fetches the API one more time and does its thing, displays the newly acquired data.
Here is the results in an animated gif with 15 seconds interval:
Install instructions from the README.md
Installing the prerequisites
sudo apt install python-pip pip install pipenv
Installing the bot:
git clone https://github.com/gluneau/discord-crypto-bot.git cd discord-crypto-bot pipenv install
Here is a proposed sample for your .env file:
YOURDISCORDTOKEN=Nxxxxxxxxxxxxxxxxxxxxxx4.Dxxxxw.mxxxxxxxxxxxxxxxxxxxxxxxxxk BOTSLEEP=15 BOTPAIR=STONE_BTC BOTFIAT=USD
Running the bot
pipenv run python3 bot.py
It depends of the community requests, I will implement new features as they come up.
How to contribute
Simple! 1. fork, 2. modify, 3. submit a pull request to the official repository.
Proof of work
Discord is an all-in-one voice and text chat for gamers (and crypto enthusiasts obviously!) that's free, secure, and works on both your desktop and phone.
Create your app and bot right here:
To add your new bot to a server you administer, replace the place holder with your client id and go:
CryptoBridge is a decentralized exchange (DEX) that supports trading of most popular tokens & altcoins. In the hands of BridgeCoin Holders. Built on the Bitshares(BTS) CryptoBrigde’s order book, trades and accounts are completely decentralized. CryptoBridge can be access by anyone with internet access 24/7. Trading never stops.
STONE is a rock solid, feature rich cryptocurrency ecosystem. A group of ambitious community members banded together and began implementing their skills to revive the coin after being abandoned by the original developer. The choice to rebuild the infrastructure was easy due to the coin having been listed on two exchanges and the core built on an older Dash core that was widely known and easy to understand.
The bot is running on their Discord Server.