From b5a37acecbf26b1a4a3b637b8658924cccaa4fe5 Mon Sep 17 00:00:00 2001 From: dymik739 Date: Thu, 21 Sep 2023 19:32:56 +0300 Subject: [PATCH] add new module: pingtools --- modules/pingtools/index.py | 4 ++++ modules/pingtools/meta.json | 6 ++++++ 2 files changed, 10 insertions(+) create mode 100644 modules/pingtools/index.py create mode 100644 modules/pingtools/meta.json diff --git a/modules/pingtools/index.py b/modules/pingtools/index.py new file mode 100644 index 0000000..d663d58 --- /dev/null +++ b/modules/pingtools/index.py @@ -0,0 +1,4 @@ +text = self.MESSAGE.text + +if text == "!ping": + self.RESPONSE = f"Pong in {time.time() - 7200 - float(self.MESSAGE.date.strftime('+%s'))} seconds" diff --git a/modules/pingtools/meta.json b/modules/pingtools/meta.json new file mode 100644 index 0000000..b68f42a --- /dev/null +++ b/modules/pingtools/meta.json @@ -0,0 +1,6 @@ +{ + "start_on_boot": true, + "alias": "pingtools", + "version": 1, + "index_file": "index.py" +}