From 7c92741b99e850dba7f55c253ce1529d8d0ba350 Mon Sep 17 00:00:00 2001
From: Someone <someone@somenet.org>
Date: Thu, 27 Jan 2022 12:59:11 +0100
Subject: [PATCH] modules/CommandGetText.py

---
 modules/CommandGetText.py | 34 ----------------------------------
 1 file changed, 34 deletions(-)
 delete mode 100644 modules/CommandGetText.py

diff --git a/modules/CommandGetText.py b/modules/CommandGetText.py
deleted file mode 100644
index e603455..0000000
--- a/modules/CommandGetText.py
+++ /dev/null
@@ -1,34 +0,0 @@
-# Mattermost Bot module.
-#  Copyright (c) 2016-2022 by Someone <someone@somenet.org> (aka. Jan Vales <jan@jvales.net>)
-#  published under MIT-License
-#
-# This command relies on the priviledged DB-Cleaner maint script.
-
-
-
-# pylint: disable=wrong-import-position
-from AbstractCommand import AbstractCommand
-class CommandGetText(AbstractCommand):
-    TRIGGER = "get-text"
-    CONFIG = {"display_name": "somebot-command", "auto_complete": True,
-              "auto_complete_hint": "<permalink>",
-             }
-    CONFIG["auto_complete_desc"] = CONFIG["description"] = AbstractCommand.ICON_PRIVATE+"Get post-text of permalinked post (useful when wantng to get the latex source of a post)"
-
-
-    def on_POST(self, request, data):
-        msg_text = data['text'].strip().split(" ", 1)
-
-        try:
-            splitpath = msg_text[0].strip().strip("/").split("/")
-            if splitpath[4] == "pl":
-                post = self.bot.api.get_post(splitpath[5])
-        except:
-            request.respond_cmd_err("``/"+self.TRIGGER+"`` The first parameter is not a valid post-permalink or the permalinked post has been deleted.")
-            return
-
-        if post["channel_id"] != data["channel_id"]:
-            request.respond_cmd_err("``/"+self.TRIGGER+"`` Must be executed in the same channel as the permalinked post.")
-            return
-
-        request.respond_cmd_temp("## :white_check_mark: Success! :)\n```\n"+post["message"]+"\n```")
-- 
2.43.0