Browse Source

Add bubblewrap

Kirk Trombley 10 months ago
parent
commit
c991a78cb8
1 changed files with 20 additions and 0 deletions
  1. 20 0
      commands/commands/simple.py

+ 20 - 0
commands/commands/simple.py

@@ -1,4 +1,5 @@
 import random
+import re
 from datetime import datetime, timedelta
 
 from rollbot import as_command, Message, RollbotFailure, Command, Attachment
@@ -194,3 +195,22 @@ def unfeed():
     global last_feed
     last_feed = None
     return random.choice(("What's your problem?", "Bro why", "Come on!!!!"))
+
+
+@as_command
+def bubblewrap(args: Args):
+    try:
+        c, r = re.match(r"(\d+)(?:[x,; ]+(\d+))?", args).groups()
+        print(c, r)
+        c = int(c)
+        print(c, r)
+        r = int(r) if r else c
+        print(c, r)
+    except:
+        c = r = 4
+    print(c, r)
+
+    if c > 10 or r > 10:
+        return "fuck off"
+
+    return "\n".join(["||pop|| " * c] * r)