Skip to content

Commit 9ba5cee

Browse files
committed
feat: remove redudant redis call
1 parent 2a64910 commit 9ba5cee

File tree

1 file changed

+1
-2
lines changed
  • src/adapters/discord/commands

1 file changed

+1
-2
lines changed

src/adapters/discord/commands/bake.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@ pub async fn bake(
2222
return Ok(());
2323
}
2424

25-
let n = ctx.data().queue.size(&guild_id).await.min(amount);
26-
let baked = ctx.data().queue.pop_n(&guild_id, n).await;
25+
let baked = ctx.data().queue.pop_n(&guild_id, amount).await;
2726

2827
let message = if baked.is_empty() {
2928
"😟 Ingen å steke vafler til.".to_string()

0 commit comments

Comments
 (0)