GooBot DiscordBot Features: There is 3 here#77
Open
zhaoyd5268 wants to merge 10 commits intoLEAGUE-Level6:developmentfrom
Open
GooBot DiscordBot Features: There is 3 here#77zhaoyd5268 wants to merge 10 commits intoLEAGUE-Level6:developmentfrom
zhaoyd5268 wants to merge 10 commits intoLEAGUE-Level6:developmentfrom
Conversation
third feature and begin on third feature
not invoked issue with webClientMock" for feature 3. Then your done!
Whale92130
reviewed
Nov 14, 2024
Collaborator
Whale92130
left a comment
There was a problem hiding this comment.
overall no major problems and good code
| answer = calculate(event, num1, num2, op); | ||
| event.getChannel().sendMessage("I got the answer! It is... " + answer); | ||
| } else { | ||
| event.getChannel().sendMessage("Sorry, we've ran into an error. To be specific, the operation" + |
Collaborator
There was a problem hiding this comment.
This error message to the user should be more concise
| public String getCoolWord() { | ||
| String word = "error"; | ||
| try { | ||
| URLConnection con = url.openConnection(); |
Collaborator
There was a problem hiding this comment.
this is ambiguous should be uCon or urlCon
| } | ||
|
|
||
| public static double calculate(MessageCreateEvent event, double num1, double num2, String Op2) { | ||
| answer = 0; |
Collaborator
There was a problem hiding this comment.
you should set answer to integer.MAX_VALUE then check later if it changed as a way to check that an operation happened.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi! To preface, there is three features in this one, so it counts as three
Feature 1: Greeting
(When you type !greeting in the discord chat, GooBot will pick one of 3 greetings and say it in the chat.)
Feature 2: Calculator
(This one take two numbers and does the specified operation on them. Included operations are +, -, /, x, ^, and %. When entering numbers to test, make sure to have it in this format: !calculator ? space ?. Examples: !calculator 5 x 5, !calculator 7 / 1)
Feature 3: Random word generator
(Exactly what is says! Simply enter !CoolWord in the discord chat and the api should get a word and send it in the chat!