diff --git a/Database Schema.drawio b/Database Schema.drawio deleted file mode 100644 index 792f70e..0000000 --- a/Database Schema.drawio +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/docker-compose.yml b/docker-compose.yml index 6d5b113..810923b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,11 +1,20 @@ version: "3.3" -volumes: - networks: + net: + driver: bridge services: acronymbot: build: ./src/py volumes: - "./src/py:/usr/app/src" + networks: + - "net" + depends_on: + - database + + database: + image: mariadb:latest + networks: + - "net" diff --git a/ledger.db b/ledger.db index 08d9495..f095152 100644 Binary files a/ledger.db and b/ledger.db differ diff --git a/list.txt b/list.txt index 62b0376..612ad60 100644 --- a/list.txt +++ b/list.txt @@ -3,7 +3,7 @@ GAMEINFO: ID, NAME, GENRE, GAMEPASS WHOOWNSIT (bitmap index): -ID, MARCUS, BENSON, ALEX, TIM +ID, MARCUS, BENSON, ALEX, TIM, AIDAN GAMEFACTORS: ID, BRAINLEVEL, TIMETOPLAY, CAMPAIGN diff --git a/src/py/Acronymbot.py b/src/py/Acronymbot.py index 3ff69b2..e52711e 100644 --- a/src/py/Acronymbot.py +++ b/src/py/Acronymbot.py @@ -121,7 +121,7 @@ async def calculator(interaction: discord.Interaction): async def gg(interaction: discord.Interaction): game = pick_game() - await interaction.response.send_message("Barotrauma") + await interaction.response.send_message(f"{game}") @tree.command(description="Roll a Dice") @app_commands.choices(dice = [ @@ -138,6 +138,96 @@ async def roll(interaction: discord.Interaction, dice:app_commands.Choice[int]): roll = random.randint(1, dice.value) await interaction.response.send_message(f"{dice.name}: {roll}") + + +""" +#### Russian Roulette #### +""" +MAXLINELENGTH = 12 +tooLong = lambda x: len(x) > MAXLINELENGTH +tooShort = lambda x: len(x) < MAXLINELENGTH +difference = lambda x: MAXLINELENGTH - len(x) +sidePad = lambda x: " " * (difference(x) // 2) +evenPad = lambda x: sidePad(x) + x + sidePad(x) +oddPad = lambda x: evenPad(x) + " " + +def demon_text_helper(line): + if tooShort(line): + if difference(line) % 2 == 0: + return evenPad(line) + else: + return oddPad(line) + + return line + +def demon_text(lineOne="", lineTwo="", lineThree=""): + + if tooLong(lineOne) or tooLong(lineTwo) or tooLong(lineThree): + print("Line too long lol") + + lineOne = demon_text_helper(lineOne) + lineTwo = demon_text_helper(lineTwo) + lineThree = demon_text_helper(lineThree) + + + + demon = f"``` , , /\ /\ \n\ + /( /\ )\ _\ \_/ /_ ____________\n\ + |\_||_/| < \_ _/ > / \ \n\ + \______/ \|0 0|/ | {lineOne} |\n\ + _\/_ _(_ ^ _)_ | {lineTwo} |\n\ + ( () ) /`\|V\"\"\"V|/`\ | {lineThree} |\n\ + {{}} \ \_____/ / <______________/\n\ + () /\ )=( /\ \n\ + {{}} / \_/\=/\_/ \ \n```" + return demon + +class ShootOrNoShoot(discord.ui.View): + def __init__(self, *, timeout=180): + super().__init__(timeout=timeout) + self.bullets = 6 + + @discord.ui.button(label="Shoot", style=discord.ButtonStyle.red) + async def shoot(self, interaction: discord.Interaction, button: discord.ui.Button): + if self.bullets == 0: + for child in self.children: + child.disabled = True + await interaction.response.edit_message(content=f"What?", view=self) + + if random.randrange(0,self.bullets) == 0: + for child in self.children: + child.disabled = True + + demonDeath = demon_text(lineOne="You died!", lineTwo="Bahahahah!", lineThree=f"Score: {6 - self.bullets}") + await interaction.response.edit_message(content=f"{demonDeath}", view=self) + + else: + + self.bullets -= 1 + button.label = f"Shoot again" + demonLife = demon_text(lineOne="You live", lineTwo="This time!!", + lineThree=f"({6 - self.bullets}/5) blanks") + await interaction.response.edit_message(content=f"{demonLife}", view=self) + + + + + @discord.ui.button(label="PussyOut", style=discord.ButtonStyle.blurple) + async def noshoot(self, interaction: discord.Interaction, button: discord.ui.Button): + for child in self.children: + child.disabled = True + + demonPussy = demon_text(lineOne="You are such", lineTwo="a huge pussy", lineThree= "0 bitches 4u") + await interaction.response.edit_message(content=f"{demonPussy}", view=self) + + +@tree.command(description="????") +async def rr(interaction: discord.Interaction): + await interaction.response.defer() + buttons = ShootOrNoShoot() + demon = demon_text(lineTwo="Shoot urself") + await interaction.followup.send(content=f"{demon}", view=buttons) + """ #### Fin #### """ diff --git a/src/py/Dockerfile b/src/py/Dockerfile index 32c77d2..58ee22d 100644 --- a/src/py/Dockerfile +++ b/src/py/Dockerfile @@ -1,6 +1,7 @@ FROM python:3 -RUN pip install discord +RUN pip install discord \ + && pip install mariadb WORKDIR /usr/app/src diff --git a/src/py/Gamepicker.py b/src/py/Gamepicker.py index 7d19e33..d07f167 100644 --- a/src/py/Gamepicker.py +++ b/src/py/Gamepicker.py @@ -11,7 +11,6 @@ import random # "Viscera Cleanup Detail", # "SCP", # "Satisfactory", -# "Backrooms (Alternate Ending)", # "Ghost Recon Wildlands" # ] diff --git a/src/py/__pycache__/BlackJack.cpython-310.pyc b/src/py/__pycache__/BlackJack.cpython-310.pyc index d026e1c..1cb855b 100644 Binary files a/src/py/__pycache__/BlackJack.cpython-310.pyc and b/src/py/__pycache__/BlackJack.cpython-310.pyc differ diff --git a/src/py/__pycache__/Calculator.cpython-310.pyc b/src/py/__pycache__/Calculator.cpython-310.pyc index 8fa636a..be1f2bb 100644 Binary files a/src/py/__pycache__/Calculator.cpython-310.pyc and b/src/py/__pycache__/Calculator.cpython-310.pyc differ diff --git a/src/py/__pycache__/Gamepicker.cpython-310.pyc b/src/py/__pycache__/Gamepicker.cpython-310.pyc index 3343ec6..1db596f 100644 Binary files a/src/py/__pycache__/Gamepicker.cpython-310.pyc and b/src/py/__pycache__/Gamepicker.cpython-310.pyc differ diff --git a/src/py/__pycache__/Ledger.cpython-310.pyc b/src/py/__pycache__/Ledger.cpython-310.pyc index 4a62ded..77bbd44 100644 Binary files a/src/py/__pycache__/Ledger.cpython-310.pyc and b/src/py/__pycache__/Ledger.cpython-310.pyc differ