VERY BASIC implementation

This commit is contained in:
2023-05-29 19:31:17 +10:00
parent 0c32e30488
commit 41235c87ed
4 changed files with 38 additions and 0 deletions

3
.vscode/settings.json vendored Normal file
View File

@@ -0,0 +1,3 @@
{
"python.analysis.typeCheckingMode": "off"
}

View File

@@ -3,6 +3,7 @@ import sqlite3
from discord import app_commands
from BlackJack import BlackJack
from Calculator import Calculator
from Gamepicker import pick_game
botIntents = discord.Intents.all()
@@ -113,6 +114,17 @@ async def calculator(interaction: discord.Interaction):
calculator = Calculator()
await interaction.followup.send(content="`" + " " * calculator.MAXIMUMBARSIZE + "0`", view=calculator)
"""
#### Game Picker ####
"""
@tree.command(description="Pick a game")
async def gimmegame(interaction: discord.Interaction):
game = pick_game()
await interaction.response.send_message(game)
"""
#### Fin ####
"""

23
Gamepicker.py Normal file
View File

@@ -0,0 +1,23 @@
import discord
import random
# Temporary List
games = ["Left 4 Dead 2",
"Aragami",
"Astroneer",
"Factorio",
"Borderlands",
"Stardew Valley",
"Viscera Cleanup Detail",
"SCP"]
def pick_game():
randomIndex = random.randrange(0, len(games))
coinFlip = random.randrange(0, 2)
if coinFlip:
return "Valorant"
else:
return games[randomIndex]

Binary file not shown.