Add check for square brackets

master
Tanner Collin 3 years ago
parent 6315f8c309
commit 8f0d2eb417
  1. 6
      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

Loading…
Cancel
Save