A simple discord bot to display the price of crypto tokens, written in C#.
Docker is the only supported way to deploy the bot.
- Clone this repository recursively:
git clone --recursive --depth 1 https://github.com/icc-dao/discord-ultimate-price-bot
- Create an
appsettings.json
file in the bot's root directory, you can find and example in the bot's root directory or here: appsettings.Example.json. - Configure
appsettings.json
to fit your needs. - Build and run the bot by issuing
docker-compose up -d --build
in the bot's root directory.
- To stop the bot and issue
docker-compose down
in the bot's root directory.
- Update your git repository:
git pull
- Build and run the bot again:
docker-compose up -d --build
- Visual Studio Code
- dotnet SDK 6.0
- Open the code-workspace file with Visual Studio Code
- Install the recommended plugins
- Work on
- ???
- Profit
Use appsettings.Development.json
to set development specific overrides.
Please help us to make the developer experience work in other IDE's, it is greatly appreciated!
- The bot's error handling needs a bit of work, logging is not implemented and the bot might just crash on configuration error. Make sure your Discord bot token and price data source API key is correct.
- The bot's price requesting implementation needs some work and it might trigger the CoinMarketCap API limit very fast, do use CoinGecko if you expect frequent price requests.
- The price cache and command cooldown is currently hardcoded, if you need to change it, you can find the respective lines in
PriceService.cs
andPriceModule.cs
- The bot currently uses the Discord.Net Text Command Service, which is fine, however it does not support SlashCommand or interactions, so we might need to implement the Interaction Framework.
Please submit a pull request to fix any of the issues!