constblackjack=require("discord-blackjack")constDiscord=require("discord.js")module.exports= { name:"blackjack",asyncexecute(message, args, client) => {let game =awaitblackjack(message, {resultEmbed:false})switch (game.result) {case"WIN":message.channel.send(newDiscord.MessageEmbed().setTitle("You won!").setDescription(`You have a total of ${game.yvalue} points!`) )break;case"LOSE":message.channel.send("You're a disgrace to us...") } }}
Basically, resultEmbed will disable the bot from sending it's own default result embed and will let the user make their own win/lose embed.
Disabling the buttons option
constblackjack=require("discord-blackjack")constDiscord=require("discord.js")module.exports= { name:"blackjack",asyncexecute(message, args, client) => {let game =awaitblackjack(message, { buttons:false }) // it will use messages instead of buttons now.switch (game.result) {case"Win":message.channel.send(newDiscord.MessageEmbed().setTitle("You won!").setDescription(`You have a total of ${game.yvalue} points!`) )break;case"Lose":message.channel.send("You're a disgrace to us...") } }}
Disabling the normalEmbed option
constblackjack=require("discord-blackjack")constDiscord=require("discord.js")module.exports= { name:"blackjack",asyncexecute(message, args, client) => {let embed = { title:"A very pro blackjack game", color:"RANDOM" fields: [ {name:`${message.author.username}'s hand`, value:"" }, {name:`Dealer's Hand`, value:"" } ], footer: { text:"Type E to end the game. This bot is so pro so go support us..." } let game =awaitblackjack(message, {normalEmbed:false, normalEmbedContent: embed})switch (game.result) { case "WIN":// do win stuff break; case "LOSE":// do lose stuff break;// rest of the case stuff } }}
So to make your own embed, the bot will need you empty out the value. Don't worry as it will replace it when sending messages.