CryptoWatcher

Cryptowatcher is a discord.py script you must run with your own bot account. It automatically reports ethereum, bitcoin, or dogecoin prices on a user-set schedule to a user-set discord channel. You can also manually request all three coin's price on demand. Prices are in USD.

Installation

Use the package manager to install required packages.

pip install -r requirements.txt

Need help installing and using python? Follow these steps below.

If you're on windows, I recommend using conda to create a python environment specific to this bot instead of a direct install of python.

After installing conda open it and create an environment

conda create --name cryptowatcher python=3.8

Activate your new environment

conda activate cryptowatcher

You should see your environment name at the far left of your command line, now verify your python installation and making sure you have pip:

python --version
Python 3.8.10

pip --version
pip 21.1.3 from C:\Users\YourName\Anaconda3\envs\cryptowatcher\lib\site-packages\pip (python 3.8)

Finally, change your directory to the cryptowatcher directory.

cd <path to the folder, something like C:\Users\Jay\Desktop\cryptowatcher>

Finish up by installing the packages with pip at the beginning of this section.

Usage

Make a copy config.json.example and rename it to config.json. Open it up with notepad or whatever you use and fill out each line with the appropriate data. It should look similar to the example below.

Autoscrape can be set to "eth", "btc", or "doge". If it isn't set to one of these values, it will default to ethereum.

autoscrape_time_minutes should be set to a reasonable number of minutes. It defaults to 360, or every 6 hours.

Note - this is an example file, your token and channel ID will be different. See below if you need help finding them.

{
    "token":"aBcdEfGhijKlMnoPQRstuVwXYZ0123456789",
    "autoscrape":"eth"
    "autoscrape_time_minutes":360,
    "autoscrape_channel_ID":1234567890987654321
}

Need help creating a bot and getting your token? Follow this guide.

Need help finding your channel ID? Follow this guide.

Once your config.json file has been filled in and your pip packages are downloaded, run the bot. If you have the config file set up correctly, it will show you what currency is being autoscraped and how often as well as what bot your token is tied to.

python main.py
Autoscraping ethereum every 360 minutes
YourDiscordBotsName#0000 ready

Now your bot should have automatically grabbed and reported a crypto price automatically to your desired discord channel.

If you want an immediate update, you can get one.

!eth, !btc, !doge will get an immediate update of their respective coin.