Kirk Trombley 3 months ago
parent
commit
a89f0ccd66
3 changed files with 11 additions and 1 deletions
  1. 1 1
      Dockerfile.discord
  2. 10 0
      commands/commands/simple.py
  3. BIN
      commands/commands/tom.jpg

+ 1 - 1
Dockerfile.discord

@@ -22,6 +22,6 @@ RUN pip3 install -e /app/commands
 
 COPY ./drivers/discord_driver.py .
 
-RUN pip3 install discord.py
+RUN pip3 install discord.py audioop-lts
 
 CMD python3 discord_driver.py

+ 10 - 0
commands/commands/simple.py

@@ -239,3 +239,13 @@ def sasuke(n: Arg(0, int, required=False, default=3)):
         data = img.read()
     for _ in range(n):
         yield Attachment("image", data)
+
+
+TOM_PATH = os.path.join(os.path.dirname(os.path.realpath(__file__)), "tom.jpg")
+
+
+@as_command
+def tom():
+    with open(TOM_PATH, "br") as img:
+        data = img.read()
+    yield Attachment("image", data)

BIN
commands/commands/tom.jpg