const { bet } =require('jelly-djs')constgame=awaitbet(message, bot)switch (game.output) {case'Win':// do win stuff here, you can disable normal win embeds and send your own embeds too.break;case'Tie':// do tie stuff herebreak;case'Lose'://do anytyhing if you Loose.break; }
Required Parameters -
Parameter -
Type
Description
Message
Your message object
Client
Your client object
Optional Parameters -
Parameter
Type
Description
Default
resultEmbed
If set to true, then it will send embeds on win, if false, it wont.
true
Betting with options -
const { bet } =require('jelly-djs')constgame=awaitbet(message, bot, { resultEmbed:false })switch (game.result) {case'Win':message.channel.send({embeds: [newDiscord.MessageEmbed().setAuthor(usertag, avatar).setTitle(`You Win!`).addField(`Your Hand`,`Cards: ${game.ycontent}\nTotal: \`${game.yvalue}\``).addField(`Jelly's Hand`,`Cards: ${game.dcontent}\nTotal: \`${game.dvalue}\``).addField(`Ammount Won -`,`${winamt.toLocaleString()}`).setColor('#26f063') ]})// do win stuff herebreak;case'Tie':message.reply({embeds: [newDiscord.MessageEmbed().setAuthor(usertag, avatar).setTitle(`Match Tied!`).addField(`Your Hand`,`Cards: ${game.ycontent}\nTotal: \`${game.yvalue}\``).addField(`Jelly's Hand`,`Cards: ${game.dcontent}\nTotal: \`${game.dvalue}\``).addField(`Ammount Won -`,`\`0\``).setColor('YELLOW') ]})// do tie stuff herebreak;case'Lose':message.channel.send({embeds: [newDiscord.MessageEmbed().setAuthor(usertag, avatar).setTitle(`You Loose!`).addField(`Your Hand`,`Cards: ${game.ycontent}\nTotal: \`${game.yvalue}\``).addField(`Jelly's Hand`,`Cards: ${game.dcontent}\nTotal: \`${game.dvalue}\``).addField(`Ammount Lost`,`\`${amt.toLocaleString()}\``).setColor('#f23518') ]})// do lose stuff herebreak; }