Minor refactoring
This commit is contained in:
		
							parent
							
								
									b4d45a120f
								
							
						
					
					
						commit
						0e38897445
					
				
					 1 changed files with 3 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -65,7 +65,9 @@ class CommandProcessor(object):
 | 
			
		|||
        Try to process text as a command. Returns True if it has been processed
 | 
			
		||||
        as a command and False otherwise.
 | 
			
		||||
        """
 | 
			
		||||
        if not (text.startswith(self.COMMAND_PREFIX) and len(text) > 1):
 | 
			
		||||
        prefix = text.startswith(self.COMMAND_PREFIX)
 | 
			
		||||
        length = len(text) > len(self.COMMAND_PREFIX)
 | 
			
		||||
        if not (prefix and length):
 | 
			
		||||
            return False
 | 
			
		||||
 | 
			
		||||
        body = text[len(self.COMMAND_PREFIX):]
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue