Sfoglia il codice sorgente

Removing unneeded from_web helper method

Kirk Trombley 6 anni fa
parent
commit
9456524261
2 ha cambiato i file con 1 aggiunte e 9 eliminazioni
  1. 1 1
      src/app.py
  2. 0 8
      src/command_system.py

+ 1 - 1
src/app.py

@@ -45,7 +45,7 @@ atexit.register(rollbot.shutdown_plugins)
 
 @app.route("/teamspeak", methods=["GET"])
 def teamspeak():
-    response = rollbot.run_command(RollbotMessage.from_web("!teamspeak"))
+    response = rollbot.run_command(RollbotMessage("MANUAL", None, None, None, None, "!teamspeak", False))
     if response.is_success:
         response = response.txt
     else:

+ 0 - 8
src/command_system.py

@@ -54,14 +54,6 @@ class RollbotMessage:
                 sender_id in group_admins[group_id])
         )
 
-    @staticmethod
-    def from_web(content):
-        content = content.strip()
-        if len(content) > 0 and content[0] not in BANGS:
-            content = BANGS[0] + content
-        # TODO should still assign an id...
-        return RollbotMessage("WEB_FRONTEND", "user", None, None, None, content, False)
-
     def args(self, normalize=True):
         arg, rest = pop_arg(self.raw_args)
         while arg is not None: