print dealer's hand consistently
This commit is contained in:
@@ -196,7 +196,7 @@ pub async fn blackjack(ctx: Context<'_>, amount: String) -> Result<(), Error>
|
|||||||
"**Your hand**: {} ({})\n\n",
|
"**Your hand**: {} ({})\n\n",
|
||||||
"**Bet**: {}"
|
"**Bet**: {}"
|
||||||
),
|
),
|
||||||
format!("{}, `XX`", dealers_hand[0]),
|
format!("`{}`, `XX`", dealers_hand[0]),
|
||||||
dealers_hand[0].value(matches!(dealers_hand[0], Card { rank: Rank::Ace, .. })),
|
dealers_hand[0].value(matches!(dealers_hand[0], Card { rank: Rank::Ace, .. })),
|
||||||
players_hand.iter().map(|card| format!("`{card}`")).collect::<Vec<String>>().join(", "),
|
players_hand.iter().map(|card| format!("`{card}`")).collect::<Vec<String>>().join(", "),
|
||||||
players_count,
|
players_count,
|
||||||
@@ -218,7 +218,10 @@ pub async fn blackjack(ctx: Context<'_>, amount: String) -> Result<(), Error>
|
|||||||
if mci.member.clone().unwrap().user.id == ctx.author().id {
|
if mci.member.clone().unwrap().user.id == ctx.author().id {
|
||||||
mci.create_response(ctx,
|
mci.create_response(ctx,
|
||||||
serenity::CreateInteractionResponse::Message(
|
serenity::CreateInteractionResponse::Message(
|
||||||
CreateInteractionResponseMessage::new().ephemeral(true).content("You cannot interact with this message."))).await?;
|
CreateInteractionResponseMessage::new()
|
||||||
|
.ephemeral(true)
|
||||||
|
.content("You cannot interact with this message."))).await?;
|
||||||
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user