Level 6 - Project Overview
Project Description
We're going to make a discord bot! It will listen in our discord channel for a specific
command to be issued, and then run some sort of logic and send a message in the
channel.
Graduating Level 6
- Create 3 new features that meet all of the requirements below
- Review 3 features belonging to someone else
- Ensure your 3 branches are merged into development, fixing any issues found by reviewers
Project Requirements
Create three new features for the bot.
Feature 1 + Unit Tests
Your first feature should be very simple, just to get comfortable with how the bot works. It should listen for the command, and then send a simple response
Feature 2 + Unit Tests
Your second feature should include some sort of interaction between the user and the bot. This could mean simply taking a second word as part of the command as a "parameter", or making some sort of game that spans multiple commands.
Feature 3 + Unit Tests
Challenge yourself! Use an API to retrieve data from another service, or make a challenging game. This feature should be something that you don't already feel comfortable accomplishing.
Additional Requirements That Help Keep Our Bot Clean:
- Each feature should have a help embed. This will provide details about your feature when the user types "!help" into the chat. For implementation details, please view the constructor of RandomNumber.java.
- Each feature should be properly unit tested. Our goal is 100% test coverage for your feature's code. Certain pieces of code may be prohibitively difficult to test, such as the .uri(...) method call inside of NewsApi's getNewsStoryByTopic() method. You can ask your teacher for permission to not have 100% coverage if you believe that there is good reason, but exceptions will be granted very sparingly. You should start your unit tests by including the tests that are within the FeatureTemplateTests class. If your feature somehow ends up merged without appropriate number of unit tests, or it breaks the development branch, it will be completely removed.
- Your feature should not print anything using System.out.println() after you are done developing it. This will not be seen by the user, and will only clutter up the console for other people. In fact, one of the standard unit tests that you should take from the example tests checks that nothing is printed out in this manner.
- Your feature should not write to any files (i.e. do not use a FileWriter or PrintWriter). This can introduce problems when the project is packaged as a .jar file, and also clutters up the project with additional files. You can save values into variables that will persist for as long as the bot is kept running, and that should provide a long enough life-span for any feature you may want to write.
- Maintain and follow the current project file structure. You feature's code should be created in one of the feature packages located inside of the "src/main/java/org/jointheleague/features/student" package. Any plain old java objects (POJOs) that your code needs, for example when making API request, should reside in an appropriately-named package within the "third_feature.plain_old_java_objects" package. For example, the NewApi's POJOs are located here: /features/examples/third_features/plain_old_java_objects/news_api
- Do not add any files outside of the "/features/student" package. Your unit tests, while under the "test" source set, still technically fall within this package.
- Once a single feature is done, create a pull request for it to merge it back into the development branch. Please do not create a pull request that contains multiple features, as it is much more time consuming to verify. In the message for your pull request, include the command used to run your feature, as well as a little background information about what it is supposed to do
Review three pull requests created by someone else
- When you review a pull request, you should clone the repository and run that branch to verify that the feature works as expected
- Verify that the feature contains a help embed
- Verify that the feature has unit tests, and that they all pass
- Verify that the feature follows all of the guildlines listed above in the "Additional Requirements" section
- If you find an issue with the feature, leave a comment on the pull request that outlines the issues that you found
- If you find that everything is working correctly, and all of the "Additional Requirements" have been satisfied, approve the pull request