original_docstring: 
          Check if a message is a command and execute it.
          :param message: The message that should be checked and executed.
          
docstring: Check if a message is a command and execute it.
docstring_tokens: Check if a message is a command and execute it .
code: def check_and_execute_message(self, message):
          """
          Check if a message is a command and execute it.
          :param message: The message that should be checked and executed.
          """
          if not message.startswith(self._settings.command_prefix):
              _logger.info("The passed message does not start with the command prefix.")
              return
          _logger.info("Recognised command {}".format(message.split(" ")[0]))
  
          for command in self._command_registry.commands.keys():
              command_with_prefix = COMMAND_SCAFFOLD.format(prefix=self._settings.command_prefix,
                                                            command=command)
              if message.startswith(command_with_prefix):
                  _logger.info("Found function for command {}".format(command_with_prefix))
  
                  func_args = inspect.getfullargspec(self._command_registry.commands[command])
                  if len(func_args.args) > 1:
                      try:
                          self._command_registry.commands[command].__call__(message)
                      except:
                          _logger.error("Error occurred while trying to execute the function for the command: {}"\
                                          .format(command_with_prefix))
                  else:
                      try:
                          self._command_registry.commands[command].__call__()
                      except:
                          _logger.error("Error occurred while trying to execute the function for the command: {}" \
                                        .format(command_with_prefix))
code_tokens: def check_and_execute_message ( self , message ) : if not message . startswith ( self . _settings . command_prefix ) : _logger . info ( "The passed message does not start with the command prefix." ) return _logger . info ( "Recognised command {}" . format ( message . split ( " " ) [ 0 ] ) ) for command in self . _command_registry . commands . keys ( ) : command_with_prefix = COMMAND_SCAFFOLD . format ( prefix = self . _settings . command_prefix , command = command ) if message . startswith ( command_with_prefix ) : _logger . info ( "Found function for command {}" . format ( command_with_prefix ) ) func_args = inspect . getfullargspec ( self . _command_registry . commands [ command ] ) if len ( func_args . args ) > 1 : try : self . _command_registry . commands [ command ] . __call__ ( message ) except : _logger . error ( "Error occurred while trying to execute the function for the command: {}" . format ( command_with_prefix ) ) else : try : self . _command_registry . commands [ command ] . __call__ ( ) except : _logger . error ( "Error occurred while trying to execute the function for the command: {}" . format ( command_with_prefix ) )
short_docstring: Check if a message is a command and execute it.
short_docstring_tokens: Check if a message is a command and execute it .
comment: """
          Check if a message is a command and execute it.
          :param message: The message that should be checked and executed.
          """