A simple Discord bot that can fetch cryptocurrency data from the CoinCap API and display it in a Discord channel. It also includes a help command and a purge command to delete past messages.
- Clone this repository:
git clone https://github.com/your-username/discord-crypto-bot.git- Install the required packages:
npm install discord.js
npm install fetch- Set you Discord bot token in the '.env' file:
DISCORD_TOKEN=your-bot-token-hereYou can obtain a token for your bot from the Discord Developer Portal
- Start the bot:
npm startThe bot responds to commands starting with the ! prefix. The available commands are:
!coin [symbol | 10 | all]: Returns the current price of a cryptocurrency with the given symbol or the top 10/50 cryptocurrencies by market cap.!help: Shows all available commands and how to use them.!purge [number]: Deletes the specified number of messages from the channel.
If you want to contribute to this project, please follow these steps:
- Fork this repository.
- Create a new branch with your changes: git checkout -b my-feature-branch
- Make your changes and commit them: git commit -am 'Add some feature'
- Push your branch to your fork: git push origin my-feature-branch
- Create a new pull request.
The project is licensed under the MIT License.