Made blackjack functions more specific
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user