From 7d0d816ca8b8b9b59b2aff653655d7433db78720 Mon Sep 17 00:00:00 2001 From: dymik739 Date: Mon, 9 Oct 2023 23:10:03 +0300 Subject: [PATCH] generic-command-processor: add easter eggs and make the module case-insensitive --- modules/generic-command-processor/data.json | 4 +++- modules/generic-command-processor/index.py | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/modules/generic-command-processor/data.json b/modules/generic-command-processor/data.json index ab44c23..c8f8739 100644 --- a/modules/generic-command-processor/data.json +++ b/modules/generic-command-processor/data.json @@ -1,3 +1,5 @@ { - "s": "Головна сторінка сервера: http://10.1.1.1:12010/" + "s": "Головна сторінка сервера: http://10.1.1.1:12010/", + "пари_для_артема": "🧐", + "пари_для_артема_хоч_і_не_на_завтра": "🤨" } diff --git a/modules/generic-command-processor/index.py b/modules/generic-command-processor/index.py index 6a0d4cf..7c9346c 100644 --- a/modules/generic-command-processor/index.py +++ b/modules/generic-command-processor/index.py @@ -2,5 +2,5 @@ command_storage = json.loads(open(self.path + "data.json").read()) received_command = self.MESSAGE.text[1:] -if received_command in command_storage: - self.RESPONSE = command_storage[received_command] +if received_command.lower() in command_storage: + self.RESPONSE = command_storage[received_command.lower()]