Skip to content

Commit

Permalink
Fix #20
Browse files Browse the repository at this point in the history
  • Loading branch information
SeveralCircles committed Oct 11, 2021
1 parent 5f56fb0 commit 1dc6d2b
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import com.google.cloud.language.v1.Sentiment;
import com.severalcircles.flames.data.base.ConsentException;
import com.severalcircles.flames.data.base.FlamesDataManager;
import com.severalcircles.flames.data.global.GlobalData;
import com.severalcircles.flames.data.user.FlamesUser;
import com.severalcircles.flames.data.user.UserFunFacts;
import com.severalcircles.flames.features.Analysis;
Expand Down Expand Up @@ -70,9 +71,9 @@ public void onMessageReceived(@NotNull MessageReceivedEvent event) {
Today.highScore = user.getScore();
Today.highUser = event.getAuthor().getName();
}
int quoteChance = (int) Math.round(Math.random() * 2);
int quoteChance = (int) Math.round(Math.random() * Math.round(GlobalData.participants / 2));
System.out.println(quoteChance);
if (Today.quote[0] == "We're still waiting for somebody to say something epic." && sentiment.getMagnitude() >= 0.9 && quoteChance == 1) {
if (Today.quote[0] == "We're still waiting for somebody to say something epic." && sentiment.getMagnitude() >= 0.9 && quoteChance == Math.min(1, Math.round(GlobalData.participants / 2))) {
Today.quote = new String[]{content, event.getAuthor().getName()};
MessageEmbed congrats = new EmbedBuilder()
.setAuthor("Flames", null, event.getAuthor().getAvatarUrl())
Expand Down

0 comments on commit 1dc6d2b

Please sign in to comment.