Made blackjack functions more specific

This commit is contained in:
2023-01-05 16:25:59 +10:00
parent 01d9659be1
commit 7704efc11f

View File

@@ -8,6 +8,7 @@ botIntents = discord.Intents.all()
client = discord.Client(intents=botIntents)
tree = app_commands.CommandTree(client)
blackJack = BlackJack()
@client.event
async def on_ready():
@@ -75,9 +76,8 @@ class HitOrStand(discord.ui.View):
async def bj(interaction: discord.Interaction):
discinput = lambda m: discordInput(interaction, m)
discoutput = lambda m: discordOutput(interaction, m)
blackJack = BlackJack(discinput, discoutput)
await interaction.response.send_message("Let's play Black Jack!")
await blackJack.play_game(interaction.user.id, 100)
await blackJack.play_game(interaction.user.id, 100, discinput, discoutput)
async def discordInput(interaction: discord.Interaction, message:str):
response = HitOrStand()