Skip to content

Commit 8049479

Browse files
committed
fix
1 parent 5daa857 commit 8049479

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/quiz_handler.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ pub async fn handle_color_quiz(
175175

176176
pub async fn trigger_math_quiz(msg: &MessageCreate, locked_state: &mut MutexGuard<'_, State>) -> Option<Command> {
177177
if locked_state.config.openai_api_key.is_none()
178-
|| locked_state.rng.gen_range(0..100) == 42
178+
|| locked_state.rng.gen_range(0..500) != 42
179179
|| locked_state.pending_math_tests.contains_key(&msg.channel_id.get())
180180
|| locked_state.pending_color_tests.contains_key(&msg.channel_id.get())
181181
{
@@ -212,7 +212,7 @@ pub async fn trigger_math_quiz(msg: &MessageCreate, locked_state: &mut MutexGuar
212212
}
213213

214214
pub async fn trigger_color_quiz(msg: &MessageCreate, locked_state: &mut MutexGuard<'_, State>) -> Option<Command> {
215-
if locked_state.rng.gen_range(0..100) == 42
215+
if locked_state.rng.gen_range(0..500) != 42
216216
|| locked_state.pending_color_tests.contains_key(&msg.channel_id.get())
217217
|| locked_state.pending_math_tests.contains_key(&msg.channel_id.get())
218218
{

0 commit comments

Comments
 (0)