BlackJack

BlackJack - Just like normal blacjack.

BlackJack Example -

const { blackjack } = require("jelly-djs");
client.on('messageCreate', async(msg) => {
  if(msg.content === '!blackjack'){
        
        let game = blackjack(msg, client)
        
        switch (game.result) {
            
          case 'Win':
            // do win stuff here
            break;
          case 'Tie':
            // do tie stuff here
            break;
          case 'Lose':
            // do lose stuff here
            break;
          case 'Double Win':
            // do double win stuff here
            break;
          case 'Double Lose':
            // do double lose stuff here
            break;
          case 'ERROR':
            // do whatever you want
            break;
            
        }
  } 
})

Required Parameters -

Parameter -

Type

Description

Message

Message variable used in your code

Client -

Your variable which you used to define your client.

Optional Parametres (Must be inside an object) -

Name - resultEmbed

Type - boolean

Description - If its set to false then your bot will not send any embeds on results, like if an user wins then it will not send anything. Normally its set to false.

Required - false

Example with options -

Last updated

Was this helpful?