From 8f0d2eb4179d206011abf4ff0ff75b3f0aa6a739 Mon Sep 17 00:00:00 2001 From: Tanner Collin Date: Sun, 2 May 2021 01:38:26 +0000 Subject: [PATCH] Add check for square brackets --- mosfet/commands.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/mosfet/commands.py b/mosfet/commands.py index c4839d9..fc26f13 100644 --- a/mosfet/commands.py +++ b/mosfet/commands.py @@ -50,6 +50,9 @@ class Commands: if prefix == bot_num: for_me = True + if data.startswith('[') and data.endswith(']'): + command = 'nosquarebrackets' + try: @@ -81,6 +84,9 @@ class Commands: if command == 'echo' and data: reply = data + if command == 'nosquarebrackets': + reply = 'don\'t literally put the [ ]' + ## !pos - replies with position and dimension if command == 'pos': reply = str(utils.pint(self.g.pos))[1:-1] + ', ' + self.g.dimension