Main addition: Russian Roulette
This commit is contained in:
@@ -1,24 +0,0 @@
|
||||
<mxfile host="app.diagrams.net" modified="2023-05-22T12:07:33.298Z" agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36" etag="q5uW-7b8-1ilPYLQ2MB6" version="21.2.3" type="device">
|
||||
<diagram id="R2lEEEUBdFMjLlhIrx00" name="Page-1">
|
||||
<mxGraphModel dx="989" dy="527" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="850" pageHeight="1100" math="0" shadow="0" extFonts="Permanent Marker^https://fonts.googleapis.com/css?family=Permanent+Marker">
|
||||
<root>
|
||||
<mxCell id="0" />
|
||||
<mxCell id="1" parent="0" />
|
||||
<mxCell id="ANSDRNTTTskcCvD7KveH-1" value="GAME" style="swimlane;fontStyle=0;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;align=center;fontSize=14;swimlaneLine=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="350" y="160" width="160" height="116" as="geometry">
|
||||
<mxRectangle x="190" y="150" width="80" height="30" as="alternateBounds" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="ANSDRNTTTskcCvD7KveH-2" value="<u>ID</u>" style="text;strokeColor=none;fillColor=none;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;fontSize=12;whiteSpace=wrap;html=1;" vertex="1" parent="ANSDRNTTTskcCvD7KveH-1">
|
||||
<mxGeometry y="26" width="160" height="30" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="ANSDRNTTTskcCvD7KveH-3" value="NAME" style="text;strokeColor=none;fillColor=none;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;fontSize=12;whiteSpace=wrap;html=1;" vertex="1" parent="ANSDRNTTTskcCvD7KveH-1">
|
||||
<mxGeometry y="56" width="160" height="30" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="ANSDRNTTTskcCvD7KveH-4" value="WHOPLAYSIT" style="text;strokeColor=none;fillColor=none;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;fontSize=12;whiteSpace=wrap;html=1;" vertex="1" parent="ANSDRNTTTskcCvD7KveH-1">
|
||||
<mxGeometry y="86" width="160" height="30" as="geometry" />
|
||||
</mxCell>
|
||||
</root>
|
||||
</mxGraphModel>
|
||||
</diagram>
|
||||
</mxfile>
|
||||
@@ -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"
|
||||
|
||||
2
list.txt
2
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
|
||||
|
||||
@@ -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 ####
|
||||
"""
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
FROM python:3
|
||||
|
||||
RUN pip install discord
|
||||
RUN pip install discord \
|
||||
&& pip install mariadb
|
||||
|
||||
WORKDIR /usr/app/src
|
||||
|
||||
|
||||
@@ -11,7 +11,6 @@ import random
|
||||
# "Viscera Cleanup Detail",
|
||||
# "SCP",
|
||||
# "Satisfactory",
|
||||
# "Backrooms (Alternate Ending)",
|
||||
# "Ghost Recon Wildlands"
|
||||
# ]
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user