Rosie is a Discord bot with ~20 features that serves as a centralized platform to perform many actions in one place - so long ago are the days where we had to open many Google Chrome tabs to do what we wanted.
Here's a short demo some of Rosie's features:
- !ping - tests to see if Rosie is up and running. Responds with "Pong!" if so.
- !help - responds with all features and documentation on how to use each command.
- !serverinvite - generates an invitation link to the server that expires in 10 minutes.
- !botinvite - generates a link to invite Rosie to more Discord servers.
- !calculate [number1] [+, -, *, /, %, ^] [number2] - computes basic math.
- !moremath quadratic [number1] [number2] [number3] - quadratic formula; enter values to get the roots of an equation.
- !moremath pythagorean [number1] [number2] - pythagorean theorem; enter two side lengths to get the hypotenuse.
- !moremath [sin, cos, tan, c2f, f2c] [number] - computes more math operations; C2F and F2C are Celsius to Fahrenheit and Fahrenheit to Celsius respectively.
- !random coin - flip a coin.
- !random dice - roll a die.
- !random card - draw a card.
- !random choose option1 | option2 | option3 | ... - choose an option.
- !random between [number1] [number2] - get a number in that range (inclusive).
- !8ball [anything] - get a random Magic 8-Ball response!
- !remindme [number] [s, seconds, m, minutes, h, hours] [reminder] - set a reminder; Rosie will send you a direct message reminding you when time is up.
- !reddit [name of subreddit] - responds with the top five current hottest posts of a subreddit.
- !googlesearch [query] - responds with the top three links to come up in Google.
- !todo add [query] - add an entry to your todo list.
- !todo view - view your current todo list.
- !todo complete [existing entry] - mark an entry as completed.
- !todo remove [existing entry] - delete an entry from your to do list.
-
Go to
.env-sample
, provide the following keys, and rename file to.env
:Get your Discord token
DISCORD_TOKEN=replace_me
Get your Reddit keys
REDDIT_USER=replace_me
REDDIT_PW=replace_me
REDDIT_PUBLIC_KEY=replace_me
REDDIT_PRIVATE_KEY=replace_me
Get your Google Custom Search Engine (CSE) keys
GCSE_ENGINE_ID=replace_me
GCSE_API_KEY=replace_me
Install MySQL
MYSQL_URL=replace_me
MYSQL_USER=replace_me
MYSQL_PW=replace_me
-
Go to
docker-compose-sample.yml
, replace lines 11 and 12 with your respective DB name and password, and rename file todocker-compose.yml
-
docker build -t rosiebot .
-
docker-compose up -d
-
Need to add a lot more error handling.
-
More features (currently looking into incorporating Google Calendar, money conversion, and tweet grabbing commands).
-
Cleaning up the codebase significantly - namely abstracting a lot of the code in various commands to helper functions / separate files, for example in the
ToDoList.java
command, having a separation of concern for the database connection logic.
-
If you ever need to recompile the
.jar
filemvn package
(Two .jar
files will be generated in the target/
directory - rename the one with dependencies to rosie.jar
and move it to the root directory)
- Pull requests are always welcomed :)