Results

The object that the game returns once the game has ended

Results

Once the game has ended, it will send an object containing all the results. This will be useful if you want to create your own win or lose embed.

Name

Datatype

Description

result

String

The result of the game. Type of results:

  • WIN

  • LOSE

  • TIE

  • DOUBLE WIN

  • DOUBLE LOSE

  • DOUBLE TIE

  • CANCEL

  • TIMEOUT

method

String

Shows how the player won. List of methods:

  • You had blackjack

  • You had more

  • You busted

  • Dealer had blackjack

  • Dealer had more

  • Dealer busted

  • Tie

  • None (only if it's canceled or timeout)

ycard

Array<Object>

Your cards in objects.

dcard

Array<Object>

Dealer's cards in objects.

message (optional)

Discord.Message

The message object. This object is only given if options.transition is set to edit

Example object:

{
    result: "Win",
    method: "You had more",
    ycard: [
        { suit: 'diamonds', rank: 'J', value: 10, emoji: "♦️"}, 
        { suit: 'hearts', rank: '8', value: 8, emoji: "♥️"}
    ],
    dcard: [
        { suit: 'clubs', rank: 'K', value: 10, emoji: "♣️" },
        { suit: 'spades', rank: '7', value: 7, emoji: "♠️" }
    ],
    message: Discord.Message
}

The next chapter will show you some examples on how to use options

Last updated