Browse Source

inquire command

ivan 5 years ago
parent
commit
918aab4f36
1 changed files with 8 additions and 0 deletions
  1. 8 0
      src/plugins/simple.py

+ 8 - 0
src/plugins/simple.py

@@ -41,3 +41,11 @@ def choice(message):
     opts = list(message.args())
     chosen = random.choice(opts)
     return f"Randomly chose {chosen} from {len(opts)} options"
+
+@as_plugin
+def inquire(message):
+    opts = "Yes", "No", "Maybe", "Perhaps", "I guess", "Probably shouldn't", "rand"
+    chosen = random.choice(opts)
+    if chosen == "rand":
+        chosen = string(random.randrange(10))
+    return f"{chosen}"