Add check for square brackets
This commit is contained in:
		@@ -50,6 +50,9 @@ class Commands:
 | 
				
			|||||||
        if prefix == bot_num:
 | 
					        if prefix == bot_num:
 | 
				
			||||||
            for_me = True
 | 
					            for_me = True
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        if data.startswith('[') and data.endswith(']'):
 | 
				
			||||||
 | 
					            command = 'nosquarebrackets'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        try:
 | 
					        try:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -81,6 +84,9 @@ class Commands:
 | 
				
			|||||||
            if command == 'echo' and data:
 | 
					            if command == 'echo' and data:
 | 
				
			||||||
                reply = data
 | 
					                reply = data
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            if command == 'nosquarebrackets':
 | 
				
			||||||
 | 
					                reply = 'don\'t literally put the [ ]'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            ## !pos - replies with position and dimension
 | 
					            ## !pos - replies with position and dimension
 | 
				
			||||||
            if command == 'pos':
 | 
					            if command == 'pos':
 | 
				
			||||||
                reply = str(utils.pint(self.g.pos))[1:-1] + ', ' + self.g.dimension
 | 
					                reply = str(utils.pint(self.g.pos))[1:-1] + ', ' + self.g.dimension
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user