Add check for square brackets

This commit is contained in:
Tanner Collin 2021-05-02 01:38:26 +00:00
parent 6315f8c309
commit 8f0d2eb417

View File

@ -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