2 Commits 27d2edf8d1 ... c991a78cb8

Author SHA1 Message Date
  Kirk Trombley c991a78cb8 Add bubblewrap 10 months ago
  Kirk Trombley 14d7796d9c Fix stupid import issue 10 months ago
2 changed files with 22 additions and 3 deletions
  1. 2 3
      commands/commands/__init__.py
  2. 20 0
      commands/commands/simple.py

+ 2 - 3
commands/commands/__init__.py

@@ -2,9 +2,7 @@ import pkgutil
 
 from rollbot import get_command_config, CommandConfiguration
 
-for loader, module_name, is_pkg in pkgutil.walk_packages(__path__):
-    _module = loader.find_module(module_name).load_module(module_name)
-    globals()[module_name] = _module
+import commands.curse, commands.hangguy, commands.omen, commands.plex, commands.poll, commands.querying, commands.roll, commands.rollcoin, commands.session, commands.seychelles, commands.simple, commands.tarot, commands.teamspeak, commands.yell
 
 __all__ = ["config"]
 config = get_command_config().extend(
@@ -41,6 +39,7 @@ config = get_command_config().extend(
             "choose": "choice",
             "omens": "omen",
             "pollhearts": "poll",
+            "bubble": "bubblewrap",
         },
     )
 )

+ 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)