Skip to content

Commit

Permalink
Merge pull request #574 from beanbeanjuice/572-8ball-rename
Browse files Browse the repository at this point in the history
Renamed the 8 Ball Command
  • Loading branch information
beanbeanjuice committed May 5, 2023
2 parents 34442c2 + 8b2c08b commit ce4f93a
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion README-small.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,8 @@ As you can see, this was shown using the command `/help order`. It shows each pa
* `rate` - Rate the percentages of someone! (*somewhat* NSFW)
* `snipe` - Snipe a recently deleted message! (30 Seconds)
* `tea-meme` - Get a tea meme!
* `8ball` - Ask a yes or no question!
##### 4. **GAMES**
* `8-ball` - Ask a yes or no question!
* `coin-flip` - Flip a coin!
* `connect-4` - Play connect four with someone!
* `dice-roll` - Roll a dice!
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,8 @@ As you can see, this was shown using the command `/help order`. It shows each pa
* `rate` - Rate the percentages of someone! (*somewhat* NSFW)
* `snipe` - Snipe a recently deleted message! (30 Seconds)
* `tea-meme` - Get a tea meme!
* `8ball` - Ask a yes or no question!
##### 4. **GAMES**
* `8-ball` - Ask a yes or no question!
* `coin-flip` - Flip a coin!
* `connect-4` - Play connect four with someone!
* `dice-roll` - Roll a dice!
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.beanbeanjuice.command.games;
package com.beanbeanjuice.command.fun;

import com.beanbeanjuice.utility.command.CommandCategory;
import com.beanbeanjuice.utility.command.ICommand;
Expand Down Expand Up @@ -44,6 +44,7 @@ private String getAnswer() {
yesAnswers.add("Of course.");
yesAnswers.add("More than likely.");
yesAnswers.add("YES ABSOLUTELY.");
yesAnswers.add("Hmmm... I think so.");

ArrayList<String> noAnswers = new ArrayList<>();
noAnswers.add("Of course not.");
Expand All @@ -52,8 +53,9 @@ private String getAnswer() {
noAnswers.add("There is some doubt...");
noAnswers.add("Less than likely.");
noAnswers.add("ABSOLUTELY NOT.");
noAnswers.add("Are you kidding? No!");

if (Helper.getRandomNumber(1, 3) == 1)
if (Helper.getRandomNumber(0, 2) == 1)
return yesAnswers.get(Helper.getRandomNumber(0, yesAnswers.size()));
else
return noAnswers.get(Helper.getRandomNumber(0, noAnswers.size()));
Expand All @@ -62,13 +64,13 @@ private String getAnswer() {
@NotNull
@Override
public String getDescription() {
return "Ask 8-ball a yes or no question!";
return "Ask the 8 ball a yes or no question!";
}

@NotNull
@Override
public String exampleUsage() {
return "`/8-ball Will I ever be real?`";
return "`/8ball Will I ever be real?`";
}

@NotNull
Expand All @@ -82,7 +84,7 @@ public ArrayList<OptionData> getOptions() {
@NotNull
@Override
public CommandCategory getCategoryType() {
return CommandCategory.GAMES;
return CommandCategory.FUN;
}

@NotNull
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,12 @@ public CommandHandler(@NotNull JDA jda) {
commands.put("meme", new MemeCommand());
commands.put("snipe", new SnipeCommand());
commands.put("tea-meme", new TeaMemeCommand());
commands.put("8ball", new EightBallCommand());

// Games
commands.put("coin-flip", new CoinFlipCommand());
commands.put("connect-4", new ConnectFourCommand());
commands.put("dice-roll", new DiceRollCommand());
commands.put("8-ball", new EightBallCommand());
commands.put("get-game-data", new GetGameDataCommand());
commands.put("tic-tac-toe", new TicTacToeCommand());

Expand Down

0 comments on commit ce4f93a

Please sign in to comment.