A personal project that started out as a proof of concept to myself. I stopped working on this for a while but hopefully I can continue development soon! ANormalBot is a discord bot that allows users to fetch prices of stocks and cryptocurrencies, periodically gather crypocurrency prices to chart, and even play some music.
Abbreviations are used here.
-
!help- Get a PM containing a list of all commands and their usage. -
!ping- pong! See how long it takes for the bot to respond
-
!ccp <IDENTIFIER>- Check the price of a cryptocurrency by its identifier. -
!cc <IDENTIFIER>- Genereate a chart based on gathered cryptocurrency data. -
!gcd <IDENTIFIER>- Start a task to periodically gather cryptocurrency data for charting.
!csp <TICKER SYMBOL>- Check the price of a stock by its ticker.
!p <URL>- Search and play content in the requesting users active voice channel by URL.
-
!cw- Allow users to create and manage a watchlist of cryptocurrencies -
!sw- Allow users to create and manage a watchlist of stocks -
!sc- Generate a chart using gathered stock data. -
!gsd- Start a task to periodically gather stock data. -
!skip- Allow users to skip currently playing content. Implies existence of content queues.
After cloning the repository, you will need to:
- Create a discord bot token here
- Create coinmarketcap and tradier API tokens here, and here
- Insert the above tokens into their appropriate places
- Coinmarketcap and Tradier tokens go into their respective commands - CheckCryptoPrice/GatherCryptoData, and CheckStockPrice
- Discord bot token should go into an application.properties file under
/src/resources/application.properties
astoken = <TOKEN VALUE>- You will also need to define
spring.datasource.url,spring.datasource.username, andspring.datasource.password - Additionally, you can use
spring.jpa.hibernate.ddl-auto = updateto automatically generate tables and such in your database. Keep in mind this requires the appropriate permissions in your database.
- You will also need to define
- Finally, allow maven to build the projects dependencies, compile, and run!
After adding the bot into your server, you should see it online, and it should respond to any of the above commands. Start with
!helpto get a list of information.
- Spring Data
- Java Discord API (JDA)
- MySQL