Browse Source

Added teamscream

Kirk Trombley 6 years ago
parent
commit
dde07eb677
2 changed files with 13 additions and 1 deletions
  1. 1 1
      config/config.toml
  2. 12 0
      src/plugins/teamspeak.py

+ 1 - 1
config/config.toml

@@ -2,7 +2,7 @@ database = "/tmp/rollbot.sqlite"
 
 [plugins]
 simple = [ "info", "isadmin", "debug", "echo", "thanks", "guess", "meme", "unmeme", "greet", "console" ]
-teamspeak = [ "teamspeak", "speamteek", ]
+teamspeak = [ "teamspeak", "speamteek", "teamscream", ]
 session = [ "session" ]
 roll = [ "roll" ]
 querying = [ "inspire", "shield", "scp", "riddle" ]

+ 12 - 0
src/plugins/teamspeak.py

@@ -62,3 +62,15 @@ class speamteek(teamspeak):
         if r.is_success:
             r.txt = r.txt[::-1]
         return r
+
+
+class teamscream(teamspeak):
+    def __init__(self, command, logger=logging.getLogger(__name__)):
+        RollbotPlugin.__init__(self, "teamscream", logger)
+        self.logger.info(f"Intializing Speamteek command")
+
+    def on_command(self, db, message):
+        r = super().on_command(db, message)
+        if r.is_success:
+            r.txt = r.txt.upper()
+        return r