Made blackjack functions more specific
This commit is contained in:
@@ -8,6 +8,7 @@ botIntents = discord.Intents.all()
|
|||||||
|
|
||||||
client = discord.Client(intents=botIntents)
|
client = discord.Client(intents=botIntents)
|
||||||
tree = app_commands.CommandTree(client)
|
tree = app_commands.CommandTree(client)
|
||||||
|
blackJack = BlackJack()
|
||||||
|
|
||||||
@client.event
|
@client.event
|
||||||
async def on_ready():
|
async def on_ready():
|
||||||
@@ -75,9 +76,8 @@ class HitOrStand(discord.ui.View):
|
|||||||
async def bj(interaction: discord.Interaction):
|
async def bj(interaction: discord.Interaction):
|
||||||
discinput = lambda m: discordInput(interaction, m)
|
discinput = lambda m: discordInput(interaction, m)
|
||||||
discoutput = lambda m: discordOutput(interaction, m)
|
discoutput = lambda m: discordOutput(interaction, m)
|
||||||
blackJack = BlackJack(discinput, discoutput)
|
|
||||||
await interaction.response.send_message("Let's play Black Jack!")
|
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):
|
async def discordInput(interaction: discord.Interaction, message:str):
|
||||||
response = HitOrStand()
|
response = HitOrStand()
|
||||||
|
|||||||
Reference in New Issue
Block a user