Skip to content

Discord bot written in Python for tracking information on blockchain. API from CoinGecko was used to fetch the data

Notifications You must be signed in to change notification settings

foxier25/Discord-Bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Discord Bot for tracking Blockchain Info

Discord bot written in Python using discord.py for tracking information on blockchain

API from CoinGecko was used to fetch the data

Prerequisites

  • .env file

    Provide TOKEN variable obtained from Discord developer portal

  • venv

    Before installing dependencies it is highly recommended to work in virtual environment. If you want to create virtual environment .venv, use following command:

     python -m venv .venv

    Make sure it is activated after installation

Install dependencies

pip install -r requirements.txt

Usage

  • Command python main.py

    This command initiates the bot using file logging. The bot's activities, errors, and relevant information will be logged into a file named discord.log. File logging has advantages for long-term record-keeping, troubleshooting, and maintaining a history of the bot's performance. Keep in mind that file logging may accumulate data over time, so regular maintenance might be needed to manage log files.

  • Command python main.py --test

    This command starts the bot in testing mode, utilizing standard console logging. When initiated with the --test flag, the bot will log information directly to the console instead of a file. Console logging is useful during testing and development phases, providing immediate feedback and visibility into the bot's activities.

Commands

Command Explanation
$sync Syncing slash commands with the guild
/ath [coin] All time high for the coin
/info [coin] Basic info for the coin (market cap, price, 24h change etc.)
/pnl [coin] [type] [price] Profit and loss for the coin based on type of the position and the price when position was opened
/price_change [coin] Price change (24h, 7 days, 14 days, 30 days)
/price [coin] Price of the coin
/top [n] Top n coins by the market cap

About

Discord bot written in Python for tracking information on blockchain. API from CoinGecko was used to fetch the data

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages