This is old project and its still work in progess, but will be updated in near future. A Discord bot in Java that provides various utilities including air pollution data and New York Times articles.
-
Prerequisites
- Java 17 or higher
- Maven
- Discord Bot Token
- AirVisual API Key
- New York Times API Key
-
Configuration Create
application.properties
insrc/main/resources/
:airvisual.api.key=your_airvisual_api_key nyt.api.key=your_nyt_api_key
-
Getting API Keys
-
Discord Bot Token:
- Go to Discord Developer Portal
- Create New Application or select existing
- Go to "Bot" section
- Click "Reset Token" to get your bot token
-
AirVisual API Key: Sign up at AirVisual
-
NYT API Key: Sign up at NYT Developer Portal
-
Run with token
java -jar bot.jar -t YOUR_DISCORD_TOKEN
Or use long format
java -jar bot.jar --token YOUR_DISCORD_TOKEN
Show help menu
java -jar bot.jar -h
- Open project in your IDE
- Edit Run Configuration
- Add Program Arguments:
-t YOUR_DISCORD_TOKEN
!air
- Get air pollution data for nearest city!world <number>
- Get most popular NYT articles (specify number of articles to display)
bash mvn clean package
The compiled jar will be in the target
directory.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
- Never commit your API keys or tokens
- Add
application.properties
to.gitignore
- If you suspect your token has been compromised, reset it immediately
- 1. Fix "!air" and do air quality response formatting:
"The tempearture in [city] is [current].[weather].[tp] c, and air humidity is [current].[weather].[hu] %, with [current].[weather].[ws] m/s of wind"
- + adding image to response to 1: load an image based on [current].[weather].[ic]
- 2. show current day and polish namedays
- 3. hosting
- 4. create in memory todolist for all users
- 5. add to in memory todolist
- 6. add icon from user
- 7. remind about duolingo at 22 CET
- -----------------------------------------------------------